diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-05-25 16:45:21 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-05-25 16:45:21 +0000 |
commit | 6b19aee3b511eaae2800837175e9b9a931d325e7 (patch) | |
tree | 884dfd55ed65e94c1b713d51b366bfe14909e200 /libs/gtkmm2ext/actions.cc | |
parent | 2881a495ef8aa020a86ee761cac7a3ba74bcfc58 (diff) |
split out sndfile manager code into its own file; move a couple of utility functions into gtkmm2ext ; add knob PNG generating tool ; break appearance of monitor section for now
git-svn-id: svn://localhost/ardour2/branches/3.0@7160 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/actions.cc')
-rw-r--r-- | libs/gtkmm2ext/actions.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/actions.cc b/libs/gtkmm2ext/actions.cc index 1145987764..bff718e9b7 100644 --- a/libs/gtkmm2ext/actions.cc +++ b/libs/gtkmm2ext/actions.cc @@ -21,6 +21,7 @@ #include <vector> #include <string> #include <list> +#include <stdint.h> #include <gtk/gtkaccelmap.h> #include <gtk/gtkuimanager.h> @@ -32,6 +33,7 @@ #include "pbd/error.h" #include "gtkmm2ext/actions.h" +#include "gtkmm2ext/utils.h" #include "i18n.h" @@ -40,6 +42,7 @@ using namespace Gtk; using namespace Glib; using namespace sigc; using namespace PBD; +using namespace Gtkmm2ext; RefPtr<UIManager> ActionManager::ui_manager; string ActionManager::unbound_string = "--"; @@ -294,3 +297,17 @@ ActionManager::uncheck_toggleaction (const char * name) delete [] group_name; } + +string +ActionManager::get_key_representation (const string& accel_path, AccelKey& key) +{ + bool known = lookup_entry (accel_path, key); + + if (known) { + uint32_t k = possibly_translate_legal_accelerator_to_real_key (key.get_key()); + key = AccelKey (k, Gdk::ModifierType (key.get_mod())); + return ui_manager->get_accel_group()->name (key.get_key(), Gdk::ModifierType (key.get_mod())); + } + + return unbound_string; +} |