add a new action to allow surfaces to access Keyboard::close_current_dialog()
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 17 Jun 2016 19:48:31 +0000 (15:48 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 27 Sep 2016 19:59:29 +0000 (14:59 -0500)
gtk2_ardour/ardour_ui.h
gtk2_ardour/ardour_ui_ed.cc

index 0222012c9a17d55b63030d4905151289ec3cb455..637cc117103242ac23f33bf86c064fb5ec475277 100644 (file)
@@ -892,6 +892,7 @@ private:
        void step_down_through_tabs ();
 
        void escape ();
+       void close_current_dialog ();
        void pre_release_dialog ();
 };
 
index c50beef9cd70d378e18f56872f258f90766f27db..a0960ded5f4344f89d1f4d2bdf04ded75a68b3af 100644 (file)
@@ -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<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 */