X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_polygon.cpp;h=09caf4ff18a3ebb55e5de106b166562fcf8eb506;hb=8ef042c40521681cea99944097c4f90a5ac6cf74;hp=ed7f1645d19e43000f667deac54c79e0bfd26663;hpb=c6af6e1c3816eb3b15c573089b32e6ae65cd2f49;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp index ed7f164..09caf4f 100644 --- a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp @@ -2,7 +2,7 @@ /*! \file state_polygon.cpp ** \brief Template File ** -** $Id: state_polygon.cpp,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley @@ -47,6 +47,8 @@ #include "dialog_tooloptions.h" #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -118,10 +120,10 @@ public: void save_settings(); void reset(); void increment_id(); - bool no_egress_on_selection_change; - Smach::event_result event_layer_selection_changed_handler(const Smach::event& x) + bool egress_on_selection_change; + Smach::event_result event_layer_selection_changed_handler(const Smach::event& /*x*/) { - if(!no_egress_on_selection_change) + if(egress_on_selection_change) throw Smach::egress_exception(); return Smach::RESULT_OK; } @@ -215,13 +217,13 @@ StatePolygon_Context::increment_id() StatePolygon_Context::StatePolygon_Context(CanvasView* canvas_view): canvas_view_(canvas_view), is_working(*canvas_view), - prev_workarea_layer_status_(get_work_area()->allow_layer_clicks), + prev_workarea_layer_status_(get_work_area()->get_allow_layer_clicks()), duckmatic_push(get_work_area()), settings(synfigapp::Main::get_selected_input_device()->settings()), entry_id(), button_make(_("Make")) { - no_egress_on_selection_change=false; + egress_on_selection_change=true; load_settings(); // Set up the tool options dialog @@ -235,7 +237,7 @@ StatePolygon_Context::StatePolygon_Context(CanvasView* canvas_view): // Turn off layer clicking - get_work_area()->allow_layer_clicks=false; + get_work_area()->set_allow_layer_clicks(false); // clear out the ducks get_work_area()->clear_ducks(); @@ -249,8 +251,8 @@ StatePolygon_Context::StatePolygon_Context(CanvasView* canvas_view): prev_table_status=get_canvas_view()->tables_are_visible(); if(prev_table_status)get_canvas_view()->hide_tables(); - // Hide the time bar - get_canvas_view()->hide_timebar(); + // Disable the time bar + get_canvas_view()->set_sensitive_timebar(false); // Connect a signal //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StatePolygon_Context::on_user_click)); @@ -289,7 +291,7 @@ StatePolygon_Context::refresh_tool_options() } Smach::event_result -StatePolygon_Context::event_refresh_tool_options(const Smach::event& x) +StatePolygon_Context::event_refresh_tool_options(const Smach::event& /*x*/) { refresh_tool_options(); return Smach::RESULT_ACCEPT; @@ -301,15 +303,14 @@ StatePolygon_Context::~StatePolygon_Context() save_settings(); // Restore layer clicking - get_work_area()->allow_layer_clicks=prev_workarea_layer_status_; + get_work_area()->set_allow_layer_clicks(prev_workarea_layer_status_); App::dialog_tool_options->clear(); get_canvas_view()->work_area->reset_cursor(); - // Show the time bar - if(get_canvas_view()->get_canvas()->rend_desc().get_time_start()!=get_canvas_view()->get_canvas()->rend_desc().get_time_end()) - get_canvas_view()->show_timebar(); + // Enable the time bar + get_canvas_view()->set_sensitive_timebar(true); // Bring back the tables if they were out before if(prev_table_status)get_canvas_view()->show_tables(); @@ -321,7 +322,7 @@ StatePolygon_Context::~StatePolygon_Context() } Smach::event_result -StatePolygon_Context::event_stop_handler(const Smach::event& x) +StatePolygon_Context::event_stop_handler(const Smach::event& /*x*/) { synfig::info("STATE RotoPolygon: Received Stop Event"); //throw Smach::egress_exception(); @@ -331,7 +332,7 @@ StatePolygon_Context::event_stop_handler(const Smach::event& x) } Smach::event_result -StatePolygon_Context::event_refresh_handler(const Smach::event& x) +StatePolygon_Context::event_refresh_handler(const Smach::event& /*x*/) { synfig::info("STATE RotoPolygon: Received Refresh Event"); refresh_ducks(); @@ -391,10 +392,10 @@ StatePolygon_Context::run() return; } } - no_egress_on_selection_change=true; + egress_on_selection_change=false; get_canvas_interface()->get_selection_manager()->clear_selected_layers(); get_canvas_interface()->get_selection_manager()->set_selected_layer(layer); - no_egress_on_selection_change=false; + egress_on_selection_change=true; //get_canvas_interface()->signal_dirty_preview()(); } /* @@ -423,8 +424,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;