From 1157c7d45704cdea7392c962caade327405fd6eb Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 25 Mar 2020 10:24:47 -0600 Subject: if user chooses not to delete a scratch session, removed the file that identifies it as unnamed This way they will not be asked again if they reload and then quit the session --- libs/ardour/ardour/session.h | 4 +++- libs/ardour/session_state.cc | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'libs/ardour') diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 64b12fd0a0..928d2d64e0 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -242,9 +242,11 @@ public: bool loading () const { return _state_of_the_state & Loading; } bool cannot_save () const { return _state_of_the_state & CannotSave; } bool in_cleanup () const { return _state_of_the_state & InCleanup; } - bool inital_connect_or_deletion_in_progress () { return _state_of_the_state & (InitialConnecting | Deletion); } + bool inital_connect_or_deletion_in_progress () const { return _state_of_the_state & (InitialConnecting | Deletion); } bool unnamed() const; + void end_unnamed_status () const; + PBD::Signal0 DirtyChanged; const SessionDirectory& session_directory () const { return *(_session_dir.get()); } diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index df4922a4ae..59265baefe 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -5661,3 +5661,9 @@ Session::unnamed() const { return Glib::file_test (unnamed_file_name(), Glib::FILE_TEST_EXISTS); } + +void +Session::end_unnamed_status () const +{ + ::g_remove (unnamed_file_name().c_str()); +} -- cgit v1.2.3