Change Solo button tooltip when using A/PFL

This commit is contained in:
Robin Gareus 2021-03-24 18:16:43 +01:00
parent aacfc0704d
commit 830f76bdce
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 16 additions and 3 deletions

View File

@ -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<Route> 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") {

View File

@ -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<ArdourWidgets::ArdourButton*> _invert_buttons;