X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_gradient.cpp;h=f4f196369d20bfb0cebd5f3a90572713d2a3c5ec;hb=faa340a2a22d0b46fc21e2c9779bf7eff811bfbe;hp=6863bd9e3bc78e06d95aac70c0888ffe1d0f35c2;hpb=c34eaa5441242b3e9a7b7645e9ee4983d14eae85;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp index 6863bd9..f4f1963 100644 --- a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp @@ -2,7 +2,7 @@ /*! \file state_gradient.cpp ** \brief Template File ** -** $Id: state_gradient.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 @@ -133,10 +133,10 @@ public: void increment_id(); void make_gradient(const Point& p1, const Point& p2); - 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; } @@ -245,10 +245,10 @@ StateGradient_Context::StateGradient_Context(CanvasView* canvas_view): is_working(*canvas_view), duckmatic_push(get_work_area()), settings(synfigapp::Main::get_selected_input_device()->settings()), - prev_workarea_layer_status_(get_work_area()->allow_layer_clicks), + prev_workarea_layer_status_(get_work_area()->get_allow_layer_clicks()), entry_id() { - no_egress_on_selection_change=false; + egress_on_selection_change=true; // Set up the tool options dialog ///options_table.attach(*manage(new Gtk::Label(_("Gradient Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); @@ -277,7 +277,7 @@ StateGradient_Context::StateGradient_Context(CanvasView* canvas_view): // Turn off layer clicking - get_work_area()->allow_layer_clicks=false; + get_work_area()->set_allow_layer_clicks(false); get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR); @@ -292,8 +292,8 @@ StateGradient_Context::StateGradient_Context(CanvasView* canvas_view): // Hide the tables if they are showing 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::StateGradient_Context::on_user_click)); @@ -311,7 +311,7 @@ StateGradient_Context::refresh_tool_options() } Smach::event_result -StateGradient_Context::event_refresh_tool_options(const Smach::event& x) +StateGradient_Context::event_refresh_tool_options(const Smach::event& /*x*/) { refresh_tool_options(); return Smach::RESULT_ACCEPT; @@ -322,15 +322,14 @@ StateGradient_Context::~StateGradient_Context() save_settings(); // Restore layer clicking -// get_work_area()->allow_layer_clicks=prev_workarea_layer_status_; - get_work_area()->allow_layer_clicks=true; +// get_work_area()->set_allow_layer_clicks(prev_workarea_layer_status_); + get_work_area()->set_allow_layer_clicks(true); get_canvas_view()->work_area->reset_cursor(); App::dialog_tool_options->clear(); - // 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(); @@ -346,13 +345,13 @@ StateGradient_Context::~StateGradient_Context() } Smach::event_result -StateGradient_Context::event_stop_handler(const Smach::event& x) +StateGradient_Context::event_stop_handler(const Smach::event& /*x*/) { throw Smach::egress_exception(); } Smach::event_result -StateGradient_Context::event_refresh_handler(const Smach::event& x) +StateGradient_Context::event_refresh_handler(const Smach::event& /*x*/) { refresh_ducks(); return Smach::RESULT_ACCEPT; @@ -430,10 +429,10 @@ StateGradient_Context::make_gradient(const Point& _p1, const Point& _p2) layer->set_description(get_id()); get_canvas_interface()->signal_layer_new_description()(layer,layer->get_description()); - 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; reset(); increment_id();