enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
[ardour.git] / gtk2_ardour / route_processor_selection.cc
index 8975bf90bcd13fdb953570d0051ca61f83dbd94c..729032e637fde74e8df417b98261e329c85471c9 100644 (file)
@@ -26,7 +26,7 @@
 #include "route_processor_selection.h"
 #include "route_ui.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -42,7 +42,7 @@ RouteProcessorSelection::operator= (const RouteProcessorSelection& other)
 {
        if (&other != this) {
                processors = other.processors;
-               routes = other.routes;
+               axes = other.axes;
        }
        return *this;
 }
@@ -51,7 +51,7 @@ bool
 operator== (const RouteProcessorSelection& a, const RouteProcessorSelection& b)
 {
        // XXX MUST TEST PROCESSORS SOMEHOW
-       return a.routes == b.routes;
+       return a.axes == b.axes;
 }
 
 void
@@ -71,10 +71,10 @@ RouteProcessorSelection::clear_processors ()
 void
 RouteProcessorSelection::clear_routes ()
 {
-       for (RouteUISelection::iterator i = routes.begin(); i != routes.end(); ++i) {
+       for (AxisViewSelection::iterator i = axes.begin(); i != axes.end(); ++i) {
                (*i)->set_selected (false);
        }
-       routes.clear ();
+       axes.clear ();
        drop_connections ();
        if (!_no_route_change_signal) {
                RoutesChanged ();
@@ -98,34 +98,33 @@ RouteProcessorSelection::set (XMLNode* node)
 }
 
 void
-RouteProcessorSelection::add (RouteUI* r)
+RouteProcessorSelection::add (AxisView* r)
 {
-       if (find (routes.begin(), routes.end(), r) == routes.end()) {
-               if (routes.insert (r).second) {
-                       r->set_selected (true);
-
-                       MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
-                       
-                       if (ms) {
-                               ms->CatchDeletion.connect (*this, invalidator (*this), boost::bind (&RouteProcessorSelection::remove, this, _1), gui_context());
-                       }
-                       
-                       if (!_no_route_change_signal) {
-                               RoutesChanged();
-                       }
+       if (axes.insert (r).second) {
+
+               r->set_selected (true);
+
+               MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
+
+               if (ms) {
+                       ms->CatchDeletion.connect (*this, invalidator (*this), boost::bind (&RouteProcessorSelection::remove, this, _1), gui_context());
+               }
+
+               if (!_no_route_change_signal) {
+                       RoutesChanged();
                }
        }
 }
 
 void
-RouteProcessorSelection::remove (RouteUI* r)
+RouteProcessorSelection::remove (AxisView* r)
 {
        ENSURE_GUI_THREAD (*this, &RouteProcessorSelection::remove, r);
 
-       RouteUISelection::iterator i;
-       if ((i = find (routes.begin(), routes.end(), r)) != routes.end()) {
+       AxisViewSelection::iterator i;
+       if ((i = find (axes.begin(), axes.end(), r)) != axes.end()) {
                (*i)->set_selected (false);
-               routes.erase (i);
+               axes.erase (i);
                if (!_no_route_change_signal) {
                        RoutesChanged ();
                }
@@ -133,22 +132,22 @@ RouteProcessorSelection::remove (RouteUI* r)
 }
 
 void
-RouteProcessorSelection::set (RouteUI* r)
+RouteProcessorSelection::set (AxisView* r)
 {
        clear_routes ();
        add (r);
 }
 
 bool
-RouteProcessorSelection::selected (RouteUI* r)
+RouteProcessorSelection::selected (AxisView* r)
 {
-       return find (routes.begin(), routes.end(), r) != routes.end();
+       return find (axes.begin(), axes.end(), r) != axes.end();
 }
 
 bool
 RouteProcessorSelection::empty ()
 {
-       return processors.empty () && routes.empty ();
+       return processors.empty () && axes.empty ();
 }
 
 void