X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_normal.cpp;h=f2bb3b95c9d5a3db530b9a605577cbdad639cab3;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=1977f9f78e0162c272ad8d360682f7384a827510;hpb=837b63e9fb829d66d43f4f169861f8979f76820d;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_normal.cpp b/synfig-studio/trunk/src/gtkmm/state_normal.cpp index 1977f9f..f2bb3b9 100644 --- a/synfig-studio/trunk/src/gtkmm/state_normal.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_normal.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -41,6 +42,8 @@ #include #include #include "canvasview.h" +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -119,12 +122,12 @@ StateNormal::~StateNormal() StateNormal_Context::StateNormal_Context(CanvasView *canvas_view): canvas_view(canvas_view) { - synfig::info("Enterted Normal State"); + // synfig::info("Entered Normal State"); } StateNormal_Context::~StateNormal_Context() { - synfig::info("Left Normal State"); + // synfig::info("Left Normal State"); } void @@ -135,49 +138,49 @@ StateNormal_Context::refresh_tool_options() } Smach::event_result -StateNormal_Context::event_refresh_tool_options(const Smach::event& x) +StateNormal_Context::event_refresh_tool_options(const Smach::event& /*x*/) { refresh_tool_options(); return Smach::RESULT_ACCEPT; } Smach::event_result -StateNormal_Context::event_stop_handler(const Smach::event& x) +StateNormal_Context::event_stop_handler(const Smach::event& /*x*/) { - synfig::info("STATE NORMAL: Received Stop Event"); + // synfig::info("STATE NORMAL: Received Stop Event"); canvas_view->stop(); return Smach::RESULT_ACCEPT; } Smach::event_result -StateNormal_Context::event_refresh_handler(const Smach::event& x) +StateNormal_Context::event_refresh_handler(const Smach::event& /*x*/) { - synfig::info("STATE NORMAL: Received Refresh Event"); + // synfig::info("STATE NORMAL: Received Refresh Event"); canvas_view->rebuild_tables(); canvas_view->work_area->queue_render_preview(); return Smach::RESULT_ACCEPT; } Smach::event_result -StateNormal_Context::event_refresh_ducks_handler(const Smach::event& x) +StateNormal_Context::event_refresh_ducks_handler(const Smach::event& /*x*/) { - synfig::info("STATE NORMAL: Received Refresh Ducks"); + // synfig::info("STATE NORMAL: Received Refresh Ducks"); canvas_view->queue_rebuild_ducks(); return Smach::RESULT_ACCEPT; } Smach::event_result -StateNormal_Context::event_undo_handler(const Smach::event& x) +StateNormal_Context::event_undo_handler(const Smach::event& /*x*/) { - synfig::info("STATE NORMAL: Received Undo Event"); + // synfig::info("STATE NORMAL: Received Undo Event"); canvas_view->get_instance()->undo(); return Smach::RESULT_ACCEPT; } Smach::event_result -StateNormal_Context::event_redo_handler(const Smach::event& x) +StateNormal_Context::event_redo_handler(const Smach::event& /*x*/) { - synfig::info("STATE NORMAL: Received Redo Event"); + // synfig::info("STATE NORMAL: Received Redo Event"); canvas_view->get_instance()->redo(); return Smach::RESULT_ACCEPT; } @@ -185,7 +188,7 @@ StateNormal_Context::event_redo_handler(const Smach::event& x) Smach::event_result StateNormal_Context::event_mouse_button_down_handler(const Smach::event& x) { - synfig::info("STATE NORMAL: Received mouse button down Event"); + // synfig::info("STATE NORMAL: Received mouse button down Event"); const EventMouse& event(*reinterpret_cast(&x)); @@ -206,11 +209,11 @@ StateNormal_Context::event_layer_click(const Smach::event& x) if(event.layer) { - synfig::info("STATE NORMAL: Received layer click Event, \"%s\"",event.layer->get_name().c_str()); + // synfig::info("STATE NORMAL: Received layer click Event, \"%s\"",event.layer->get_name().c_str()); } else { - synfig::info("STATE NORMAL: Received layer click Event with an empty layer."); + // synfig::info("STATE NORMAL: Received layer click Event with an empty layer."); } switch(event.button) @@ -263,10 +266,8 @@ StateNormal_Context::edit_several_waypoints(std::list valu dialog.add_button(Gtk::StockID("gtk-cancel"),0); dialog.show(); - DEBUGPOINT(); if(dialog.run()==0) return; - DEBUGPOINT(); synfigapp::Action::PassiveGrouper group(get_canvas_interface()->get_instance().get(),_("Set Waypoints")); std::list::iterator iter; @@ -296,13 +297,13 @@ StateNormal_Context::edit_several_waypoints(std::list valu if(!value_desc.is_value_node()) { - action=synfigapp::Action::create("value_desc_connect"); + action=synfigapp::Action::create("ValueDescConnect"); action->set_param("dest",value_desc); action->set_param("src",ValueNode::Handle(value_node)); } else { - action=synfigapp::Action::create("value_node_replace"); + action=synfigapp::Action::create("ValueNodeReplace"); action->set_param("dest",value_desc.get_value_node()); action->set_param("src",ValueNode::Handle(value_node)); } @@ -328,11 +329,11 @@ StateNormal_Context::edit_several_waypoints(std::list valu if(value_node) { - synfigapp::Action::Handle action(synfigapp::Action::create("waypoint_set_smart")); + synfigapp::Action::Handle action(synfigapp::Action::create("WaypointSetSmart")); if(!action) { - get_canvas_view()->get_ui_interface()->error(_("Unable to find waypoint_set_smart action")); + get_canvas_view()->get_ui_interface()->error(_("Unable to find WaypointSetSmart action")); group.cancel(); return; } @@ -363,9 +364,9 @@ StateNormal_Context::edit_several_waypoints(std::list valu */ Smach::event_result -StateNormal_Context::event_multiple_ducks_clicked_handler(const Smach::event& x) +StateNormal_Context::event_multiple_ducks_clicked_handler(const Smach::event& /*x*/) { - synfig::info("STATE NORMAL: Received multiple duck click event"); + // synfig::info("STATE NORMAL: Received multiple duck click event"); //const EventMouse& event(*reinterpret_cast(&x)); @@ -395,6 +396,7 @@ StateNormal_Context::event_multiple_ducks_clicked_handler(const Smach::event& x) } Gtk::Menu *menu=manage(new Gtk::Menu()); + menu->signal_hide().connect(sigc::bind(sigc::ptr_fun(&delete_widget), menu)); canvas_view->get_instance()->make_param_menu(menu,canvas_view->get_canvas(),value_desc_list);