Remove some unused code.
authorCarl Hetherington <carl@carlh.net>
Wed, 6 Jun 2012 11:23:45 +0000 (11:23 +0000)
committerCarl Hetherington <carl@carlh.net>
Wed, 6 Jun 2012 11:23:45 +0000 (11:23 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@12574 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/mixer_ui.cc
gtk2_ardour/mixer_ui.h
gtk2_ardour/panner_ui.cc
gtk2_ardour/panner_ui.h
libs/ardour/ardour/session.h
libs/ardour/session.cc

index 779369aa900872f60670f1eb4d86f7bc2acb753d..69b048acb9ba3023eb0b01dfdae0e182fa133627 100644 (file)
@@ -233,8 +233,6 @@ Mixer_UI::Mixer_UI ()
        list_hpane.show();
        group_display.show();
 
-       auto_rebinding = FALSE;
-
        _in_group_rebuild_or_clear = false;
 
        MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context());
@@ -888,12 +886,6 @@ Mixer_UI::redisplay_track_list ()
                _session->sync_order_keys (N_("signal"));
        }
 
-       // Resigc::bind all of the midi controls automatically
-
-       if (auto_rebinding) {
-               auto_rebind_midi_controls ();
-       }
-
        _group_tabs->set_dirty ();
 }
 
@@ -924,88 +916,6 @@ Mixer_UI::strip_width_changed ()
 
 }
 
-void
-Mixer_UI::set_auto_rebinding( bool val )
-{
-       if( val == TRUE )
-       {
-               auto_rebinding = TRUE;
-               Session::AutoBindingOff();
-       }
-       else
-       {
-               auto_rebinding = FALSE;
-               Session::AutoBindingOn();
-       }
-}
-
-void
-Mixer_UI::toggle_auto_rebinding()
-{
-       if (auto_rebinding)
-       {
-               set_auto_rebinding( FALSE );
-       }
-
-       else
-       {
-               set_auto_rebinding( TRUE );
-       }
-
-       auto_rebind_midi_controls();
-}
-
-void
-Mixer_UI::auto_rebind_midi_controls ()
-{
-       TreeModel::Children rows = track_model->children();
-       TreeModel::Children::iterator i;
-       int pos;
-
-       // Create bindings for all visible strips and remove those that are not visible
-       pos = 1;  // 0 is reserved for the master strip
-       for (i = rows.begin(); i != rows.end(); ++i) {
-               MixerStrip* strip = (*i)[track_columns.strip];
-
-               if ( (*i)[track_columns.visible] == true ) {  // add bindings for
-                       // make the actual binding
-                       //cout<<"Auto Binding:  Visible Strip Found: "<<strip->name()<<endl;
-
-                       int controlValue = pos;
-                       if( strip->route()->is_master() ) {
-                               controlValue = 0;
-                       }
-                       else {
-                               pos++;
-                       }
-
-                       PBD::Controllable::CreateBinding ( strip->solo_button->get_controllable().get(), controlValue, 0);
-                       PBD::Controllable::CreateBinding ( strip->mute_button->get_controllable().get(), controlValue, 1);
-
-                       if( strip->is_audio_track() ) {
-                               PBD::Controllable::CreateBinding ( strip->rec_enable_button->get_controllable().get(), controlValue, 2);
-                       }
-
-                       PBD::Controllable::CreateBinding ( strip->gpm.get_controllable().get(), controlValue, 3);
-                       PBD::Controllable::CreateBinding ( strip->panners.get_controllable().get(), controlValue, 4);
-
-               }
-               else {  // Remove any existing binding
-                       PBD::Controllable::DeleteBinding ( strip->solo_button->get_controllable().get() );
-                       PBD::Controllable::DeleteBinding ( strip->mute_button->get_controllable().get() );
-
-                       if( strip->is_audio_track() ) {
-                               PBD::Controllable::DeleteBinding ( strip->rec_enable_button->get_controllable().get() );
-                       }
-
-                       PBD::Controllable::DeleteBinding ( strip->gpm.get_controllable().get() );
-                       PBD::Controllable::DeleteBinding ( strip->panners.get_controllable().get() ); // This only takes the first panner if there are multiples...
-               }
-
-       } // for
-
-}
-
 struct SignalOrderRouteSorter {
     bool operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) {
            /* use of ">" forces the correct sort order */
index febc62b8ddbbaa25558a829e883b5434c287f81d..08d7b6e487f5c077a001e321cf8aeab97dfff2f5 100644 (file)
@@ -78,8 +78,6 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR
        void hide_strip (MixerStrip *);
 
        void ensure_float (Gtk::Window&);
-       void toggle_auto_rebinding ();
-       void set_auto_rebinding(bool);
 
         MonitorSection* monitor_section() const { return _monitor_section; }
 
@@ -144,9 +142,6 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR
        void unselect_all_audiobus_strips ();
        void select_all_audiobus_strips ();
 
-       void auto_rebind_midi_controls ();
-       bool auto_rebinding;
-
        void strip_select_op (bool audiotrack, bool select);
        void select_strip_op (MixerStrip*, bool select);
 
index 14513ca8ad4817f3d2fa0cac5789d28cfc289b2a..239a64ccb722958a77dfa6ab5f92cce49248b1e3 100644 (file)
@@ -176,13 +176,6 @@ PannerUI::build_astyle_menu ()
        pan_astyle_menu->items().push_back (MenuElem (_("Abs")));
 }
 
