diff options
author | Robin Gareus <robin@gareus.org> | 2020-03-02 19:06:40 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-03-02 19:18:57 +0100 |
commit | 6120d4d43a4a5ff96126ec9093ab652105717ed2 (patch) | |
tree | 9e0e9b03a5d4e92b5a5fbf86ceea3ec01a93844a /gtk2_ardour/route_ui.cc | |
parent | 14c670869c12e20c62c9a3a7e3adb5c361bfa56d (diff) |
Improve RouteUI API consistency
This is an effective NO-OP
* Some methods have been re-named to improve consistency
* Duplicate function calls were removed:
RouteUI::set_route() already updates mute/solo
MixerStrip does not have to update it again
* virtual methods have been protected
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 08d9cb2929..e1b9da4b89 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -340,7 +340,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp) _route->solo_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); _route->solo_safe_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); _route->solo_isolate_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); - _route->phase_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::polarity_changed, this), gui_context()); + _route->phase_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_polarity_display, this), gui_context()); _route->fan_out.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::fan_out, this, false, true), gui_context()); if (is_track()) { @@ -395,7 +395,6 @@ RouteUI::set_route (boost::shared_ptr<Route> rp) map_frozen (); setup_invert_buttons (); - set_invert_button_state (); boost::shared_ptr<Route> s = _showing_sends_to.lock (); bus_send_display_changed (s); @@ -413,16 +412,6 @@ RouteUI::set_route (boost::shared_ptr<Route> rp) route_gui_changed (PropertyChange (Properties::selected)); } -void -RouteUI::polarity_changed () -{ - if (!_route) { - return; - } - - set_invert_button_state (); -} - bool RouteUI::mute_press (GdkEventButton* ev) { @@ -2063,11 +2052,11 @@ RouteUI::setup_invert_buttons () _invert_button_box.set_spacing (1); _invert_button_box.show_all (); - set_invert_button_state (); + update_polarity_display (); } void -RouteUI::set_invert_button_state () +RouteUI::update_polarity_display () { uint32_t const N = _route->phase_control()->size(); if (N > _max_invert_buttons) { @@ -2112,7 +2101,6 @@ RouteUI::invert_release (GdkEventButton* ev, uint32_t i) return false; } - bool RouteUI::invert_press (GdkEventButton* ev) { @@ -2152,7 +2140,6 @@ RouteUI::invert_menu_toggled (uint32_t c) return; } - _route->phase_control()->set_phase_invert (c, !_route->phase_control()->inverted (c)); } |