From 8630fd1703acb2f9a36d6db7e0d18963b461614f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 8 Apr 2013 19:51:00 +0200 Subject: [PATCH] add session save signal and hook-up videotimeline --- gtk2_ardour/video_timeline.cc | 1 + libs/ardour/ardour/session.h | 1 + libs/ardour/session_state.cc | 2 ++ 3 files changed, 4 insertions(+) diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc index 9cd9d35315..e33f171a3c 100644 --- a/gtk2_ardour/video_timeline.cc +++ b/gtk2_ardour/video_timeline.cc @@ -171,6 +171,7 @@ VideoTimeLine::set_session (ARDOUR::Session *s) SessionHandlePtr::set_session (s); if (!_session) { return ; } + _session->SaveSession.connect_same_thread (*this, boost::bind (&VideoTimeLine::save_session, this)); LocaleGuard lg (X_("POSIX")); XMLNode* node = _session->extra_xml (X_("Videotimeline")); diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 525faa4e13..a149224607 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -397,6 +397,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi PBD::Signal1 StateSaved; PBD::Signal0 StateReady; + PBD::Signal0 SaveSession; std::vector* possible_states() const; static std::vector* possible_states (std::string path); diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index a713375755..4ce39340a3 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -827,6 +827,8 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot if (!pending) { + SaveSession (); /* EMIT SIGNAL */ + save_history (snapshot_name); bool was_dirty = dirty();