misc. startup/session load fixes
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 23 Apr 2009 19:28:17 +0000 (19:28 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 23 Apr 2009 19:28:17 +0000 (19:28 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@5000 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour_ui.cc
gtk2_ardour/startup.cc

index ee61f7ada98e93c88dedbca64f4cb36b45ab9c42..299bb38523e563a9131bb3cfddc1511a8c9feb85 100644 (file)
@@ -2286,12 +2286,14 @@ ARDOUR_UI::get_session_parameters (bool should_be_new)
                        break;
                }
                
-               session_path = Glib::build_filename (session_path, session_name);
-               
                if (Glib::file_test (session_path, Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
 
                        if (likely_new) {
-                               if (!ask_about_loading_existing_session (session_path)) {
+
+                               ustring existing = Glib::build_filename (session_path, session_name);
+                               
+                               if (!ask_about_loading_existing_session (existing)) {
+                                       ARDOUR_COMMAND_LINE::session_name = ""; // cancel that
                                        continue;
                                } 
                        } 
@@ -2301,8 +2303,7 @@ ARDOUR_UI::get_session_parameters (bool should_be_new)
                } else {
 
                        if (!likely_new) {
-                               MessageDialog msg (string_compose (_("There is no existing session called \"%1\""), 
-                                                                  ARDOUR_COMMAND_LINE::session_name));
+                               MessageDialog msg (string_compose (_("There is no existing session at \"%1\""), session_path));
                                msg.run ();
                                ARDOUR_COMMAND_LINE::session_name = ""; // cancel that
                                continue;
index c23f69164fc884eb31f15f1067989bae230cd4cf..876f96b29060523ee2460a725c48edfce354cbd5 100644 (file)
@@ -151,7 +151,9 @@ ArdourStartup::use_session_template ()
 Glib::ustring
 ArdourStartup::session_template_name ()
 {
-       string ret;
+       if (ic_existing_session_button.get_active()) {
+               return ustring();
+       }
 
        if (use_template_button.get_active()) {
                TreeModel::iterator iter = template_chooser.get_active ();