-boost::shared_ptr<PBD::Controllable>
-PannerUI::get_controllable()
-{
-        assert (!pan_bars.empty());
-       return pan_bars[0]->get_controllable();
-}
-
 void
 PannerUI::on_size_allocate (Allocation& a)
 {
@@ -197,10 +190,6 @@ PannerUI::set_width (Width w)
 
 PannerUI::~PannerUI ()
 {
-       for (vector<MonoPanner*>::iterator i = pan_bars.begin(); i != pan_bars.end(); ++i) {
-               delete (*i);
-       }
-
        delete twod_panner;
        delete big_window;
        delete pan_menu;
@@ -422,11 +411,7 @@ PannerUI::effective_pan_display ()
                 _stereo_panner->queue_draw ();
         } else if (twod_panner) {
                 twod_panner->queue_draw ();
-        } else {
-                for (vector<MonoPanner*>::iterator i = pan_bars.begin(); i != pan_bars.end(); ++i) {
-                        (*i)->queue_draw ();
-                }
-       }
+        }
 }
 
 void
index 0bb84019570aaaa0496a26cef9b2b3e54ce8c77d..046e23cd7aca731743cefdcf230c051f649f0f52 100644 (file)
@@ -77,7 +77,6 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
        void effective_pan_display ();
 
        void set_meter_strip_name (std::string name);
-       boost::shared_ptr<PBD::Controllable> get_controllable();
 
        void on_size_allocate (Gtk::Allocation &);
 
@@ -122,8 +121,6 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
        Gtk::Button pan_automation_style_button;
        Gtk::ToggleButton pan_automation_state_button;
 
-       std::vector<MonoPanner*> pan_bars;
-
        void pan_value_changed (uint32_t which);
        void build_astate_menu ();
        void build_astyle_menu ();
index 6c7a9af84418df9d24af38a1b47d5c45f6815487..d31d1f93390018e7325abdcd99cd75d029529084 100644 (file)
@@ -177,9 +177,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        const SessionDirectory& session_directory () const { return *(_session_dir.get()); }
 
-       static PBD::Signal0<void> AutoBindingOn;
-       static PBD::Signal0<void> AutoBindingOff;
-
        static PBD::Signal1<void,std::string> Dialog;
 
        int ensure_subdirs ();
index fdddb3b2c21a37b2f940ea4914484e5b0507de1f..559ca640620556e2ca8c35f3d4a64a44a2c1b3e1 100644 (file)
@@ -116,8 +116,6 @@ PBD::Signal3<int,Session*,std::string,DataType> Session::MissingFile;
 
 PBD::Signal1<void, framepos_t> Session::StartTimeChanged;
 PBD::Signal1<void, framepos_t> Session::EndTimeChanged;
-PBD::Signal0<void> Session::AutoBindingOn;
-PBD::Signal0<void> Session::AutoBindingOff;
 PBD::Signal2<void,std::string, std::string> Session::Exported;
 PBD::Signal1<int,boost::shared_ptr<Playlist> > Session::AskAboutPlaylistDeletion;
 PBD::Signal0<void> Session::Quit;