diff options
author | Robin Gareus <robin@gareus.org> | 2014-09-03 02:35:42 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-09-03 02:40:01 +0200 |
commit | c4212fb10b419023ad8c1176793fa3de15d47b35 (patch) | |
tree | 1c241aa3f324a6ecf689cca3ceefce376ae1024e /gtk2_ardour/route_ui.cc | |
parent | 599af96971fdeb8f1dc15b6a96e01d581f67a061 (diff) |
use tape-track rec-enable icon throughout.
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index d2dc147ead..e828d1fefb 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -248,6 +248,10 @@ RouteUI::set_route (boost::shared_ptr<Route> rp) _route->solo_safe_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); _route->listen_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); _route->solo_isolated_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); + if (is_track()) { + track()->TrackModeChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::track_mode_changed, this), gui_context()); + track_mode_changed(); + } _route->phase_invert_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::polarity_changed, this), gui_context()); _route->PropertyChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::property_changed, this, _1), gui_context()); @@ -2154,6 +2158,22 @@ RouteUI::route_gui_changed (string what_changed) } } +void +RouteUI::track_mode_changed (void) +{ + assert(is_track()); + switch (track()->mode()) { + case ARDOUR::NonLayered: + case ARDOUR::Normal: + rec_enable_button->set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::RecButton)); + break; + case ARDOUR::Destructive: + rec_enable_button->set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::RecButton|ArdourButton::RecTapeMode)); + break; + } + rec_enable_button->queue_draw(); +} + /** @return the color that this route should use; it maybe its own, or it maybe that of its route group. */ |