Fix 1368904: disable the timebar instead of hiding it when switching to tools that...
authorpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 23 Mar 2007 02:39:21 +0000 (02:39 +0000)
committerpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 23 Mar 2007 02:39:21 +0000 (02:39 +0000)
git-svn-id: http://svn.voria.com/code@370 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/canvasview.cpp
synfig-studio/trunk/src/gtkmm/canvasview.h
synfig-studio/trunk/src/gtkmm/state_bline.cpp
synfig-studio/trunk/src/gtkmm/state_circle.cpp
synfig-studio/trunk/src/gtkmm/state_draw.cpp
synfig-studio/trunk/src/gtkmm/state_gradient.cpp
synfig-studio/trunk/src/gtkmm/state_polygon.cpp
synfig-studio/trunk/src/gtkmm/state_rectangle.cpp
synfig-studio/trunk/src/gtkmm/state_sketch.cpp
synfig-studio/trunk/src/gtkmm/state_width.cpp
synfig-studio/trunk/src/gtkmm/state_zoom.cpp

index 5269681..82b6f09 100644 (file)
@@ -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);
index c19d37e..ef1c9e1 100644 (file)
@@ -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();
 
index 41f8e04..c511366 100644 (file)
@@ -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();
index d58a71b..2484e1a 100644 (file)
@@ -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();
index 12ce73d..52af32d 100644 (file)
@@ -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();
index d4cf949..a49767d 100644 (file)
@@ -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();
index f07e659..4701913 100644 (file)
@@ -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();
index 291cf9b..b934437 100644 (file)
@@ -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();
index 32ab3d3..ad6985c 100644 (file)
@@ -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();
index bc2d723..5af6765 100644 (file)
@@ -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();
index b32413d..6ff0224 100644 (file)
@@ -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();