diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-17 16:07:11 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-17 16:07:11 +0000 |
commit | 02a1879450e5cbee96890097bac79d13d5e5270a (patch) | |
tree | 791b0c50171918890199a2bf82205f820b31d6d0 /libs | |
parent | 4cca76853396f5c4090c3be547b0df4b5f0d02d0 (diff) |
add back semantically-different version of previously removed ::get_action() function
git-svn-id: svn://localhost/ardour2/branches/3.0@11995 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/actions.cc | 14 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/actions.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/actions.cc b/libs/gtkmm2ext/actions.cc index 1380d49ae8..774991038e 100644 --- a/libs/gtkmm2ext/actions.cc +++ b/libs/gtkmm2ext/actions.cc @@ -244,6 +244,20 @@ ActionManager::get_widget (const char * name) } RefPtr<Action> +ActionManager::get_action (const char* path) +{ + char copy[strlen(path)+1]; + strcpy (copy, path); + char *slash = strchr (copy, '/'); + if (!slash) { + return RefPtr<Action> (); + } + *slash = '\0'; + return get_action (copy, ++slash); + +} + +RefPtr<Action> ActionManager::get_action (const char* group_name, const char* action_name) { /* the C++ API for functions used here appears to be broken in diff --git a/libs/gtkmm2ext/gtkmm2ext/actions.h b/libs/gtkmm2ext/gtkmm2ext/actions.h index 0f382898c7..0c53e9c10d 100644 --- a/libs/gtkmm2ext/gtkmm2ext/actions.h +++ b/libs/gtkmm2ext/gtkmm2ext/actions.h @@ -42,6 +42,7 @@ namespace ActionManager { extern Gtk::Widget* get_widget (const char * name); extern Glib::RefPtr<Gtk::Action> get_action (const char* group, const char* name); + extern Glib::RefPtr<Gtk::Action> get_action (const char* path); extern void do_action (const char* group, const char* name); extern void set_toggle_action (const char* group, const char* name, bool); |