From 5eaafaa3af5e2ab0cbcf4e4d947351fd133e381f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 27 Oct 2013 20:48:48 -0400 Subject: further fixes for NSM-based startup Most, move initialization of Audio/MIDI setup window before NSM initialization, to make sure it is available if/when needed --- gtk2_ardour/ardour_ui.cc | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 5dbdc32961..127927e80a 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -718,7 +718,7 @@ int ARDOUR_UI::starting () { Application* app = Application::instance (); - char *nsm_url; + const char *nsm_url; bool brand_new_user = ArdourStartup::required (); app->ShouldQuit.connect (sigc::mem_fun (*this, &ARDOUR_UI::queue_finish)); @@ -730,9 +730,17 @@ ARDOUR_UI::starting () app->ready (); - nsm_url = getenv ("NSM_URL"); + /* we need to create this early because it may need to set the + * audio backend end up. + */ + + try { + audio_midi_setup.get (true); + } catch (...) { + return -1; + } - if (nsm_url) { + if ((nsm_url = g_getenv ("NSM_URL")) != 0) { nsm = new NSM_Client; if (!nsm->init (nsm_url)) { nsm->announce (PROGRAM_NAME, ":dirty:", "ardour3"); @@ -809,16 +817,6 @@ ARDOUR_UI::starting () } } - /* we need to create this early because it may need to set the - * audio backend end up. - */ - - try { - audio_midi_setup.get (true); - } catch (...) { - return -1; - } - /* go get a session */ const bool new_session_required = (ARDOUR_COMMAND_LINE::new_session || brand_new_user); -- cgit v1.2.3