From: pabs Date: Fri, 23 Mar 2007 02:39:21 +0000 (+0000) Subject: Fix 1368904: disable the timebar instead of hiding it when switching to tools that... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=3f7b0cb177d3f3c6cf926add2bf807811f743f72;p=synfig.git Fix 1368904: disable the timebar instead of hiding it when switching to tools that require the timebar to be unavailable git-svn-id: http://svn.voria.com/code@370 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 5269681..82b6f09 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -2933,7 +2933,7 @@ CanvasView::hide_timebar() } void -CanvasView::timebar_set_sensitive(bool sensitive) +CanvasView::set_sensitive_timebar(bool sensitive) { timebar->set_sensitive(sensitive); current_time_widget->set_sensitive(sensitive); diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index c19d37e..ef1c9e1 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -569,7 +569,7 @@ public: void hide_timebar(); //t Enables or disables interaction with the timebar - void timebar_set_sensitive(bool sensitive); + void set_sensitive_timebar(bool sensitive); void do_rotoscope_bline(); diff --git a/synfig-studio/trunk/src/gtkmm/state_bline.cpp b/synfig-studio/trunk/src/gtkmm/state_bline.cpp index 41f8e04..c511366 100644 --- a/synfig-studio/trunk/src/gtkmm/state_bline.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_bline.cpp @@ -369,8 +369,8 @@ StateBLine_Context::StateBLine_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::StateBLine_Context::on_user_click)); @@ -427,9 +427,8 @@ StateBLine_Context::~StateBLine_Context() // Restore layer clicking get_work_area()->allow_layer_clicks=prev_workarea_layer_status_; - // 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(); diff --git a/synfig-studio/trunk/src/gtkmm/state_circle.cpp b/synfig-studio/trunk/src/gtkmm/state_circle.cpp index d58a71b..2484e1a 100644 --- a/synfig-studio/trunk/src/gtkmm/state_circle.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_circle.cpp @@ -327,8 +327,8 @@ StateCircle_Context::StateCircle_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::StateCircle_Context::on_user_click)); @@ -363,9 +363,8 @@ StateCircle_Context::~StateCircle_Context() 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(); diff --git a/synfig-studio/trunk/src/gtkmm/state_draw.cpp b/synfig-studio/trunk/src/gtkmm/state_draw.cpp index 12ce73d..52af32d 100644 --- a/synfig-studio/trunk/src/gtkmm/state_draw.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_draw.cpp @@ -394,8 +394,8 @@ StateDraw_Context::StateDraw_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::StateDraw_Context::on_user_click)); @@ -468,9 +468,8 @@ StateDraw_Context::~StateDraw_Context() // Restore duck clicking get_work_area()->allow_duck_clicks=true; - // 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(); diff --git a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp index d4cf949..a49767d 100644 --- a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp @@ -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)); @@ -328,9 +328,8 @@ StateGradient_Context::~StateGradient_Context() 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(); diff --git a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp index f07e659..4701913 100644 --- a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp @@ -249,8 +249,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)); @@ -307,9 +307,8 @@ StatePolygon_Context::~StatePolygon_Context() 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(); diff --git a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp index 291cf9b..b934437 100644 --- a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp @@ -283,8 +283,8 @@ StateRectangle_Context::StateRectangle_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::StateRectangle_Context::on_user_click)); @@ -319,9 +319,8 @@ StateRectangle_Context::~StateRectangle_Context() 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(); diff --git a/synfig-studio/trunk/src/gtkmm/state_sketch.cpp b/synfig-studio/trunk/src/gtkmm/state_sketch.cpp index 32ab3d3..ad6985c 100644 --- a/synfig-studio/trunk/src/gtkmm/state_sketch.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_sketch.cpp @@ -350,8 +350,8 @@ StateSketch_Context::StateSketch_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::StateSketch_Context::on_user_click)); @@ -371,9 +371,8 @@ StateSketch_Context::~StateSketch_Context() // Restore duck clicking get_work_area()->allow_duck_clicks=true; - // 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(); diff --git a/synfig-studio/trunk/src/gtkmm/state_width.cpp b/synfig-studio/trunk/src/gtkmm/state_width.cpp index bc2d723..5af6765 100644 --- a/synfig-studio/trunk/src/gtkmm/state_width.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_width.cpp @@ -288,8 +288,8 @@ StateWidth_Context::StateWidth_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::StateWidth_Context::on_user_click)); @@ -341,9 +341,8 @@ StateWidth_Context::~StateWidth_Context() // Tool options be rid of ye!! 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(); diff --git a/synfig-studio/trunk/src/gtkmm/state_zoom.cpp b/synfig-studio/trunk/src/gtkmm/state_zoom.cpp index b32413d..6ff0224 100644 --- a/synfig-studio/trunk/src/gtkmm/state_zoom.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_zoom.cpp @@ -179,8 +179,8 @@ StateZoom_Context::StateZoom_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::StateZoom_Context::on_user_click)); @@ -215,9 +215,8 @@ StateZoom_Context::~StateZoom_Context() 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();