use new ARDOUR::Location signals in GUI
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 20 Sep 2014 02:50:50 +0000 (22:50 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Sat, 20 Sep 2014 03:06:26 +0000 (23:06 -0400)
Conflicts:
gtk2_ardour/editor_markers.cc

gtk2_ardour/editor.h
gtk2_ardour/editor_markers.cc
gtk2_ardour/editor_mouse.cc
gtk2_ardour/location_ui.cc
gtk2_ardour/location_ui.h

index cadde181b5f267910a7879e0c997a3225362e9a3..e07ab4b80ada399d5dea5c3af291da809bec3849 100644 (file)
@@ -569,7 +569,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        Gtk::VBox     scrollers_rulers_markers_box;
 
        void location_changed (ARDOUR::Location *);
-       void location_flags_changed (ARDOUR::Location *, void *);
+       void location_flags_changed (ARDOUR::Location *);
        void refresh_location_display ();
        void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
        void add_new_location (ARDOUR::Location *);
index 11603ef350aa059497f34812ccfaadd8245283ec..5a37fe70cbce7d8f350fb4a3984e94949f9c4605 100644 (file)
@@ -164,7 +164,7 @@ Editor::add_new_location_internal (Location* location)
        }
 
        location->name_changed.connect (*this, invalidator (*this), boost::bind (&Editor::location_changed, this, _1), gui_context());
-       location->FlagsChanged.connect (*this, invalidator (*this), boost::bind (&Editor::location_flags_changed, this, _1, _2), gui_context());
+       location->FlagsChanged.connect (*this, invalidator (*this), boost::bind (&Editor::location_flags_changed, this, location), gui_context());
 
        pair<Location*,LocationMarkers*> newpair;
 
@@ -367,7 +367,7 @@ Editor::update_marker_labels (ArdourCanvas::Container* group)
 }
 
 void
-Editor::location_flags_changed (Location *location, void*)
+Editor::location_flags_changed (Location *location)
 {
        ENSURE_GUI_THREAD (*this, &Editor::location_flags_changed, location, src)
 
index 41fd6ffd0cd2171b13421c94b16e45658d448004..1087b0e817f96292050147d5601c62265a427841 100644 (file)
@@ -1885,7 +1885,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent*, ItemType item_type)
                }
                entered_marker = 0;
                if ((loc = find_location_from_marker (marker, is_start)) != 0) {
-                       location_flags_changed (loc, this);
+                       location_flags_changed (loc);
                }
                // fall through
        case MeterMarkerItem:
index f4a9b7ea07f980d6b341cebf468779126b699b37..538d7315bd3f97658b1790011cb5d44e16b9f70e 100644 (file)
@@ -336,13 +336,15 @@ LocationEditRow::set_location (Location *loc)
 
        --i_am_the_modifier;
 
-       location->start_changed.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::start_changed, this, _1), gui_context());
-       location->end_changed.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::end_changed, this, _1), gui_context());
-       location->name_changed.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::name_changed, this, _1), gui_context());
-       location->changed.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::location_changed, this, _1), gui_context());
-       location->FlagsChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::flags_changed, this, _1, _2), gui_context());
-       location->LockChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::lock_changed, this, _1), gui_context());
-       location->PositionLockStyleChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::position_lock_style_changed, this, _1), gui_context());
+        /* connect to per-location signals, since this row only cares about this location */
+
+       location->NameChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::name_changed, this), gui_context());
+        location->StartChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::start_changed, this), gui_context());
+        location->EndChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::end_changed, this), gui_context());
+        location->Changed.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::location_changed, this), gui_context());
+        location->FlagsChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::flags_changed, this), gui_context()); 
+        location->LockChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::lock_changed, this), gui_context());
+        location->PositionLockStyleChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::position_lock_style_changed, this), gui_context());
 }
 
 void
@@ -589,7 +591,7 @@ LocationEditRow::preemph_toggled ()
 }
 
 void
-LocationEditRow::end_changed (ARDOUR::Location *)
+LocationEditRow::end_changed ()
 {
        ENSURE_GUI_THREAD (*this, &LocationEditRow::end_changed, loc)
 
@@ -605,7 +607,7 @@ LocationEditRow::end_changed (ARDOUR::Location *)
 }
 
 void
-LocationEditRow::start_changed (ARDOUR::Location*)
+LocationEditRow::start_changed ()
 {
        if (!location) return;
 
@@ -624,7 +626,7 @@ LocationEditRow::start_changed (ARDOUR::Location*)
 }
 
 void
-LocationEditRow::name_changed (ARDOUR::Location *)
+LocationEditRow::name_changed ()
 {
        if (!location) return;
 
@@ -639,7 +641,7 @@ LocationEditRow::name_changed (ARDOUR::Location *)
 }
 
 void
-LocationEditRow::location_changed (ARDOUR::Location*)
+LocationEditRow::location_changed ()
 {
 
        if (!location) return;
@@ -657,7 +659,7 @@ LocationEditRow::location_changed (ARDOUR::Location*)
 }
 
 void
-LocationEditRow::flags_changed (ARDOUR::Location*, void *)
+LocationEditRow::flags_changed ()
 {
        if (!location) {
                return;
@@ -673,7 +675,7 @@ LocationEditRow::flags_changed (ARDOUR::Location*, void *)
 }
 
 void
-LocationEditRow::lock_changed (ARDOUR::Location*)
+LocationEditRow::lock_changed ()
 {
        if (!location) {
                return;
@@ -689,7 +691,7 @@ LocationEditRow::lock_changed (ARDOUR::Location*)
 }
 
 void
-LocationEditRow::position_lock_style_changed (ARDOUR::Location*)
+LocationEditRow::position_lock_style_changed ()
 {
        if (!location) {
                return;
index 395464e0492f11cdc275c7f89d2187fed545c469..b363040e577e3cd60bb3a425144eac30bdf53caf 100644 (file)
@@ -131,13 +131,13 @@ class LocationEditRow  : public Gtk::HBox, public ARDOUR::SessionHandlePtr
        void scms_toggled ();
        void preemph_toggled ();
 
-       void end_changed (ARDOUR::Location *);
-       void start_changed (ARDOUR::Location *);
-       void name_changed (ARDOUR::Location *);
-       void location_changed (ARDOUR::Location *);
-       void flags_changed (ARDOUR::Location *, void *src);
-       void lock_changed (ARDOUR::Location *);
-       void position_lock_style_changed (ARDOUR::Location *);
+       void end_changed ();
+       void start_changed ();
+       void name_changed ();
+       void location_changed ();
+       void flags_changed ();
+       void lock_changed ();
+       void position_lock_style_changed ();
 
        void set_clock_editable_status ();
        void show_cd_track_details ();