summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-01-13 12:01:18 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-01-13 12:01:18 -0600
commit9d1fa8f820c365d58aab2a620b5d49d6ec5310e7 (patch)
tree761bcc9d7b1770e63996b93c7cfa79673acf3eb3 /gtk2_ardour/ardour_ui.cc
parente5ae620c0b92064dc78662f5426d396761f08097 (diff)
re-order startup process, registering actions early
Mostly to stop an error when UIConfiguration::map_parameters() looks for an action that has not yet been registered
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc32
1 files changed, 17 insertions, 15 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index d9a364441d..9843fb71db 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -376,6 +376,21 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
xmlSetGenericErrorFunc (this, libxml_generic_error_func);
xmlSetStructuredErrorFunc (this, libxml_structured_error_func);
+ /* Set this up early */
+
+ ActionManager::init ();
+
+ /* we like keyboards */
+
+ keyboard = new ArdourKeyboard(*this);
+
+ XMLNode* node = ARDOUR_UI::instance()->keyboard_settings();
+ if (node) {
+ keyboard->set_state (*node, Stateful::loading_state_version);
+ }
+
+ install_actions ();
+
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed));
boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
UIConfiguration::instance().map_parameters (pc);
@@ -439,23 +454,10 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
SessionEvent::create_per_thread_pool ("GUI", 4096);
- /* we like keyboards */
-
- keyboard = new ArdourKeyboard(*this);
-
- XMLNode* node = ARDOUR_UI::instance()->keyboard_settings();
- if (node) {
- keyboard->set_state (*node, Stateful::loading_state_version);
- }
-
UIConfiguration::instance().reset_dpi ();
TimeAxisViewItem::set_constant_heights ();
- /* Set this up so that our window proxies can register actions */
-
- ActionManager::init ();
-
/* The following must happen after ARDOUR::init() so that Config is set up */
const XMLNode* ui_xml = Config->extra_xml (X_("UI"));
@@ -5857,7 +5859,7 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
}
}
- DEBUG_TRACE (DEBUG::Accelerators, "\tnot yet handled, try global bindings\n");
+ DEBUG_TRACE (DEBUG::Accelerators, string_compose ("\tnot yet handled, try global bindings (%1)\n", global_bindings));
if (global_bindings && global_bindings->activate (k, Bindings::Press)) {
DEBUG_TRACE (DEBUG::Accelerators, "\t\thandled\n");
@@ -5907,7 +5909,7 @@ ARDOUR_UI::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey
}
}
- DEBUG_TRACE (DEBUG::Accelerators, "\tnot yet handled, try global bindings\n");
+ DEBUG_TRACE (DEBUG::Accelerators, string_compose ("\tnot yet handled, try global bindings (%1)\n", global_bindings));
if (global_bindings && global_bindings->activate (k, Bindings::Press)) {
DEBUG_TRACE (DEBUG::Accelerators, "\t\thandled\n");