X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_fill.cpp;h=51ab48833d4a750dbbf055a29f513a04948c39dc;hb=0962b310bc44fd9a2b4904db9b91185ff0bfd1ed;hp=5da8db20cf49d724c0a7c20544fca9458d4a724b;hpb=ce408de81ca266b1f334ee9bc6c8fb7ba1492ed4;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_fill.cpp b/synfig-studio/trunk/src/gtkmm/state_fill.cpp index 5da8db2..51ab488 100644 --- a/synfig-studio/trunk/src/gtkmm/state_fill.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_fill.cpp @@ -2,7 +2,7 @@ /*! \file state_fill.cpp ** \brief Template File ** -** $Id: state_fill.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 @@ -40,6 +40,8 @@ #include "canvasview.h" #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -61,7 +63,7 @@ class studio::StateFill_Context public: StateFill_Context(CanvasView *canvas_view); ~StateFill_Context(); - + Smach::event_result event_stop_handler(const Smach::event& x); Smach::event_result event_refresh_handler(const Smach::event& x); @@ -92,7 +94,7 @@ StateFill::StateFill(): insert(event_def(EVENT_STOP,&StateFill_Context::event_stop_handler)); insert(event_def(EVENT_REFRESH,&StateFill_Context::event_refresh_handler)); insert(event_def(EVENT_WORKAREA_LAYER_CLICKED,&StateFill_Context::event_workarea_layer_clicked_handler)); -} +} StateFill::~StateFill() { @@ -102,9 +104,9 @@ StateFill_Context::StateFill_Context(CanvasView *canvas_view): canvas_view(canvas_view), is_working(*canvas_view) { - synfig::info("Enterted Fill State"); + synfig::info("Entered Fill State"); canvas_view->work_area->set_cursor(Gdk::CROSSHAIR); - + App::toolbox->refresh(); } @@ -116,7 +118,7 @@ StateFill_Context::~StateFill_Context() } Smach::event_result -StateFill_Context::event_stop_handler(const Smach::event& x) +StateFill_Context::event_stop_handler(const Smach::event& /*x*/) { synfig::info("STATE FILL: Received Stop Event"); throw Smach::egress_exception(); @@ -125,7 +127,7 @@ StateFill_Context::event_stop_handler(const Smach::event& x) } Smach::event_result -StateFill_Context::event_refresh_handler(const Smach::event& x) +StateFill_Context::event_refresh_handler(const Smach::event& /*x*/) { synfig::info("STATE FILL: Received Refresh Event"); canvas_view->work_area->queue_render_preview(); @@ -144,7 +146,7 @@ StateFill_Context::event_workarea_layer_clicked_handler(const Smach::event& x) return Smach::RESULT_ACCEPT; } - + //synfigapp::Action::Handle action(synfigapp::Action::create("value_desc_set")); synfigapp::ValueDesc value_desc(event.layer,"color"); @@ -155,17 +157,17 @@ StateFill_Context::event_workarea_layer_clicked_handler(const Smach::event& x) } /* assert(action); - - action->set_param("canvas",get_canvas()); - action->set_param("canvas_interface",get_canvas_interface()); + + action->set_param("canvas",get_canvas()); + action->set_param("canvas_interface",get_canvas_interface()); action->set_param("value_desc",value_desc); action->set_param("time",get_canvas_interface()->get_time()); - //action->set_param("layer",event.layer); + //action->set_param("layer",event.layer); //if(!action->set_param("param",String("color"))) // synfig::error("LayerParamConnect didn't like \"param\""); if(!action->set_param("new_value",ValueBase(synfigapp::Main::get_foreground_color()))) synfig::error("LayerParamConnect didn't like \"foreground_color\""); - + if(!get_canvas_interface()->get_instance()->perform_action(action)) { get_canvas_view()->get_ui_interface()->warning(_("Unable to set layer color"));