diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-17 15:48:31 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-27 14:59:29 -0500 |
commit | 8fd4d32789b5abea974d7fe482e516d6437fcb44 (patch) | |
tree | aefa6f401d502301ac211bafe38ec591e39722b4 /gtk2_ardour | |
parent | 4847544144c00a68ed836c3964a37af5bba8d9e2 (diff) |
add a new action to allow surfaces to access Keyboard::close_current_dialog()
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 0222012c9a..637cc11710 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -892,6 +892,7 @@ private: void step_down_through_tabs (); void escape (); + void close_current_dialog (); void pre_release_dialog (); }; diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index c50beef9cd..a0960ded5f 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -115,6 +115,12 @@ ARDOUR_UI::escape () } void +ARDOUR_UI::close_current_dialog () +{ + Keyboard::close_current_dialog (); +} + +void ARDOUR_UI::install_actions () { Glib::RefPtr<ActionGroup> main_actions = global_actions.create_action_group (X_("Main")); @@ -122,6 +128,11 @@ ARDOUR_UI::install_actions () Glib::RefPtr<Action> act; global_actions.register_action (main_actions, X_("Escape"), _("Escape"), sigc::mem_fun (*this, &ARDOUR_UI::escape)); + /* This is hard-wired into the Keyboard code as "Primary-w". Maybe it + doesn't need to be. This action makes it possible to do this from a + control surface. + */ + global_actions.register_action (main_actions, X_("close-current-dialog"), _("Close Current Dialog"), sigc::mem_fun (*this, &ARDOUR_UI::close_current_dialog)); /* menus + submenus that need action items */ |