Remove some unused code.
authorCarl Hetherington <carl@carlh.net>
Tue, 5 Oct 2010 14:55:08 +0000 (14:55 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 5 Oct 2010 14:55:08 +0000 (14:55 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7876 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/midi_region_view.cc
gtk2_ardour/midi_region_view.h
libs/ardour/ardour/midi_region.h
libs/ardour/ardour/source.h
libs/ardour/midi_region.cc

index 136515c08ee6a61a91f5231d1f61c9f4fad0eec0..400b245782642aa5726e120e50be0a3bf6f30870 100644 (file)
@@ -2692,14 +2692,6 @@ MidiRegionView::note_mouse_position (float x_fraction, float y_fraction, bool ca
         }
 }
 
-void
-MidiRegionView::switch_source(boost::shared_ptr<Source> src)
-{
-       boost::shared_ptr<MidiSource> msrc = boost::dynamic_pointer_cast<MidiSource>(src);
-       if (msrc)
-               display_model(msrc->model());
-}
-
 void
 MidiRegionView::set_frame_color()
 {
index 29ad2f78213c55dc6a5d9c9a26010682462d4a2b..d89f4771454c60ec082d225adcc70480198c5214 100644 (file)
@@ -317,7 +317,6 @@ class MidiRegionView : public RegionView
        bool play_midi_note_off(boost::shared_ptr<NoteType> note);
 
        void clear_events();
-       void switch_source(boost::shared_ptr<ARDOUR::Source> src);
 
        bool canvas_event(GdkEvent* ev);
        bool note_canvas_event(GdkEvent* ev);
index a7a5fb3a82dc7596b8500c48262a71373074f735..dbbf6d80d19e187f3a95b11725b12d5bdd653a0b 100644 (file)
@@ -128,7 +128,6 @@ class MidiRegion : public Region
 
        void set_position_internal (framepos_t pos, bool allow_bbt_recompute);
 
-       void switch_source(boost::shared_ptr<Source> source);
        void model_changed ();
        void model_automation_state_changed (Evoral::Parameter const &);
         void model_contents_changed ();
index b8b3c9c229fa5095162b022adf7b9e1d0868e6fa..64dd88d094fd5492326715a0816fbe2c327d0e39 100644 (file)
@@ -84,7 +84,6 @@ class Source : public SessionObject
        virtual bool length_mutable() const    { return false; }
 
        static PBD::Signal1<void,Source*>             SourceCreated;
-       PBD::Signal1<void,boost::shared_ptr<Source> > Switched;
 
        bool has_been_analysed() const;
        virtual bool can_be_analysed() const { return false; }
index ffb521713743f995dc5d6828fe1f747d8da32f65..e8d6229e911496ed2f2e4d4ca9b8f9772a3c375c 100644 (file)
@@ -72,7 +72,6 @@ MidiRegion::MidiRegion (const SourceList& srcs)
 {
         register_properties ();
 
-       // midi_source(0)->Switched.connect_same_thread (*this, boost::bind (&MidiRegion::switch_source, this, _1));
        midi_source(0)->ModelChanged.connect_same_thread (_source_connection, boost::bind (&MidiRegion::model_changed, this));
        model_changed ();
        assert(_name.val().find("/") == string::npos);
@@ -86,7 +85,6 @@ MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other, frameoffset_t
         register_properties ();
 
        assert(_name.val().find("/") == string::npos);
-       // midi_source(0)->Switched.connect_same_thread (*this, boost::bind (&MidiRegion::switch_source, this, _1));
        midi_source(0)->ModelChanged.connect_same_thread (_source_connection, boost::bind (&MidiRegion::model_changed, this));
        model_changed ();
 }
@@ -257,29 +255,6 @@ MidiRegion::midi_source (uint32_t n) const
        return boost::dynamic_pointer_cast<MidiSource>(source(n));
 }
 
-
-void
-MidiRegion::switch_source(boost::shared_ptr<Source> src)
-{
-       _source_connection.disconnect ();
-       
-       boost::shared_ptr<MidiSource> msrc = boost::dynamic_pointer_cast<MidiSource>(src);
-       if (!msrc) {
-               return;
-       }
-
-       // MIDI regions have only one source
-        SourceList srcs;
-        srcs.push_back (msrc);
-
-        drop_sources ();
-        use_sources (srcs);
-        
-       set_name (msrc->name());
-
-       msrc->ModelChanged.connect_same_thread (_source_connection, boost::bind (&MidiRegion::model_changed, this));
-}
-
 void
 MidiRegion::model_changed ()
 {