Module: synfig
Branch: nikitakit_ducks
Commit: 22ff6846bc3300d2c6e6eb0f95b6c509331a0074
URL:    
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=22ff6846bc3300d2c6e6eb0f95b6c509331a0074

Author: Nikita Kitaev <[email protected]>
Date:   Sun Jan 10 20:51:01 2010 -0800

Replace egress on selection change with entering state_normal

Toolbox no longer auto-presents itself when the normal tool is
clicked or Synfig Studio is lauched to avoid problems if it is
tabbed with the Layers panel.

---

 synfig-studio/src/gtkmm/state_bline.cpp     |    3 ++-
 synfig-studio/src/gtkmm/state_circle.cpp    |    3 ++-
 synfig-studio/src/gtkmm/state_gradient.cpp  |    3 ++-
 synfig-studio/src/gtkmm/state_normal.cpp    |    2 +-
 synfig-studio/src/gtkmm/state_polygon.cpp   |    3 ++-
 synfig-studio/src/gtkmm/state_rectangle.cpp |    3 ++-
 synfig-studio/src/gtkmm/state_star.cpp      |    3 ++-
 synfig-studio/src/gtkmm/state_text.cpp      |    3 ++-
 8 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/synfig-studio/src/gtkmm/state_bline.cpp 
b/synfig-studio/src/gtkmm/state_bline.cpp
index 7a27d84..f5cbdd3 100644
--- a/synfig-studio/src/gtkmm/state_bline.cpp
+++ b/synfig-studio/src/gtkmm/state_bline.cpp
@@ -36,6 +36,7 @@
 #include <synfig/valuenode_dynamiclist.h>
 
 #include "state_bline.h"
+#include "state_normal.h"
 #include "canvasview.h"
 #include "workarea.h"
 #include "app.h"
@@ -205,7 +206,7 @@ public:
        Smach::event_result event_layer_selection_changed_handler(const 
Smach::event& /*x*/)
        {
                if(egress_on_selection_change)
-                       throw Smach::egress_exception();
+                       throw &state_normal; //throw Smach::egress_exception();
                return Smach::RESULT_OK;
        }
 
diff --git a/synfig-studio/src/gtkmm/state_circle.cpp 
b/synfig-studio/src/gtkmm/state_circle.cpp
index fe82e21..865ea81 100644
--- a/synfig-studio/src/gtkmm/state_circle.cpp
+++ b/synfig-studio/src/gtkmm/state_circle.cpp
@@ -38,6 +38,7 @@
 #include <synfig/valuenode_bline.h>
 
 #include "state_circle.h"
+#include "state_normal.h"
 #include "canvasview.h"
 #include "workarea.h"
 #include "app.h"
@@ -208,7 +209,7 @@ public:
        Smach::event_result event_layer_selection_changed_handler(const 
Smach::event& /*x*/)
        {
                if(egress_on_selection_change)
-                       throw Smach::egress_exception();
+                       throw &state_normal; //throw Smach::egress_exception();
                return Smach::RESULT_OK;
        }
 
diff --git a/synfig-studio/src/gtkmm/state_gradient.cpp 
b/synfig-studio/src/gtkmm/state_gradient.cpp
index c8461b5..c0fd022 100644
--- a/synfig-studio/src/gtkmm/state_gradient.cpp
+++ b/synfig-studio/src/gtkmm/state_gradient.cpp
@@ -37,6 +37,7 @@
 #include <synfigapp/action_system.h>
 
 #include "state_gradient.h"
+#include "state_normal.h"
 #include "canvasview.h"
 #include "workarea.h"
 #include "app.h"
@@ -144,7 +145,7 @@ public:
        Smach::event_result event_layer_selection_changed_handler(const 
Smach::event& /*x*/)
        {
                if(egress_on_selection_change)
-                       throw Smach::egress_exception();
+                       throw &state_normal; //throw Smach::egress_exception();
                return Smach::RESULT_OK;
        }
 
