waf build works on OS X ; new bindings file and processing system in place for mnemon...
[ardour.git] / gtk2_ardour / selection.cc
index c957e4a244003a80769c7fc9cee467e7a6328f2b..cbe5975e87babae9ef2052abee340c235c56053c 100644 (file)
@@ -112,7 +112,7 @@ Selection::clear_tracks ()
 void
 Selection::clear_time ()
 {
-       time.track.reset ();
+       time.track = 0;
        time.group = 0;
        time.clear();
 
@@ -170,22 +170,21 @@ Selection::toggle (boost::shared_ptr<Playlist> pl)
 }
 
 void
-Selection::toggle (const list<TimeAxisViewPtr>& track_list)
+Selection::toggle (const list<TimeAxisView*>& track_list)
 {
-       for (list<TimeAxisViewPtr>::const_iterator i = track_list.begin(); i != track_list.end(); ++i) {
+       for (list<TimeAxisView*>::const_iterator i = track_list.begin(); i != track_list.end(); ++i) {
                toggle ( (*i) );
        }
 }
 
 void
-Selection::toggle (TimeAxisViewPtr track)
+Selection::toggle (TimeAxisView* track)
 {
        TrackSelection::iterator i;
        
        if ((i = find (tracks.begin(), tracks.end(), track)) == tracks.end()) {
-               void (Selection::*pmf)(boost::weak_ptr<TimeAxisView>) = &Selection::remove;
-               boost::weak_ptr<TimeAxisView> w (track);
-               track->GoingAway.connect (sigc::bind (mem_fun (*this, pmf), w));
+               void (Selection::*pmf)(TimeAxisView*) = &Selection::remove;
+               track->GoingAway.connect (sigc::bind (mem_fun (*this, pmf), track));
                tracks.push_back (track);
        } else {
                tracks.erase (i);
@@ -269,14 +268,13 @@ Selection::add (const list<boost::shared_ptr<Playlist> >& pllist)
 }
 
 void
-Selection::add (const list<TimeAxisViewPtr>& track_list)
+Selection::add (const list<TimeAxisView*>& track_list)
 {
-       list<TimeAxisViewPtr> added = tracks.add (track_list);
+       list<TimeAxisView*> added = tracks.add (track_list);
 
-       for (list<TimeAxisViewPtr>::const_iterator i = added.begin(); i != added.end(); ++i) {
-               void (Selection::*pmf)(boost::weak_ptr<TimeAxisView>) = &Selection::remove;
-               boost::weak_ptr<TimeAxisView> w (*i);
-               (*i)->GoingAway.connect (sigc::bind (mem_fun (*this, pmf), w));
+       for (list<TimeAxisView*>::const_iterator i = added.begin(); i != added.end(); ++i) {
+               void (Selection::*pmf)(TimeAxisView*) = &Selection::remove;
+               (*i)->GoingAway.connect (sigc::bind (mem_fun (*this, pmf), (*i)));
        }
        
        if (!added.empty()) {
@@ -285,10 +283,10 @@ Selection::add (const list<TimeAxisViewPtr>& track_list)
 }
 
 void
-Selection::add (TimeAxisViewPtr track)
+Selection::add (TimeAxisView* track)
 {
        if (find (tracks.begin(), tracks.end(), track) == tracks.end()) {
-               void (Selection::*pmf)(TimeAxisViewPtr) = &Selection::remove;
+               void (Selection::*pmf)(TimeAxisView*) = &Selection::remove;
                track->GoingAway.connect (sigc::bind (mem_fun (*this, pmf), track));
                tracks.push_back (track);
                TracksChanged();
@@ -307,7 +305,7 @@ Selection::add (vector<RegionView*>& v)
                if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
                        changed = regions.add ((*i));
                        if (Config->get_link_region_and_track_selection() && changed) {
-                               add ((*i)->get_trackview());
+                               add (&(*i)->get_trackview());
                        }
                }
        }
@@ -329,7 +327,7 @@ Selection::add (const RegionSelection& rs)
                if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
                        changed = regions.add ((*i));
                        if (Config->get_link_region_and_track_selection() && changed) {
-                               add ((*i)->get_trackview());
+                               add (&(*i)->get_trackview());
                        }
                }
        }
@@ -345,7 +343,7 @@ Selection::add (RegionView* r)
        if (find (regions.begin(), regions.end(), r) == regions.end()) {
                regions.add (r);
                if (Config->get_link_region_and_track_selection()) {
-                       add (r->get_trackview());
+                       add (&r->get_trackview());
                }
                RegionsChanged ();
        }
@@ -404,9 +402,9 @@ Selection::add (boost::shared_ptr<Evoral::ControlList> cl)
 }
 
 void
-Selection::remove (TimeAxisViewPtr track)
+Selection::remove (TimeAxisView* track)
 {
-       list<TimeAxisViewPtr>::iterator i;
+       list<TimeAxisView*>::iterator i;
        if ((i = find (tracks.begin(), tracks.end(), track)) != tracks.end()) {
                tracks.erase (i);
                TracksChanged();
@@ -414,22 +412,13 @@ Selection::remove (TimeAxisViewPtr track)
 }
 
 void
-Selection::remove (boost::weak_ptr<TimeAxisView> w)
-{
-       boost::shared_ptr<TimeAxisView> t = w.lock ();
-       if (t) {
-               remove (t);
-       }
-}
-
-void
-Selection::remove (const list<TimeAxisViewPtr>& track_list)
+Selection::remove (const list<TimeAxisView*>& track_list)
 {
        bool changed = false;
 
-       for (list<TimeAxisViewPtr>::const_iterator i = track_list.begin(); i != track_list.end(); ++i) {
+       for (list<TimeAxisView*>::const_iterator i = track_list.begin(); i != track_list.end(); ++i) {
 
-               list<TimeAxisViewPtr>::iterator x;
+               list<TimeAxisView*>::iterator x;
 
                if ((x = find (tracks.begin(), tracks.end(), (*i))) != tracks.end()) {
                        tracks.erase (x);
@@ -480,7 +469,7 @@ Selection::remove (RegionView* r)
        }
 
        if (Config->get_link_region_and_track_selection() && !regions.involves (r->get_trackview())) {
-               remove (r->get_trackview());
+               remove (&r->get_trackview());
        }
 }
 
@@ -503,7 +492,7 @@ Selection::remove (uint32_t selection_id)
 }
 
 void
-Selection::remove (nframes_t start, nframes_t end)
+Selection::remove (nframes_t /*start*/, nframes_t /*end*/)
 {
 }
 
@@ -518,14 +507,14 @@ Selection::remove (boost::shared_ptr<ARDOUR::AutomationList> ac)
 }
 
 void
-Selection::set (TimeAxisViewPtr track)
+Selection::set (TimeAxisView* track)
 {
        clear_tracks ();
        add (track);
 }
 
 void
-Selection::set (const list<TimeAxisViewPtr>& track_list)
+Selection::set (const list<TimeAxisView*>& track_list)
 {
        clear_tracks ();
        add (track_list);
@@ -576,7 +565,7 @@ Selection::set (vector<RegionView*>& v)
 }
 
 long
-Selection::set (TimeAxisViewPtr track, nframes_t start, nframes_t end)
+Selection::set (TimeAxisView* track, nframes_t start, nframes_t end)
 {
        if ((start == 0 && end == 0) || end < start) {
                return 0;
@@ -598,7 +587,7 @@ Selection::set (TimeAxisViewPtr track, nframes_t start, nframes_t end)
                time.track = track;
                time.group = track->route_group();
        } else {
-               time.track.reset ();
+               time.track = 0;
                time.group = 0;
        }
 
@@ -623,7 +612,7 @@ Selection::selected (Marker* m)
 }
 
 bool
-Selection::selected (TimeAxisViewPtr tv)
+Selection::selected (TimeAxisView* tv)
 {
        return find (tracks.begin(), tracks.end(), tv) != tracks.end();
 }