diff options
author | Robin Gareus <robin@gareus.org> | 2016-01-08 14:22:02 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-01-08 14:22:02 +0100 |
commit | 5a766dc24d75cc4148a45253846dbebfe7d626b2 (patch) | |
tree | 0464784c4d8684af1ea44a91c4440a4ce9c91f0b /gtk2_ardour/mixer_strip.cc | |
parent | 13148d29e2f00c669edf52b6925946a1852f7c5d (diff) |
indicate monitor-state
Diffstat (limited to 'gtk2_ardour/mixer_strip.cc')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index df7621b8ea..5247d89033 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -501,8 +501,10 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt) } if (monitor_section_button == 0) { Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMonitorSection"); + _session->MonitorChanged.connect (route_connections, invalidator (*this), boost::bind (&MixerStrip::monitor_changed, this), gui_context()); + monitor_section_button = manage (new ArdourButton); - monitor_section_button->set_name ("master monitor section button"); + monitor_changed (); monitor_section_button->set_related_action (act); set_tooltip (monitor_section_button, _("Show/Hide Monitoring Section")); mute_solo_table.attach (*monitor_section_button, 1, 2, 0, 1); @@ -1948,6 +1950,18 @@ MixerStrip::meter_point_string (MeterPoint mp) return string(); } +/** Called when the monitor-section state */ +void +MixerStrip::monitor_changed () +{ + assert (monitor_section_button); + if (_session->monitor_active()) { + monitor_section_button->set_name ("master monitor section button active"); + } else { + monitor_section_button->set_name ("master monitor section button normal"); + } +} + /** Called when the metering point has changed */ void MixerStrip::meter_changed () |