add handler for, and connect to, Session::SaveSessionRequested
This commit is contained in:
parent
ab3ec791ea
commit
0b5ceaca4e
|
@ -677,6 +677,13 @@ ARDOUR_UI::get_transport_controllable_state ()
|
|||
return *node;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::save_session_at_its_request (std::string snapshot_name)
|
||||
{
|
||||
if (_session) {
|
||||
_session->save_state (snapshot_name);
|
||||
}
|
||||
}
|
||||
|
||||
gint
|
||||
ARDOUR_UI::autosave_session ()
|
||||
|
|
|
@ -346,6 +346,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
|
||||
int ask_about_saving_session (const std::vector<std::string>& actions);
|
||||
|
||||
void save_session_at_its_request (std::string);
|
||||
/* periodic safety backup, to be precise */
|
||||
gint autosave_session();
|
||||
void update_autosave();
|
||||
|
|
|
@ -148,6 +148,7 @@ ARDOUR_UI::set_session (Session *s)
|
|||
|
||||
blink_connection = Timers::blink_connect (sigc::mem_fun(*this, &ARDOUR_UI::blink_handler));
|
||||
|
||||
_session->SaveSessionRequested.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::save_session_at_its_request, this, _1), gui_context());
|
||||
_session->RecordStateChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::record_state_changed, this), gui_context());
|
||||
_session->StepEditStatusChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::step_edit_status_change, this, _1), gui_context());
|
||||
_session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::map_transport_state, this), gui_context());
|
||||
|
|
Loading…
Reference in New Issue
Block a user