From b0f99312d8ae0ca33ce36c23deeed746bf953556 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 16 Feb 2019 01:12:07 -0700 Subject: [PATCH] get ordering correct of global binding set creation and action registration --- gtk2_ardour/ardour_ui.cc | 11 +++++++++++ gtk2_ardour/ardour_ui_dependents.cc | 16 ---------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 8b025f1c3a..25af678bd3 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -388,6 +388,17 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) keyboard->set_state (*node, Stateful::loading_state_version); } + /* actions do not need to be defined when we load keybindings. They + * will be lazily discovered. But bindings do need to exist when we + * create windows/tabs with their own binding sets. + */ + + keyboard->setup_keybindings (); + + if ((global_bindings = Bindings::get_bindings (X_("Global"))) == 0) { + error << _("Global keybindings are missing") << endmsg; + } + install_actions (); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed)); diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index dcf5761769..32384bda8e 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -66,15 +66,6 @@ using namespace Gtkmm2ext; void ARDOUR_UI::we_have_dependents () { - /* other windows and related key-event-handling contexts have already - * called Bindings::get_bindings() to setup their list of keybindings. - * Do that here for the global bindings. - */ - - if ((global_bindings = Bindings::get_bindings (X_("Global"))) == 0) { - error << _("Global keybindings are missing") << endmsg; - } - install_dependent_actions (); /* The monitor section relies on at least 1 action defined by us. Since that @@ -248,13 +239,6 @@ tab_window_root_drop (GtkNotebook* src, int ARDOUR_UI::setup_windows () { - /* actions do not need to be defined when we load keybindings. They - * will be lazily discovered. But bindings do need to exist when we - * create windows/tabs with their own binding sets. - */ - - keyboard->setup_keybindings (); - _tabs.set_show_border(false); _tabs.signal_switch_page().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_switch)); _tabs.signal_page_added().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_page_added));