mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
when saving an unnamed session, rename it
Note that this is done at the GUI level, might need to double check if there are other paths into a "save" that should be covered. Control surfaces use the action, but Lua comes to mind
This commit is contained in:
parent
e9be6c23a8
commit
5f1d802307
2 changed files with 5 additions and 5 deletions
|
|
@ -243,7 +243,7 @@ public:
|
||||||
bool cannot_save () const { return _state_of_the_state & CannotSave; }
|
bool cannot_save () const { return _state_of_the_state & CannotSave; }
|
||||||
bool in_cleanup () const { return _state_of_the_state & InCleanup; }
|
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 () { return _state_of_the_state & (InitialConnecting | Deletion); }
|
||||||
bool not_named() const;
|
bool unnamed() const;
|
||||||
|
|
||||||
PBD::Signal0<void> DirtyChanged;
|
PBD::Signal0<void> DirtyChanged;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -950,9 +950,6 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot
|
||||||
remove_pending_capture_state ();
|
remove_pending_capture_state ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove unnamed file name, if any (it's not an error if it doesn't exist */
|
|
||||||
::g_unlink (unnamed_file_name().c_str());
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4535,6 +4532,9 @@ Session::rename (const std::string& new_name)
|
||||||
|
|
||||||
store_recent_sessions (new_name, _path);
|
store_recent_sessions (new_name, _path);
|
||||||
|
|
||||||
|
/* remove unnamed file name, if any (it's not an error if it doesn't exist) */
|
||||||
|
::g_unlink (unnamed_file_name().c_str());
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5657,7 +5657,7 @@ Session::unnamed_file_name() const
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Session::not_named() const
|
Session::unnamed() const
|
||||||
{
|
{
|
||||||
return Glib::file_test (unnamed_file_name(), Glib::FILE_TEST_EXISTS);
|
return Glib::file_test (unnamed_file_name(), Glib::FILE_TEST_EXISTS);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue