(void) theme_manager.get (true);
- starting.connect (sigc::mem_fun(*this, &ARDOUR_UI::startup));
- stopping.connect (sigc::mem_fun(*this, &ARDOUR_UI::shutdown));
-
_process_thread = new ProcessThread ();
_process_thread->init ();
ARDOUR_UI::~ARDOUR_UI ()
{
+ if (ui_config->dirty()) {
+ ui_config->save_state();
+ }
+
delete keyboard;
delete editor;
delete mixer;
#endif
}
-void
-ARDOUR_UI::startup ()
+int
+ARDOUR_UI::starting ()
{
Application* app = Application::instance ();
char *nsm_url;
s.hide ();
switch (s.response ()) {
case Gtk::RESPONSE_REJECT:
- exit (1);
+ return -1;
default:
break;
}
/* go get a session */
- if (get_session_parameters (true, ARDOUR_COMMAND_LINE::new_session, ARDOUR_COMMAND_LINE::load_template)) {
- exit (1);
+ if (get_session_parameters (false, ARDOUR_COMMAND_LINE::new_session, ARDOUR_COMMAND_LINE::load_template)) {
+ return -1;
}
}
_status_bar_visibility.update ();
BootMessage (string_compose (_("%1 is ready for use"), PROGRAM_NAME));
+ return 0;
}
void
should_be_new = false;
session_name = session_dialog.session_name (likely_new);
+ session_path = session_dialog.session_folder ();
if (nsm) {
likely_new = true;
_session_is_new = true;
}
+ cerr << "SN " << session_name << " SP " << session_path << endl;
+
if (session_name[0] == G_DIR_SEPARATOR ||
(session_name.length() > 2 && session_name[0] == '.' && session_name[1] == G_DIR_SEPARATOR) ||
(session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == G_DIR_SEPARATOR)) {
} else {
+ cerr << "Loading session with path = " << session_path << " name = " << session_name << " template " << template_name << endl;
+
ret = load_session (session_path, session_name, template_name);
if (ret == -2) {
/* drop connection to AudioEngine::Halted so that we don't act
* as if the engine unexpectedly shut down
*/
+
halt_connection.disconnect ();
if (AudioEngine::instance()->stop ()) {
return -1;
}
}
+
+