Add a new signal (not yet used) to initiate session saves; alter signal name for existing signal used to allow other objects to add XML state to session

Conflicts:
	gtk2_ardour/video_timeline.cc
This commit is contained in:
Paul Davis 2015-01-24 19:06:31 -05:00
parent 05a5bcc84c
commit 8ca0573a5c
3 changed files with 17 additions and 3 deletions

View file

@ -451,7 +451,21 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
PBD::Signal1<void,std::string> StateSaved;
PBD::Signal0<void> StateReady;
PBD::Signal0<void> SaveSession;
/* emitted when session needs to be saved due to some internal
* event or condition (i.e. not in response to a user request).
*
* Only one object should
* connect to this signal and take responsibility.
*
* Argument is the snapshot name to use when saving.
*/
PBD::Signal1<void,std::string> SaveSessionRequested;
/* emitted during a session save to allow other entities to add state, via
* extra XML, to the session state
*/
PBD::Signal0<void> SessionSaveUnderway;
std::vector<std::string> possible_states() const;
static std::vector<std::string> possible_states (std::string path);

View file

@ -739,7 +739,7 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot
}
}
SaveSession (); /* EMIT SIGNAL */
SessionSaveUnderway (); /* EMIT SIGNAL */
tree.set_root (&get_state());