From 8fd4d32789b5abea974d7fe482e516d6437fcb44 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 17 Jun 2016 15:48:31 -0400 Subject: add a new action to allow surfaces to access Keyboard::close_current_dialog() --- gtk2_ardour/ardour_ui_ed.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gtk2_ardour/ardour_ui_ed.cc') 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 @@ -114,6 +114,12 @@ ARDOUR_UI::escape () Escape (); /* EMIT SIGNAL */ } +void +ARDOUR_UI::close_current_dialog () +{ + Keyboard::close_current_dialog (); +} + void ARDOUR_UI::install_actions () { @@ -122,6 +128,11 @@ ARDOUR_UI::install_actions () Glib::RefPtr 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 */ -- cgit v1.2.3