From 830f76bdce3ca83733d12cfd617d1f01aa116207 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 24 Mar 2021 18:16:43 +0100 Subject: [PATCH] Change Solo button tooltip when using A/PFL --- gtk2_ardour/route_ui.cc | 18 +++++++++++++++--- gtk2_ardour/route_ui.h | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 9576b461d2..19e55567b6 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -209,7 +209,6 @@ RouteUI::init () solo_button = manage (new ArdourButton); solo_button->set_name ("solo button"); - UI::instance()->set_tip (solo_button, _("Mute other (non-soloed) tracks"), ""); solo_button->set_no_show_all (true); rec_enable_button = manage (new ArdourButton); @@ -240,7 +239,7 @@ RouteUI::init () _session->SoloChanged.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::solo_changed_so_update_mute, this), gui_context()); _session->TransportStateChange.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::check_rec_enable_sensitivity, this), gui_context()); _session->RecordStateChanged.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::session_rec_enable_changed, this), gui_context()); - _session->MonitorBusAddedOrRemoved.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::set_button_names, this), gui_context()); + _session->MonitorBusAddedOrRemoved.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_button, this), gui_context()); _session->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteUI::parameter_changed, this, _1), gui_context()); Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteUI::parameter_changed, this, _1), gui_context()); @@ -435,6 +434,7 @@ RouteUI::set_route (boost::shared_ptr rp) update_mute_display (); update_solo_display (); + update_solo_button (); if (!UIConfiguration::instance().get_blink_rec_arm()) { blink_rec_display(true); // set initial rec-en button state @@ -1983,6 +1983,18 @@ RouteUI::check_rec_enable_sensitivity () update_monitoring_display (); } +void +RouteUI::update_solo_button () +{ + set_button_names (); + + if (Config->get_solo_control_is_listen_control()) { + UI::instance()->set_tip (solo_button, _("Listen to this track"), ""); + } else { + UI::instance()->set_tip (solo_button, _("Mute other (non-soloed) tracks"), ""); + } +} + void RouteUI::parameter_changed (string const & p) { @@ -1991,7 +2003,7 @@ RouteUI::parameter_changed (string const & p) if (p == "disable-disarm-during-roll") { check_rec_enable_sensitivity (); } else if (p == "solo-control-is-listen-control" || p == "listen-position") { - set_button_names (); + update_solo_button (); } else if (p == "session-monitoring") { update_monitoring_display (); } else if (p == "auto-input") { diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h index 3d0bff7dd7..e8948cbc67 100644 --- a/gtk2_ardour/route_ui.h +++ b/gtk2_ardour/route_ui.h @@ -348,6 +348,7 @@ private: void update_solo_display (); void update_mute_display (); void update_polarity_display (); + void update_solo_button (); int _i_am_the_modifier; std::vector _invert_buttons;