Use labs() for long instead of abs()
[ardour.git] / gtk2_ardour / transport_masters_dialog.h
index 0030493f4757c0378de62260b7d7c75239948e35..695bfc9a9f3e3565350514be600a427d364f1205 100644 (file)
@@ -1,21 +1,20 @@
 /*
-    Copyright (C) 2018 Paul Davis
-
-    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) 2018-2019 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_gtk_transport_masters_dialog_h__
 #define __ardour_gtk_transport_masters_dialog_h__
@@ -101,6 +100,7 @@ class TransportMastersWidget : public Gtk::VBox, public ARDOUR::SessionHandlePtr
                void update (ARDOUR::Session*, ARDOUR::samplepos_t);
 
                Row (TransportMastersWidget& parent);
+               ~Row ();
 
                struct PortColumns : public Gtk::TreeModel::ColumnRecord {
                        PortColumns() {
@@ -143,10 +143,13 @@ class TransportMastersWidget : public Gtk::VBox, public ARDOUR::SessionHandlePtr
        PBD::ScopedConnection current_connection;
        PBD::ScopedConnection add_connection;
        PBD::ScopedConnection remove_connection;
+       PBD::ScopedConnection engine_running_connection;
 
        void rebuild ();
+       void clear ();
        void current_changed (boost::shared_ptr<ARDOUR::TransportMaster> old_master, boost::shared_ptr<ARDOUR::TransportMaster> new_master);
        void add_master ();
+       void update_usability ();
 
   public:
        bool idle_remove (Row*);