summaryrefslogtreecommitdiff
path: root/gtk2_ardour/audio_streamview.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-19 20:26:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-19 20:26:31 +0000
commitaae367b63c9b619db1e40f27dc334c6987219481 (patch)
tree142f6ffed6bb749e24a06343587cad6b966888bd /gtk2_ardour/audio_streamview.cc
parent67460c2af45d0455e64623572480c064445c2e5b (diff)
use new syntax for connecting to backend signals that enforces explicit connection scope, plus a few other related matters
git-svn-id: svn://localhost/ardour2/branches/3.0@6376 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_streamview.cc')
-rw-r--r--gtk2_ardour/audio_streamview.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc
index 85ea02a197..6fb481db2d 100644
--- a/gtk2_ardour/audio_streamview.cc
+++ b/gtk2_ardour/audio_streamview.cc
@@ -66,7 +66,7 @@ AudioStreamView::AudioStreamView (AudioTimeAxisView& tv)
use_rec_regions = tv.editor().show_waveforms_recording ();
- Config->ParameterChanged.connect (sigc::mem_fun (*this, &AudioStreamView::parameter_changed));
+ Config->ParameterChanged.connect (*this, sigc::mem_fun (*this, &AudioStreamView::parameter_changed));
}
AudioStreamView::~AudioStreamView ()
@@ -190,7 +190,7 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wai
/* catch region going away */
- scoped_connect (r->GoingAway, boost::bind (&AudioStreamView::remove_region_view, this, boost::weak_ptr<Region> (r)));
+ r->GoingAway.connect (*this, boost::bind (&AudioStreamView::remove_region_view, this, boost::weak_ptr<Region> (r)));
RegionViewAdded (region_view);
@@ -281,12 +281,14 @@ AudioStreamView::playlist_changed (boost::shared_ptr<Diskstream> ds)
{
ENSURE_GUI_THREAD (*this, &AudioStreamView::playlist_changed_weak, boost::weak_ptr<Diskstream> (ds));
+ playlist_connections.drop_connections ();
+
StreamView::playlist_changed(ds);
boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(ds->playlist());
if (apl) {
- playlist_connections.add_connection (apl->NewCrossfade.connect (boost::bind (&AudioStreamView::add_crossfade, this, _1)));
+ apl->NewCrossfade.connect (playlist_connections, boost::bind (&AudioStreamView::add_crossfade, this, _1));
}
}
@@ -345,7 +347,7 @@ AudioStreamView::add_crossfade (boost::shared_ptr<Crossfade> crossfade)
region_color,
*lview, *rview);
cv->set_valid (true);
- crossfade->Invalidated.connect (sigc::mem_fun (*this, &AudioStreamView::remove_crossfade));
+ crossfade->Invalidated.connect (*this, sigc::mem_fun (*this, &AudioStreamView::remove_crossfade));
crossfade_views[cv->crossfade] = cv;
if (!_trackview.session()->config.get_xfades_visible() || !crossfades_visible) {
cv->hide ();
@@ -481,9 +483,9 @@ AudioStreamView::setup_rec_box ()
if (src) {
sources.push_back (src);
- rec_data_ready_connections.add_connection
- (src->PeakRangeReady.connect
- (boost::bind (&AudioStreamView::rec_peak_range_ready, this, _1, _2, boost::weak_ptr<Source>(src))));
+ (src->PeakRangeReady.connect (rec_data_ready_connections,
+ boost::bind (&AudioStreamView::rec_peak_range_ready,
+ this, _1, _2, boost::weak_ptr<Source>(src))));
}
}