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
This commit is contained in:
Paul Davis 2013-10-27 20:48:48 -04:00
parent 632f5d5231
commit 5eaafaa3af

View File

@ -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);