From: dooglus Date: Sun, 1 Apr 2007 16:46:08 +0000 (+0000) Subject: Prettied up the layout of the ACCEL and ACCEL2 macros. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8f8a2139a0a6f405a4186dc05a4c1eca787794e4;p=synfig.git Prettied up the layout of the ACCEL and ACCEL2 macros. git-svn-id: http://svn.voria.com/code@408 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 049ab0b..b201fa9 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -962,8 +962,18 @@ init_ui_manager() } // Add default keyboard accelerators -#define ACCEL(path,accel) { Gtk::AccelKey accel_key(accel,path); Gtk::AccelMap::add_entry(accel_key.get_path(), accel_key.get_key(),accel_key.get_mod()); } -#define ACCEL2(accel) { Gtk::AccelKey accel_key(accel); Gtk::AccelMap::add_entry(accel_key.get_path(), accel_key.get_key(),accel_key.get_mod()); } +#define ACCEL(path,accel) \ + { \ + Gtk::AccelKey accel_key(accel,path); \ + Gtk::AccelMap::add_entry(accel_key.get_path(), accel_key.get_key(), accel_key.get_mod()); \ + } + +#define ACCEL2(accel) \ + { \ + Gtk::AccelKey accel_key(accel); \ + Gtk::AccelMap::add_entry(accel_key.get_path(), accel_key.get_key(), accel_key.get_mod()); \ + } + ACCEL("//select-all-ducks","a"); ACCEL("//unselect-all-layers","d"); ACCEL("//render","F9"); @@ -982,7 +992,6 @@ init_ui_manager() ACCEL("//mask-width-ducks", "5"); ACCEL("//mask-angle-ducks", "6"); - ACCEL2(Gtk::AccelKey(GDK_Page_Up,Gdk::SHIFT_MASK,"//action-layer_raise")); ACCEL2(Gtk::AccelKey(GDK_Page_Down,Gdk::SHIFT_MASK,"//action-layer_lower"));