Add more clues to port themes to new paradigm
[ardour.git] / gtk2_ardour / meterbridge.h
index 1709455ae4cf735f0d418d85875d732552d31165..7b10c0d5da9c3de40846afc067fefd696d3aa549 100644 (file)
@@ -1,22 +1,21 @@
 /*
-    Copyright (C) 2012 Paul Davis
-    Author: Robin Gareus
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
+ * Copyright (C) 2016 Paul Davis <paul@linuxaudiosystems.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 #ifndef __ardour_meterbridge_h__
 #define __ardour_meterbridge_h__
 
@@ -44,7 +43,7 @@ class Meterbridge :
        public ARDOUR::SessionHandlePtr,
        public Gtkmm2ext::VisibilityTracker
 {
-  public:
+public:
        static Meterbridge* instance();
        ~Meterbridge();
 
@@ -56,7 +55,7 @@ class Meterbridge :
        void show_window ();
        bool hide_window (GdkEventAny *ev);
 
-  private:
+private:
        Meterbridge ();
        static Meterbridge* _instance;
 
@@ -81,7 +80,7 @@ class Meterbridge :
 
        void session_going_away ();
        void sync_order_keys ();
-       void resync_order ();
+       void resync_order (PBD::PropertyChange what_changed = ARDOUR::Properties::order);
        mutable Glib::Threads::Mutex _resync_mutex;
 
        struct MeterBridgeStrip {
@@ -94,7 +93,8 @@ class Meterbridge :
                }
        };
 
-       struct MeterOrderRouteSorter {
+       struct MeterOrderRouteSorter
+       {
                bool operator() (struct MeterBridgeStrip ma, struct MeterBridgeStrip mb) {
                        boost::shared_ptr<ARDOUR::Route> a = ma.s->route();
                        boost::shared_ptr<ARDOUR::Route> b = mb.s->route();
@@ -107,7 +107,7 @@ class Meterbridge :
                                /* everything comes before b */
                                return true;
                        }
-                       return a->order_key () < b->order_key ();
+                       return ARDOUR::Stripable::Sorter (true) (a, b);
                }
        };