When 'use current frame' is checked in the render dialog, the Time tab is supposed...
[synfig.git] / synfig-studio / trunk / src / gtkmm / state_width.cpp
index 5af6765..6f63fe3 100644 (file)
@@ -55,6 +55,8 @@
 
 #include <ETL/clock>
 
+#include "general.h"
+
 #endif
 
 /* === U S I N G =========================================================== */
@@ -208,8 +210,8 @@ StateWidth_Context::reset()
 StateWidth_Context::StateWidth_Context(CanvasView* canvas_view):
        canvas_view_(canvas_view),
        is_working(*canvas_view),
-       prev_workarea_layer_clicking(get_work_area()->allow_layer_clicks),
-       prev_workarea_duck_clicking(get_work_area()->allow_duck_clicks),
+       prev_workarea_layer_clicking(get_work_area()->get_allow_layer_clicks()),
+       prev_workarea_duck_clicking(get_work_area()->get_allow_duck_clicks()),
        old_duckmask(get_work_area()->get_type_mask()),
 
        settings(synfigapp::Main::get_selected_input_device()->settings()),
@@ -243,7 +245,7 @@ StateWidth_Context::StateWidth_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();
@@ -278,7 +280,7 @@ StateWidth_Context::StateWidth_Context(CanvasView* canvas_view):
        }
 
        //Disable duck clicking for the maximum coolness :)
-       get_work_area()->allow_duck_clicks = false;
+       get_work_area()->set_allow_duck_clicks(false);
        get_work_area()->set_type_mask((Duck::Type)((int)Duck::TYPE_WIDTH + (int)Duck::TYPE_RADIUS));
 
        // Turn the mouse pointer to crosshairs
@@ -307,7 +309,7 @@ StateWidth_Context::refresh_tool_options()
 }
 
 Smach::event_result
-StateWidth_Context::event_refresh_tool_options(const Smach::event& x)
+StateWidth_Context::event_refresh_tool_options(const Smach::event& /*x*/)
 {
        refresh_tool_options();
        return Smach::RESULT_ACCEPT;
@@ -327,10 +329,10 @@ StateWidth_Context::~StateWidth_Context()
        }
 
        // Restore Duck clicking
-       get_work_area()->allow_duck_clicks = prev_workarea_duck_clicking;
+       get_work_area()->set_allow_duck_clicks(prev_workarea_duck_clicking);
 
        // Restore layer clicking
-       get_work_area()->allow_layer_clicks = prev_workarea_layer_clicking;
+       get_work_area()->set_allow_layer_clicks(prev_workarea_layer_clicking);
 
        // Restore the mouse pointer
        get_work_area()->reset_cursor();
@@ -354,13 +356,13 @@ StateWidth_Context::~StateWidth_Context()
 }
 
 Smach::event_result
-StateWidth_Context::event_stop_handler(const Smach::event& x)
+StateWidth_Context::event_stop_handler(const Smach::event& /*x*/)
 {
        throw Smach::egress_exception();
 }
 
 Smach::event_result
-StateWidth_Context::event_refresh_handler(const Smach::event& x)
+StateWidth_Context::event_refresh_handler(const Smach::event& /*x*/)
 {
        refresh_ducks();
        return Smach::RESULT_ACCEPT;
@@ -461,7 +463,7 @@ StateWidth_Context::event_mouse_handler(const Smach::event& x)
 {
        const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
 
-       //handle ze click
+       //handle the click
        if( (event.key == EVENT_WORKAREA_MOUSE_BUTTON_DOWN || event.key == EVENT_WORKAREA_MOUSE_BUTTON_DRAG)
                        && event.button == BUTTON_LEFT )
        {