mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-26 08:27:43 +01:00
add handler for, and connect to, Session::SaveSessionRequested
Conflicts: gtk2_ardour/ardour_ui_dialogs.cc
This commit is contained in:
parent
8ca0573a5c
commit
04ea19119a
3 changed files with 10 additions and 2 deletions
|
|
@ -691,6 +691,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 ()
|
||||
|
|
|
|||
|
|
@ -426,6 +426,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();
|
||||
|
|
|
|||
|
|
@ -151,8 +151,8 @@ ARDOUR_UI::set_session (Session *s)
|
|||
Blink.connect (sigc::mem_fun(*this, &ARDOUR_UI::audition_blink));
|
||||
Blink.connect (sigc::mem_fun(*this, &ARDOUR_UI::feedback_blink));
|
||||
|
||||
_session->SaveSession.connect_same_thread (_session_connections, boost::bind (&ARDOUR_UI::save_session_gui_state, this));
|
||||
|
||||
_session->SaveSessionUnderway.connect_same_thread (_session_connections, boost::bind (&ARDOUR_UI::save_session_gui_state, this));
|
||||
_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…
Add table
Add a link
Reference in a new issue