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
This commit is contained in:
Paul Davis 2012-04-17 16:07:11 +00:00
parent 4cca768533
commit 02a1879450
2 changed files with 15 additions and 0 deletions

View File

@ -243,6 +243,20 @@ ActionManager::get_widget (const char * name)
return ui_manager->get_widget (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)
{

View File

@ -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);