diff options
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r-- | libs/ardour/region.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 2c4d8004cf..4fcb7de3ca 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -23,8 +23,6 @@ #include <algorithm> #include <sstream> -#include <sigc++/bind.h> -#include <sigc++/class_slot.h> #include <glibmm/thread.h> #include "pbd/xml++.h" @@ -56,7 +54,7 @@ Change Region::LockChanged = ARDOUR::new_change (); Change Region::LayerChanged = ARDOUR::new_change (); Change Region::HiddenChanged = ARDOUR::new_change (); -sigc::signal<void,boost::shared_ptr<ARDOUR::Region> > Region::RegionPropertyChanged; +boost::signals2::signal<void(boost::shared_ptr<ARDOUR::Region>)> Region::RegionPropertyChanged; /* derived-from-derived constructor (no sources in constructor) */ Region::Region (Session& s, nframes_t start, nframes_t length, const string& name, DataType type, layer_t layer, Region::Flag flags) @@ -111,7 +109,7 @@ Region::Region (boost::shared_ptr<Source> src, nframes_t start, nframes_t length _sources.push_back (src); _master_sources.push_back (src); - src->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Region::source_deleted), src)); + scoped_connect (src->GoingAway, boost::bind (&Region::source_deleted, this, boost::weak_ptr<Source>(src))); assert(_sources.size() > 0); _positional_lock_style = AudioTime; @@ -340,7 +338,6 @@ Region::Region (boost::shared_ptr<Source> src, const XMLNode& node) Region::~Region () { DEBUG_TRACE (DEBUG::Destruction, string_compose ("Region %1 destructor @ %2\n", _name, this)); - notify_callbacks (); drop_references (); } @@ -1416,9 +1413,10 @@ Region::region_list_equivalent (boost::shared_ptr<const Region> other) const } void -Region::source_deleted (boost::shared_ptr<Source>) +Region::source_deleted (boost::weak_ptr<Source>) { _sources.clear (); + cerr << "Send drop ref signal from region " << ' ' << this << endl; drop_references (); } @@ -1588,14 +1586,14 @@ Region::use_sources (SourceList const & s) for (SourceList::const_iterator i = s.begin (); i != s.end(); ++i) { _sources.push_back (*i); - (*i)->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Region::source_deleted), *i)); + scoped_connect ((*i)->GoingAway, boost::bind (&Region::source_deleted, this, boost::weak_ptr<Source>(*i))); unique_srcs.insert (*i); } for (SourceList::const_iterator i = s.begin (); i != s.end(); ++i) { _master_sources.push_back (*i); if (unique_srcs.find (*i) == unique_srcs.end()) { - (*i)->GoingAway.connect (sigc::bind (sigc::mem_fun (*this, &Region::source_deleted), *i)); + scoped_connect ((*i)->GoingAway, boost::bind (&Region::source_deleted, this, boost::weak_ptr<Source>(*i))); } } } |