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:
parent
175036ea4e
commit
035074d1b7
|
@ -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 ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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>);
|
||||
|
||||
|
|
Loading…
Reference in New Issue