mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
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
2 changed files with 11 additions and 0 deletions
|
|
@ -343,3 +343,13 @@ ActionManager::get_key_representation (const string& accel_path, AccelKey& key)
|
||||||
|
|
||||||
return unbound_string;
|
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 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* group, const char* name);
|
||||||
extern Glib::RefPtr<Gtk::Action> get_action (const char* path);
|
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>);
|
extern void add_action_group (Glib::RefPtr<Gtk::ActionGroup>);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue