provide ActionManager::do_action() as a way to trigger any action item as if the user has asked for it via some UI proxy

git-svn-id: svn://localhost/ardour2/branches/3.0@11332 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-01-24 16:19:38 +00:00
parent 175036ea4e
commit 035074d1b7
2 changed files with 11 additions and 0 deletions

View File

@ -343,3 +343,13 @@ ActionManager::get_key_representation (const string& accel_path, AccelKey& key)
return unbound_string;
}
void
ActionManager::do_action (const char* group, const char*action)
{
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (group, action);
if (act) {
act->activate ();
}
}

View File

@ -43,6 +43,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 add_action_group (Glib::RefPtr<Gtk::ActionGroup>);