diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-05 16:13:52 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-05 16:33:02 -0400 |
commit | 518f7f9892776843f17a59960e081ff1d1d56a50 (patch) | |
tree | f9ba24adc37542e8a6710a29564eded483ceaaaa | |
parent | c0e5265b14a1126237a90c204051e88f7e25ae5a (diff) |
RouteUI connects to Route's PropertyChange signal; derived types implement route_property_changed()
-rw-r--r-- | gtk2_ardour/meter_strip.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/meter_strip.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 15 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 17 | ||||
-rw-r--r-- | gtk2_ardour/route_ui.h | 2 |
6 files changed, 23 insertions, 18 deletions
diff --git a/gtk2_ardour/meter_strip.cc b/gtk2_ardour/meter_strip.cc index 3ad2e8442c..1e1fd8f84a 100644 --- a/gtk2_ardour/meter_strip.cc +++ b/gtk2_ardour/meter_strip.cc @@ -293,7 +293,6 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt) meter_ticks2_area.signal_expose_event().connect (sigc::mem_fun(*this, &MeterStrip::meter_ticks2_expose)); _route->DropReferences.connect (meter_route_connections, invalidator (*this), boost::bind (&MeterStrip::self_delete, this), gui_context()); - _route->PropertyChanged.connect (meter_route_connections, invalidator (*this), boost::bind (&MeterStrip::strip_property_changed, this, _1), gui_context()); peak_display.signal_button_release_event().connect (sigc::mem_fun(*this, &MeterStrip::peak_button_release), false); name_label.signal_button_release_event().connect (sigc::mem_fun(*this, &MeterStrip::name_label_button_release), false); @@ -388,7 +387,7 @@ MeterStrip::set_button_names() } void -MeterStrip::strip_property_changed (const PropertyChange& what_changed) +MeterStrip::route_property_changed (const PropertyChange& what_changed) { if (!what_changed.contains (ARDOUR::Properties::name)) { return; diff --git a/gtk2_ardour/meter_strip.h b/gtk2_ardour/meter_strip.h index fc9b61edb1..2f0924e909 100644 --- a/gtk2_ardour/meter_strip.h +++ b/gtk2_ardour/meter_strip.h @@ -133,7 +133,7 @@ class MeterStrip : public Gtk::VBox, public AxisView, public RouteUI LevelMeterHBox *level_meter; - void strip_property_changed (const PBD::PropertyChange&); + void route_property_changed (const PBD::PropertyChange&); void meter_configuration_changed (ARDOUR::ChanCount); void meter_type_changed (ARDOUR::MeterType); void update_background (ARDOUR::MeterType); diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 67e1d5f40f..30859c8d5e 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -649,7 +649,6 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt) } _route->comment_changed.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::setup_comment_button, this), gui_context()); - _route->PropertyChanged.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::property_changed, this, _1), gui_context()); _route->gain_control()->MasterStatusChange.connect (route_connections, invalidator (*this), @@ -1750,10 +1749,8 @@ MixerStrip::set_selected (bool yn) } void -MixerStrip::property_changed (const PropertyChange& what_changed) +MixerStrip::route_property_changed (const PropertyChange& what_changed) { - RouteUI::property_changed (what_changed); - if (what_changed.contains (ARDOUR::Properties::name)) { name_changed (); } @@ -2626,6 +2623,16 @@ MixerStrip::update_track_number_visibility () } } +bool +MixerStrip::is_selected () const +{ + if (!_route) { + return false; + } + + return _route->presentation_info().selected(); +} + Gdk::Color MixerStrip::color () const { diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index d2e2236941..f1ff2bb35f 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -275,7 +275,7 @@ class MixerStrip : public AxisView, public RouteUI, public Gtk::EventBox void route_color_changed (); void show_passthru_color (); - void property_changed (const PBD::PropertyChange&); + void route_property_changed (const PBD::PropertyChange&); void name_button_resized (Gtk::Allocation&); void name_changed (); void update_speed_display (); diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index e6a6b7cdd2..5c4487818a 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -129,6 +129,14 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, ArdourCan } void +RouteTimeAxisView::route_property_changed (const PBD::PropertyChange& what_changed) +{ + if (what_changed.contains (ARDOUR::Properties::name)) { + label_view (); + } +} + +void RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt) { RouteUI::set_route (rt); @@ -291,7 +299,6 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt) _y_position = -1; _route->processors_changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::processors_changed, this, _1), gui_context()); - _route->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::route_property_changed, this, _1), gui_context()); if (is_track()) { @@ -458,14 +465,6 @@ RouteTimeAxisView::parameter_changed (string const & p) } void -RouteTimeAxisView::route_property_changed (const PropertyChange& what_changed) -{ - if (what_changed.contains (ARDOUR::Properties::name)) { - label_view (); - } -} - -void RouteTimeAxisView::take_name_changed (void *src) { if (src != this) { diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h index 8169769fd4..6b3d5ba7a6 100644 --- a/gtk2_ardour/route_ui.h +++ b/gtk2_ardour/route_ui.h @@ -211,7 +211,7 @@ class RouteUI : public virtual AxisView void manage_pins (); void maybe_add_route_print_mgr (); - virtual void property_changed (const PBD::PropertyChange&); + virtual void route_property_changed (const PBD::PropertyChange&) = 0; void route_removed (); virtual void route_active_changed () {} |