diff --git a/synfig-studio/src/gtkmm/state_normal.cpp 
b/synfig-studio/src/gtkmm/state_normal.cpp
index 8228921..95be889 100644
--- a/synfig-studio/src/gtkmm/state_normal.cpp
+++ b/synfig-studio/src/gtkmm/state_normal.cpp
@@ -244,7 +244,7 @@ StateNormal_Context::StateNormal_Context(CanvasView* 
canvas_view):
        options_table.show_all();
        refresh_tool_options();
        //App::dialog_tool_options->set_widget(options_table);
-       App::dialog_tool_options->present();
+       //App::dialog_tool_options->present();
 
        get_work_area()->set_allow_layer_clicks(true);
        get_work_area()->set_duck_dragger(duck_dragger_);
diff --git a/synfig-studio/src/gtkmm/state_polygon.cpp 
b/synfig-studio/src/gtkmm/state_polygon.cpp
index c016f1d..6059648 100644
--- a/synfig-studio/src/gtkmm/state_polygon.cpp
+++ b/synfig-studio/src/gtkmm/state_polygon.cpp
@@ -38,6 +38,7 @@
 #include <synfig/valuenode_bline.h>
 
 #include "state_polygon.h"
+#include "state_normal.h"
 #include "canvasview.h"
 #include "workarea.h"
 #include "app.h"
@@ -171,7 +172,7 @@ public:
        Smach::event_result event_layer_selection_changed_handler(const 
Smach::event& /*x*/)
        {
                if(egress_on_selection_change)
-                       throw Smach::egress_exception();
+                       throw &state_normal; //throw Smach::egress_exception();
                return Smach::RESULT_OK;
        }
 
diff --git a/synfig-studio/src/gtkmm/state_rectangle.cpp 
b/synfig-studio/src/gtkmm/state_rectangle.cpp
index aa21c23..54fb072 100644
--- a/synfig-studio/src/gtkmm/state_rectangle.cpp
+++ b/synfig-studio/src/gtkmm/state_rectangle.cpp
@@ -38,6 +38,7 @@
 #include <synfig/valuenode_bline.h>
 
 #include "state_rectangle.h"
+#include "state_normal.h"
 #include "canvasview.h"
 #include "workarea.h"
 #include "app.h"
@@ -176,7 +177,7 @@ public:
        Smach::event_result event_layer_selection_changed_handler(const 
Smach::event& /*x*/)
        {
                if(egress_on_selection_change)
-                       throw Smach::egress_exception();
+                       throw &state_normal; //throw Smach::egress_exception();
                return Smach::RESULT_OK;
        }
 
diff --git a/synfig-studio/src/gtkmm/state_star.cpp 
b/synfig-studio/src/gtkmm/state_star.cpp
index e5b3ace..719e0d3 100644
--- a/synfig-studio/src/gtkmm/state_star.cpp
+++ b/synfig-studio/src/gtkmm/state_star.cpp
@@ -38,6 +38,7 @@
 #include <synfig/valuenode_bline.h>
 
 #include "state_star.h"
+#include "state_normal.h"                      throw &state_normal; //throw 
Smach::egress_exception();
 #include "canvasview.h"
 #include "workarea.h"
 #include "app.h"
@@ -215,7 +216,7 @@ public:
        Smach::event_result event_layer_selection_changed_handler(const 
Smach::event& /*x*/)
        {
                if(egress_on_selection_change)
-                       throw Smach::egress_exception();
+                       throw &state_normal; //throw Smach::egress_exception();
                return Smach::RESULT_OK;
        }
 
diff --git a/synfig-studio/src/gtkmm/state_text.cpp 
b/synfig-studio/src/gtkmm/state_text.cpp
index 8f7d0c9..c1912ab 100644
--- a/synfig-studio/src/gtkmm/state_text.cpp
+++ b/synfig-studio/src/gtkmm/state_text.cpp
@@ -34,6 +34,7 @@
 #include <gtkmm/entry.h>
 
 #include "state_text.h"
+#include "state_normal.h"
 #include "canvasview.h"
 #include "workarea.h"
 #include "app.h"
@@ -132,7 +133,7 @@ public:
        Smach::event_result event_layer_selection_changed_handler(const 
Smach::event& /*x*/)
        {
                if(egress_on_selection_change)
-                       throw Smach::egress_exception();
+                       throw &state_normal; //throw Smach::egress_exception();
                return Smach::RESULT_OK;
        }
 


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to