From: Carlos Lopez Date: Mon, 14 Sep 2009 18:29:59 +0000 (+0200) Subject: Fix ACCEL keys. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=cd0e4bc37c4f10da91b8993bdfb02cc677e2f7e0;p=synfig.git Fix ACCEL keys. For some reason the Raise and Lower Layer seems not to work with the fix. --- diff --git a/synfig-studio/src/gtkmm/app.cpp b/synfig-studio/src/gtkmm/app.cpp index c25749b..47776c6 100644 --- a/synfig-studio/src/gtkmm/app.cpp +++ b/synfig-studio/src/gtkmm/app.cpp @@ -1059,79 +1059,79 @@ init_ui_manager() } // the toolbox - ACCEL("a", "//state-normal" ); - ACCEL("v", "//state-smooth_move" ); - ACCEL("s", "//state-scale" ); - ACCEL("t", "//state-rotate" ); - ACCEL("m", "//state-mirror" ); - ACCEL("c", "//state-circle" ); - ACCEL("r", "//state-rectangle" ); - ACCEL("q", "//state-star" ); - ACCEL("g", "//state-gradient" ); - ACCEL("p", "//state-polygon" ); - ACCEL("b", "//state-bline" ); - ACCEL("x", "//state-text" ); - ACCEL("f", "//state-fill" ); - ACCEL("e", "//state-eyedrop" ); - ACCEL("z", "//state-zoom" ); - ACCEL("d", "//state-draw" ); - ACCEL("k", "//state-sketch" ); - ACCEL("w", "//state-width" ); + ACCEL("a", "/action_group_state_manager/state-normal" ); + ACCEL("v", "/action_group_state_manager/state-smooth_move" ); + ACCEL("s", "/action_group_state_manager/state-scale" ); + ACCEL("t", "/action_group_state_manager/state-rotate" ); + ACCEL("m", "/action_group_state_manager/state-mirror" ); + ACCEL("c", "/action_group_state_manager/state-circle" ); + ACCEL("r", "/action_group_state_manager/state-rectangle" ); + ACCEL("q", "/action_group_state_manager/state-star" ); + ACCEL("g", "/action_group_state_manager/state-gradient" ); + ACCEL("p", "/action_group_state_manager/state-polygon" ); + ACCEL("b", "/action_group_state_manager/state-bline" ); + ACCEL("x", "/action_group_state_manager/state-text" ); + ACCEL("f", "/action_group_state_manager/state-fill" ); + ACCEL("e", "/action_group_state_manager/state-eyedrop" ); + ACCEL("z", "/action_group_state_manager/state-zoom" ); + ACCEL("d", "/action_group_state_manager/state-draw" ); + ACCEL("k", "/action_group_state_manager/state-sketch" ); + ACCEL("w", "/action_group_state_manager/state-width" ); // everything else - ACCEL("a", "//select-all-ducks" ); - ACCEL("d", "//unselect-all-ducks" ); - ACCEL("a", "//select-all-layers" ); - ACCEL("d", "//unselect-all-layers" ); - ACCEL("F9", "//render" ); - ACCEL("F11", "//preview" ); - ACCEL("F8", "//properties" ); - ACCEL("F12", "//options" ); - ACCEL("i", "//import" ); - ACCEL2(Gtk::AccelKey(GDK_Escape,static_cast(0), "//stop" )); - ACCEL("g", "//toggle-grid-show" ); - ACCEL("l", "//toggle-grid-snap" ); - ACCEL2(Gtk::AccelKey('`',Gdk::CONTROL_MASK, "//toggle-low-res" )); - ACCEL("1", "//mask-position-ducks" ); - ACCEL("2", "//mask-vertex-ducks" ); - ACCEL("3", "//mask-tangent-ducks" ); - ACCEL("4", "//mask-radius-ducks" ); - ACCEL("5", "//mask-width-ducks" ); - ACCEL("6", "//mask-angle-ducks" ); - ACCEL2(Gtk::AccelKey(GDK_Page_Up,Gdk::SHIFT_MASK, "//action-LayerRaise" )); - ACCEL2(Gtk::AccelKey(GDK_Page_Down,Gdk::SHIFT_MASK, "//action-LayerLower" )); - ACCEL("1", "//quality-01" ); - ACCEL("2", "//quality-02" ); - ACCEL("3", "//quality-03" ); - ACCEL("4", "//quality-04" ); - ACCEL("5", "//quality-05" ); - ACCEL("6", "//quality-06" ); - ACCEL("7", "//quality-07" ); - ACCEL("8", "//quality-08" ); - ACCEL("9", "//quality-09" ); - ACCEL("0", "//quality-10" ); - ACCEL("z", "//undo" ); - ACCEL("r", "//redo" ); - ACCEL2(Gtk::AccelKey(GDK_Delete,Gdk::CONTROL_MASK, "//action-LayerRemove" )); - ACCEL2(Gtk::AccelKey('(',Gdk::CONTROL_MASK, "//decrease-low-res-pixel-size" )); - ACCEL2(Gtk::AccelKey(')',Gdk::CONTROL_MASK, "//increase-low-res-pixel-size" )); - ACCEL2(Gtk::AccelKey('(',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "//amount-dec" )); - ACCEL2(Gtk::AccelKey(')',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "//amount-inc" )); - ACCEL2(Gtk::AccelKey(']',Gdk::CONTROL_MASK, "//jump-next-keyframe" )); - ACCEL2(Gtk::AccelKey('[',Gdk::CONTROL_MASK, "//jump-prev-keyframe" )); - ACCEL2(Gtk::AccelKey('=',Gdk::CONTROL_MASK, "//canvas-zoom-in" )); - ACCEL2(Gtk::AccelKey('-',Gdk::CONTROL_MASK, "//canvas-zoom-out" )); - ACCEL2(Gtk::AccelKey('+',Gdk::CONTROL_MASK, "//time-zoom-in" )); - ACCEL2(Gtk::AccelKey('_',Gdk::CONTROL_MASK, "//time-zoom-out" )); - ACCEL2(Gtk::AccelKey('.',Gdk::CONTROL_MASK, "//seek-next-frame" )); - ACCEL2(Gtk::AccelKey(',',Gdk::CONTROL_MASK, "//seek-prev-frame" )); - ACCEL2(Gtk::AccelKey('>',Gdk::CONTROL_MASK, "//seek-next-second" )); - ACCEL2(Gtk::AccelKey('<',Gdk::CONTROL_MASK, "//seek-prev-second" )); - ACCEL("o", "//toggle-onion-skin" ); - ACCEL("z", "//canvas-zoom-fit" ); - ACCEL("p", "//play" ); - ACCEL("Home", "//seek-begin" ); - ACCEL("End", "//seek-end" ); + ACCEL("a", "/canvasview/select-all-ducks" ); + ACCEL("d", "/canvasview/unselect-all-ducks" ); + ACCEL("a", "/canvasview/select-all-layers" ); + ACCEL("d", "/canvasview/unselect-all-layers" ); + ACCEL("F9", "/canvasview/render" ); + ACCEL("F11", "/canvasview/preview" ); + ACCEL("F8", "/canvasview/properties" ); + ACCEL("F12", "/canvasview/options" ); + ACCEL("i", "/canvasview/import" ); + ACCEL2(Gtk::AccelKey(GDK_Escape,static_cast(0), "/canvasview/stop" )); + ACCEL("g", "/canvasview/toggle-grid-show" ); + ACCEL("l", "/canvasview/toggle-grid-snap" ); + ACCEL2(Gtk::AccelKey('`',Gdk::CONTROL_MASK, "/canvasview/toggle-low-res" )); + ACCEL("1", "/canvasview/mask-position-ducks" ); + ACCEL("2", "/canvasview/mask-vertex-ducks" ); + ACCEL("3", "/canvasview/mask-tangent-ducks" ); + ACCEL("4", "/canvasview/mask-radius-ducks" ); + ACCEL("5", "/canvasview/mask-width-ducks" ); + ACCEL("6", "/canvasview/mask-angle-ducks" ); + ACCEL2(Gtk::AccelKey(GDK_Page_Up,Gdk::SHIFT_MASK, "/action_group_layer_ops/action-LayerRaise" )); + ACCEL2(Gtk::AccelKey(GDK_Page_Down,Gdk::SHIFT_MASK, "/action_group_layer_ops/action-LayerLower" )); + ACCEL("1", "/canvasview/quality-01" ); + ACCEL("2", "/canvasview/quality-02" ); + ACCEL("3", "/canvasview/quality-03" ); + ACCEL("4", "/canvasview/quality-04" ); + ACCEL("5", "/canvasview/quality-05" ); + ACCEL("6", "/canvasview/quality-06" ); + ACCEL("7", "/canvasview/quality-07" ); + ACCEL("8", "/canvasview/quality-08" ); + ACCEL("9", "/canvasview/quality-09" ); + ACCEL("0", "/canvasview/quality-10" ); + ACCEL("z", "/action_group_dock_history/undo" ); + ACCEL("r", "/action_group_dock_history/redo" ); + ACCEL2(Gtk::AccelKey(GDK_Delete,Gdk::CONTROL_MASK, "/action_group_layer_action_manager/action-LayerRemove" )); + ACCEL2(Gtk::AccelKey('(',Gdk::CONTROL_MASK, "/canvasview/decrease-low-res-pixel-size" )); + ACCEL2(Gtk::AccelKey(')',Gdk::CONTROL_MASK, "/canvasview/increase-low-res-pixel-size" )); + ACCEL2(Gtk::AccelKey('(',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "/action_group_layer_action_manager/amount-dec" )); + ACCEL2(Gtk::AccelKey(')',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "/action_group_layer_action_manager/amount-inc" )); + ACCEL2(Gtk::AccelKey(']',Gdk::CONTROL_MASK, "/canvasview/jump-next-keyframe" )); + ACCEL2(Gtk::AccelKey('[',Gdk::CONTROL_MASK, "/canvasview/jump-prev-keyframe" )); + ACCEL2(Gtk::AccelKey('=',Gdk::CONTROL_MASK, "/canvasview/canvas-zoom-in" )); + ACCEL2(Gtk::AccelKey('-',Gdk::CONTROL_MASK, "/canvasview/canvas-zoom-out" )); + ACCEL2(Gtk::AccelKey('+',Gdk::CONTROL_MASK, "/canvasview/time-zoom-in" )); + ACCEL2(Gtk::AccelKey('_',Gdk::CONTROL_MASK, "/canvasview/time-zoom-out" )); + ACCEL2(Gtk::AccelKey('.',Gdk::CONTROL_MASK, "/canvasview/seek-next-frame" )); + ACCEL2(Gtk::AccelKey(',',Gdk::CONTROL_MASK, "/canvasview/seek-prev-frame" )); + ACCEL2(Gtk::AccelKey('>',Gdk::CONTROL_MASK, "/canvasview/seek-next-second" )); + ACCEL2(Gtk::AccelKey('<',Gdk::CONTROL_MASK, "/canvasview/seek-prev-second" )); + ACCEL("o", "/canvasview/toggle-onion-skin" ); + ACCEL("z", "/canvasview/canvas-zoom-fit" ); + ACCEL("p", "/canvasview/play" ); + ACCEL("Home", "/canvasview/seek-begin" ); + ACCEL("End", "/canvasview/seek-end" ); #undef ACCEL } diff --git a/synfig-studio/src/gtkmm/canvasview.cpp b/synfig-studio/src/gtkmm/canvasview.cpp index e7eeab4..bc0cde5 100644 --- a/synfig-studio/src/gtkmm/canvasview.cpp +++ b/synfig-studio/src/gtkmm/canvasview.cpp @@ -1425,7 +1425,7 @@ CanvasView::init_menus() - canvasmenu - viewmenu */ - action_group = Gtk::ActionGroup::create("mainmenu"); + action_group = Gtk::ActionGroup::create("canvasview"); //action_group->add( Gtk::Action::create("MenuFile", _("_File")) ); action_group->add( Gtk::Action::create("new", Gtk::Stock::NEW),