From fa03eee79e830a54f63da9f8375c5168ba5928d9 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 15 Oct 2013 12:37:13 -0400 Subject: [PATCH] make the startup -> session dialog flow more sensible for brand new users --- gtk2_ardour/ardour_ui.cc | 15 +++++++++------ gtk2_ardour/startup.cc | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 18cba7af9b..3ee2c95689 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -718,6 +718,7 @@ ARDOUR_UI::starting () { Application* app = Application::instance (); char *nsm_url; + bool brand_new_user = ArdourStartup::required (); app->ShouldQuit.connect (sigc::mem_fun (*this, &ARDOUR_UI::queue_finish)); app->ShouldLoad.connect (sigc::mem_fun (*this, &ARDOUR_UI::idle_load)); @@ -778,17 +779,17 @@ ARDOUR_UI::starting () } } else { - - if (ArdourStartup::required()) { + + if (brand_new_user) { ArdourStartup s; s.present (); main().run(); s.hide (); switch (s.response ()) { - case Gtk::RESPONSE_REJECT: - return -1; - default: + case Gtk::RESPONSE_OK: break; + default: + return -1; } } @@ -804,7 +805,9 @@ ARDOUR_UI::starting () /* go get a session */ - if (get_session_parameters (false, ARDOUR_COMMAND_LINE::new_session, ARDOUR_COMMAND_LINE::load_template)) { + const bool new_session_required = (ARDOUR_COMMAND_LINE::new_session || brand_new_user); + + if (get_session_parameters (false, new_session_required, ARDOUR_COMMAND_LINE::load_template)) { return -1; } } diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc index 7bb9b2e295..8482a6cb22 100644 --- a/gtk2_ardour/startup.cc +++ b/gtk2_ardour/startup.cc @@ -243,6 +243,7 @@ Where would you like new %1 sessions to be stored by default?\n\n\ vbox->pack_start (*txt, false, false); vbox->pack_start (*hbox, false, true); + cerr << "set default folder to " << poor_mans_glob (Config->get_default_session_parent_dir()) << endl; default_dir_chooser->set_current_folder (poor_mans_glob (Config->get_default_session_parent_dir())); default_dir_chooser->signal_current_folder_changed().connect (sigc::mem_fun (*this, &ArdourStartup::default_dir_changed)); default_dir_chooser->show ();