Added copyright lines for files I've edited this year.
[synfig.git] / synfig-studio / trunk / src / gtkmm / state_polygon.cpp
index afe6a5b..a5498fe 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007, 2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -47,6 +48,8 @@
 #include "dialog_tooloptions.h"
 #include <synfigapp/main.h>
 
+#include "general.h"
+
 #endif
 
 /* === U S I N G =========================================================== */
@@ -186,7 +189,10 @@ StatePolygon_Context::increment_id()
        if(id[id.size()-1]<='9' && id[id.size()-1]>='0')
        {
                // figure out how many digits it is
-               for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
+               for (digits = 0;
+                        (int)id.size()-1 >= digits && id[id.size()-1-digits] <= '9' && id[id.size()-1-digits] >= '0';
+                        digits++)
+                       ;
 
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
@@ -383,6 +389,7 @@ StatePolygon_Context::run()
                                action->set_param("canvas_interface",get_canvas_interface());
                                action->set_param("value_desc",value_desc);
                                action->set_param("type","dynamic_list");
+                               action->set_param("time",get_canvas_interface()->get_time());
                                if(!get_canvas_interface()->get_instance()->perform_action(action))
                                {
                                        group.cancel();
@@ -422,8 +429,9 @@ StatePolygon_Context::event_mouse_click_handler(const Smach::event& x)
                refresh_ducks();
                return Smach::RESULT_ACCEPT;
 
-       case BUTTON_RIGHT: // Intercept the right-button click to short-circut the pop-up menu
-               return Smach::RESULT_ACCEPT;
+       case BUTTON_RIGHT: // Intercept the right-button click to short-circuit the pop-up menu
+               if (!getenv("SYNFIG_ENABLE_POPUP_MENU_IN_ALL_TOOLS"))
+                       return Smach::RESULT_ACCEPT;
 
        default:
                return Smach::RESULT_OK;