13
0

add session save signal and hook-up videotimeline

This commit is contained in:
Robin Gareus 2013-04-08 19:51:00 +02:00
parent 1606996845
commit 8630fd1703
3 changed files with 4 additions and 0 deletions

View File

@ -171,6 +171,7 @@ VideoTimeLine::set_session (ARDOUR::Session *s)
SessionHandlePtr::set_session (s); SessionHandlePtr::set_session (s);
if (!_session) { return ; } if (!_session) { return ; }
_session->SaveSession.connect_same_thread (*this, boost::bind (&VideoTimeLine::save_session, this));
LocaleGuard lg (X_("POSIX")); LocaleGuard lg (X_("POSIX"));
XMLNode* node = _session->extra_xml (X_("Videotimeline")); XMLNode* node = _session->extra_xml (X_("Videotimeline"));

View File

@ -397,6 +397,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
PBD::Signal1<void,std::string> StateSaved; PBD::Signal1<void,std::string> StateSaved;
PBD::Signal0<void> StateReady; PBD::Signal0<void> StateReady;
PBD::Signal0<void> SaveSession;
std::vector<std::string*>* possible_states() const; std::vector<std::string*>* possible_states() const;
static std::vector<std::string*>* possible_states (std::string path); static std::vector<std::string*>* possible_states (std::string path);

View File

@ -827,6 +827,8 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot
if (!pending) { if (!pending) {
SaveSession (); /* EMIT SIGNAL */
save_history (snapshot_name); save_history (snapshot_name);
bool was_dirty = dirty(); bool was_dirty = dirty();