mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
history snapshot name
git-svn-id: svn://localhost/ardour2/branches/undo@784 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
74b19eadfa
commit
a1aa6d2ae1
11 changed files with 26 additions and 18 deletions
|
|
@ -455,7 +455,7 @@ conf.CheckLib ('FLAC', 'FLAC__stream_decoder_new', language='CXX')
|
|||
libraries['flac'] = conf.Finish ()
|
||||
|
||||
# or if that fails...
|
||||
#libraries['flac'] = LibraryInfo (LIBS='FLAC')
|
||||
libraries['flac'] = LibraryInfo (LIBS='FLAC')
|
||||
|
||||
#
|
||||
# Check for liblo
|
||||
|
|
|
|||
|
|
@ -1298,7 +1298,7 @@ ARDOUR_UI::start_engine ()
|
|||
settings for a new session
|
||||
*/
|
||||
session->save_state ("");
|
||||
session->save_history ();
|
||||
session->save_history ("");
|
||||
}
|
||||
|
||||
/* there is too much going on, in too many threads, for us to
|
||||
|
|
@ -1472,7 +1472,7 @@ ARDOUR_UI::save_state_canfail (string name)
|
|||
}
|
||||
|
||||
if ((ret = session->save_state (name)) != 0) {
|
||||
session->save_history();
|
||||
session->save_history (name);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ ARDOUR_UI::unload_session ()
|
|||
|
||||
case 1:
|
||||
session->save_state ("");
|
||||
session->save_history();
|
||||
session->save_history ("");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ class Session : public sigc::trackable, public Stateful
|
|||
int save_state (string snapshot_name, bool pending = false);
|
||||
int restore_state (string snapshot_name);
|
||||
int save_template (string template_name);
|
||||
int save_history ();
|
||||
int save_history (string snapshot_name = "");
|
||||
|
||||
static int rename_template (string old_name, string new_name);
|
||||
|
||||
|
|
|
|||
|
|
@ -1011,7 +1011,7 @@ Session::auto_punch_start_changed (Location* location)
|
|||
if (get_record_enabled() && get_punch_in()) {
|
||||
/* capture start has been changed, so save new pending state */
|
||||
save_state ("", true);
|
||||
save_history();
|
||||
save_history("");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1329,7 +1329,7 @@ Session::maybe_enable_record ()
|
|||
*/
|
||||
|
||||
save_state ("", true);
|
||||
save_history();
|
||||
save_history ("");
|
||||
|
||||
if (_transport_speed) {
|
||||
if (!punch_in) {
|
||||
|
|
@ -1893,6 +1893,7 @@ Session::add_route (shared_ptr<Route> route)
|
|||
|
||||
set_dirty();
|
||||
save_state (_current_snapshot_name);
|
||||
save_history (_current_snapshot_name);
|
||||
|
||||
RouteAdded (route); /* EMIT SIGNAL */
|
||||
}
|
||||
|
|
@ -1924,7 +1925,7 @@ Session::add_diskstream (Diskstream* dstream)
|
|||
|
||||
set_dirty();
|
||||
save_state (_current_snapshot_name);
|
||||
save_history();
|
||||
save_history (_current_snapshot_name);
|
||||
|
||||
DiskstreamAdded (dstream); /* EMIT SIGNAL */
|
||||
}
|
||||
|
|
@ -1989,6 +1990,7 @@ Session::remove_route (shared_ptr<Route> route)
|
|||
/* XXX should we disconnect from the Route's signals ? */
|
||||
|
||||
save_state (_current_snapshot_name);
|
||||
save_history (_current_snapshot_name);
|
||||
|
||||
/* all shared ptrs to route should go out of scope here */
|
||||
}
|
||||
|
|
@ -2677,7 +2679,7 @@ Session::remove_source (Source* source)
|
|||
*/
|
||||
|
||||
save_state (_current_snapshot_name);
|
||||
save_history();
|
||||
save_history (_current_snapshot_name);
|
||||
}
|
||||
|
||||
SourceRemoved(source); /* EMIT SIGNAL */
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ Command *Session::memento_command_factory(XMLNode *n)
|
|||
{
|
||||
PBD::ID id;
|
||||
XMLNode *before, *after;
|
||||
void *obj;
|
||||
|
||||
/* get obj_id */
|
||||
|
||||
|
|
|
|||
|
|
@ -594,6 +594,7 @@ Session::mmc_record_strobe (MIDI::MachineControl &mmc)
|
|||
*/
|
||||
|
||||
save_state ("", true);
|
||||
save_history ("");
|
||||
g_atomic_int_set (&_record_status, Enabled);
|
||||
RecordStateChanged (); /* EMIT SIGNAL */
|
||||
|
||||
|
|
|
|||
|
|
@ -608,7 +608,7 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial
|
|||
_state_of_the_state = Clean;
|
||||
|
||||
if (save_state (_current_snapshot_name)) {
|
||||
save_history();
|
||||
save_history (_current_snapshot_name);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1691,7 +1691,7 @@ Session::set_state (const XMLNode& node)
|
|||
|
||||
if (state_was_pending) {
|
||||
save_state (_current_snapshot_name);
|
||||
save_history();
|
||||
save_history (_current_snapshot_name);
|
||||
remove_pending_capture_state ();
|
||||
state_was_pending = false;
|
||||
}
|
||||
|
|
@ -2479,7 +2479,7 @@ void
|
|||
Session::auto_save()
|
||||
{
|
||||
save_state (_current_snapshot_name);
|
||||
save_history();
|
||||
save_history (_current_snapshot_name);
|
||||
}
|
||||
|
||||
RouteGroup *
|
||||
|
|
@ -3151,6 +3151,7 @@ Session::cleanup_sources (Session::cleanup_report& rep)
|
|||
*/
|
||||
|
||||
save_state ("");
|
||||
save_history ("");
|
||||
|
||||
out:
|
||||
_state_of_the_state = (StateOfTheState) (_state_of_the_state & ~InCleanup);
|
||||
|
|
@ -3284,7 +3285,7 @@ Session::add_instant_xml (XMLNode& node, const std::string& dir)
|
|||
|
||||
|
||||
int
|
||||
Session::save_history ()
|
||||
Session::save_history (string snapshot_name)
|
||||
{
|
||||
XMLTree tree;
|
||||
string xml_path;
|
||||
|
|
@ -3292,7 +3293,11 @@ Session::save_history ()
|
|||
|
||||
tree.set_root (&history.get_state());
|
||||
|
||||
xml_path = _path + _current_snapshot_name + ".history";
|
||||
if (snapshot_name.empty()) {
|
||||
snapshot_name = _current_snapshot_name;
|
||||
}
|
||||
|
||||
xml_path = _path + snapshot_name + ".history";
|
||||
|
||||
bak_path = xml_path + ".bak";
|
||||
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ Session::non_realtime_stop (bool abort)
|
|||
if ((post_transport_work & PostTransportLocate) && get_record_enabled()) {
|
||||
/* capture start has been changed, so save pending state */
|
||||
save_state ("", true);
|
||||
save_history();
|
||||
save_history ("");
|
||||
}
|
||||
|
||||
/* always try to get rid of this */
|
||||
|
|
@ -422,6 +422,7 @@ Session::non_realtime_stop (bool abort)
|
|||
|
||||
if (did_record) {
|
||||
save_state (_current_snapshot_name);
|
||||
save_history (_current_snapshot_name);
|
||||
}
|
||||
|
||||
if (post_transport_work & PostTransportDuration) {
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ Track::set_name (string str, void *src)
|
|||
|
||||
if ((ret = IO::set_name (str, src)) == 0) {
|
||||
_session.save_state ("");
|
||||
_session.save_history();
|
||||
_session.save_history ("");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ void
|
|||
BasicUI::save_state ()
|
||||
{
|
||||
session->save_state ("");
|
||||
session->save_history();
|
||||
session->save_history("");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue