summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-20 16:50:41 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-20 16:50:41 +0000
commit738387f9a417537e768d56d3fc4afcb9dc82d66b (patch)
tree47227ac3b82b8813b489904f785a3e52694a5707 /gtk2_ardour
parent96cd6c993b0ed9a775f7ea096e2afe01be9d00b9 (diff)
remove a couple of boost::signals2 trouble spots; fix some --strict compile time warnings
git-svn-id: svn://localhost/ardour2/branches/3.0@6378 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.cc29
-rw-r--r--gtk2_ardour/time_axis_view_item.cc1
2 files changed, 12 insertions, 18 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 57d1ef0922..9bf2ccbc5d 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -682,6 +682,7 @@ Editor::Editor ()
ControlProtocol::ZoomOut.connect (*this, boost::bind (&Editor::temporal_zoom_step, this, true));
ControlProtocol::ScrollTimeline.connect (*this, boost::bind (&Editor::control_scroll, this, _1));
BasicUI::AccessAction.connect (*this, boost::bind (&Editor::access_action, this, _1, _2));
+ Session::AskAboutPlaylistDeletion.connect (*this, boost::bind (&Editor::playlist_deletion_dialog, this, _1));
Config->ParameterChanged.connect (*this, boost::bind (&Editor::parameter_changed, this, _1));
@@ -1075,8 +1076,6 @@ Editor::set_session (Session *t)
update_title ();
- _session->history().Changed.connect (_session_connections, boost::bind (&Editor::history_changed, this));
-
/* These signals can all be emitted by a non-GUI thread. Therefore the
handlers for them must not attempt to directly interact with the GUI,
but use Gtkmm2ext::UI::instance()->call_slot();
@@ -1087,12 +1086,17 @@ Editor::set_session (Session *t)
_session->RouteAdded.connect (_session_connections, boost::bind (&Editor::handle_new_route, this, _1));
_session->DurationChanged.connect (_session_connections, boost::bind (&Editor::handle_new_duration, this));
_session->DirtyChanged.connect (_session_connections, boost::bind (&Editor::update_title, this));
- _session->StateSaved.connect (_session_connections, boost::bind (&Editor::update_title, this));
- _session->AskAboutPlaylistDeletion.connect (_session_connections, boost::bind (&Editor::playlist_deletion_dialog, this, _1));
_session->TimecodeOffsetChanged.connect (_session_connections, boost::bind (&Editor::update_just_timecode, this));
_session->tempo_map().StateChanged.connect (_session_connections, boost::bind (&Editor::tempo_map_changed, this, _1));
_session->Located.connect (_session_connections, boost::bind (&Editor::located, this));
_session->config.ParameterChanged.connect (_session_connections, boost::bind (&Editor::parameter_changed, this, _1));
+ _session->StateSaved.connect (_session_connections, boost::bind (&Editor::session_state_saved, this, _1));
+ _session->locations()->added.connect (_session_connections, sigc::mem_fun(*this, &Editor::add_new_location));
+ _session->locations()->removed.connect (_session_connections, sigc::mem_fun(*this, &Editor::location_gone));
+ _session->locations()->changed.connect (_session_connections, sigc::mem_fun(*this, &Editor::refresh_location_display));
+ _session->locations()->StateChanged.connect (_session_connections, sigc::mem_fun(*this, &Editor::refresh_location_display_s));
+ _session->locations()->end_location()->changed.connect (_session_connections, sigc::mem_fun(*this, &Editor::end_location_changed));
+ _session->history().Changed.connect (_session_connections, boost::bind (&Editor::history_changed, this));
if (Profile->get_sae()) {
BBT_Time bbt;
@@ -1139,19 +1143,7 @@ Editor::set_session (Session *t)
Config->map_parameters (pc);
_session->config.map_parameters (pc);
-
refresh_location_display ();
-
- /* static signal - no need to drop connection when session is deleted (XXX or we are?)*/
-
- _session->StateSaved.connect (*this, boost::bind (&Editor::session_state_saved, this, _1));
-
- _session->locations()->added.connect (_session_connections, sigc::mem_fun(*this, &Editor::add_new_location));
- _session->locations()->removed.connect (_session_connections, sigc::mem_fun(*this, &Editor::location_gone));
- _session->locations()->changed.connect (_session_connections, sigc::mem_fun(*this, &Editor::refresh_location_display));
- _session->locations()->StateChanged.connect (_session_connections, sigc::mem_fun(*this, &Editor::refresh_location_display_s));
- _session->locations()->end_location()->changed.connect (_session_connections, sigc::mem_fun(*this, &Editor::end_location_changed));
-
handle_new_duration ();
restore_ruler_visibility ();
@@ -3920,8 +3912,9 @@ Editor::control_layout_scroll (GdkEventScroll* ev)
void
Editor::session_state_saved (string snap_name)
{
- ENSURE_GUI_THREAD (*this, &Editor::session_state_saved, snap_name)
-
+ ENSURE_GUI_THREAD (*this, &Editor::session_state_saved, snap_name);
+
+ update_title ();
_snapshots->redisplay ();
}
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index dedacaa27c..19b599215b 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -113,6 +113,7 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group&
TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
: sigc::trackable(other)
+ , PBD::ScopedConnectionList()
, trackview (other.trackview)
{