Added the icon for type Time to the code. Sorted the INIT_STOCK_ICON lines for the...
[synfig.git] / synfig-studio / trunk / src / gtkmm / state_zoom.cpp
index b32413d..66b8d4e 100644 (file)
@@ -1,6 +1,6 @@
 /* === S Y N F I G ========================================================= */
 /*!    \file state_zoom.cpp
-**     \brief Zoom Toole Implementation File
+**     \brief Zoom Tool Implementation File
 **
 **     $Id$
 **
@@ -45,6 +45,8 @@
 #include "toolbox.h"
 #include <synfigapp/main.h>
 
+#include "general.h"
+
 #endif
 
 /* === U S I N G =========================================================== */
@@ -153,7 +155,7 @@ StateZoom_Context::reset()
 StateZoom_Context::StateZoom_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()),
        settings(synfigapp::Main::get_selected_input_device()->settings())
 {
        // Set up the tool options dialog
@@ -167,7 +169,7 @@ StateZoom_Context::StateZoom_Context(CanvasView* canvas_view):
        App::dialog_tool_options->present();
 
        // 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(); //???
@@ -179,8 +181,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));
@@ -199,7 +201,7 @@ StateZoom_Context::refresh_tool_options()
 }
 
 Smach::event_result
-StateZoom_Context::event_refresh_tool_options(const Smach::event& x)
+StateZoom_Context::event_refresh_tool_options(const Smach::event& /*x*/)
 {
        refresh_tool_options();
        return Smach::RESULT_ACCEPT;
@@ -210,14 +212,13 @@ StateZoom_Context::~StateZoom_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_);
        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();
@@ -231,13 +232,13 @@ StateZoom_Context::~StateZoom_Context()
 }
 
 Smach::event_result
-StateZoom_Context::event_stop_handler(const Smach::event& x)
+StateZoom_Context::event_stop_handler(const Smach::event& /*x*/)
 {
        throw Smach::egress_exception();
 }
 
 Smach::event_result
-StateZoom_Context::event_refresh_handler(const Smach::event& x)
+StateZoom_Context::event_refresh_handler(const Smach::event& /*x*/)
 {
        return Smach::RESULT_ACCEPT;
 }