ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
: Gtkmm2ext::UI (PROGRAM_NAME, X_("gui"), argcp, argvp)
- , session_loaded (false)
, session_load_in_progress (false)
, gui_object_state (new GUIObjectState)
, primary_clock (new MainClock (X_("primary"), X_("transport"), true ))
}
}
- session_loaded = false;
-
loading_message (string_compose (_("Please wait while %1 loads your session"), PROGRAM_NAME));
try {
set_session (new_session);
- session_loaded = true;
-
if (_session) {
_session->set_clean ();
}
Session *new_session;
int x;
- session_loaded = false;
x = unload_session ();
if (x < 0) {
set_session (new_session);
- session_loaded = true;
-
new_session->save_state(new_session->name());
return 0;
void finish();
int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
- bool session_loaded;
bool session_load_in_progress;
int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile*);
bool session_is_new() const { return _session_is_new; }
blink_connection.disconnect ();
- delete _session;
+ ARDOUR::Session* session_to_delete = _session;
_session = 0;
-
- session_loaded = false;
+ delete session_to_delete;
update_title ();
void
Editor::instant_save ()
{
- if (!constructed || !ARDOUR_UI::instance()->session_loaded || no_save_instant) {
+ if (!constructed || no_save_instant) {
return;
}
//determine the text in the new folder selector
if (!ARDOUR_COMMAND_LINE::session_name.empty()) {
new_folder_chooser.set_current_folder (poor_mans_glob (Glib::path_get_dirname (ARDOUR_COMMAND_LINE::session_name)));
- } else if (ARDOUR_UI::instance()->session_loaded) {
+ } else if (ARDOUR_UI::instance()->the_session ()) {
// point the new session file chooser at the parent directory of the current session
string session_parent_dir = Glib::path_get_dirname(ARDOUR_UI::instance()->the_session()->path());
new_folder_chooser.set_current_folder (session_parent_dir);