From 949163f80610af76edc2c1878dfb00bae2de316a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 10 Aug 2015 14:31:59 -0400 Subject: more changes to Bindings, Keyboard APIs --- gtk2_ardour/ardour_ui_dependents.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gtk2_ardour/ardour_ui_dependents.cc') diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index c4762c6b96..7f75c174eb 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -31,6 +31,8 @@ #include "ardour/session.h" +#include "gtkmm2ext/bindings.h" + #include "actions.h" #include "ardour_ui.h" #include "public_editor.h" @@ -62,6 +64,25 @@ ARDOUR_UI::we_have_dependents () ProcessorBox::register_actions (); + /* Global, editor, mixer, processor box actions are defined now. Link + them with any bindings, so that GTK does not get a chance to define + the GTK accel map entries first when we ask the GtkUIManager to + create menus/widgets. + + If GTK adds the actions to its accel map before we do, we lose our + freedom to use any keys. More precisely, we can use any keys, but + ones that GTK considers illegal as accelerators will not show up in + menus. + + There are other dynamic actions that can be created by a monitor + section, by step entry dialogs. These need to be handled + separately. They don't tend to use GTK-illegal bindings and more + importantly they don't have menus showing the bindings, so it is + less of an issue. + */ + + Gtkmm2ext::Bindings::associate_all (); + editor->setup_tooltips (); editor->UpdateAllTransportClocks.connect (sigc::mem_fun (*this, &ARDOUR_UI::update_transport_clocks)); -- cgit v1.2.3