From 28c81aec62ef5809eea905024ec1b5319e288657 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 27 Aug 2025 12:42:10 +0200 Subject: [PATCH] Fix Application bar tooltips Tooltips depend actions for a given butten (if any). A later call to set_related_action() will break tooltips for a given widget. --- gtk2_ardour/application_bar.cc | 28 +++++++++++++++++----------- gtk2_ardour/application_bar.h | 1 + 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/gtk2_ardour/application_bar.cc b/gtk2_ardour/application_bar.cc index 2b23eff7cd..7def40b8b1 100644 --- a/gtk2_ardour/application_bar.cc +++ b/gtk2_ardour/application_bar.cc @@ -359,17 +359,6 @@ ApplicationBar::on_parent_changed (Gtk::Widget*) monitor_button_size_group->add_widget (_monitor_mono_button); monitor_button_size_group->add_widget (_monitor_mute_button); - /* tooltips */ - Gtkmm2ext::UI::instance()->set_tip (_record_mode_selector, _("Layered, new recordings will be added as regions on a layer atop existing regions.\nSoundOnSound, behaves like Layered, except underlying regions will be audible.\nNon Layered, the underlying region will be spliced and replaced with the newly recorded region.")); - Gtkmm2ext::UI::instance()->set_tip (_latency_disable_button, _("Disable all Plugin Delay Compensation. This results in the shortest delay from live input to output, but any paths with delay-causing plugins will sound later than those without.")); - Gtkmm2ext::UI::instance()->set_tip (_primary_clock, _("Primary Clock right-click to set display mode. Click to edit, click+drag a digit or mouse-over+scroll wheel to modify.\nText edits: right-to-left overwrite Esc: cancel; Enter: confirm; postfix the edit with '+' or '-' to enter delta times.\n")); - Gtkmm2ext::UI::instance()->set_tip (_secondary_clock, _("Secondary Clock right-click to set display mode. Click to edit, click+drag a digit or mouse-over+scroll wheel to modify.\nText edits: right-to-left overwrite Esc: cancel; Enter: confirm; postfix the edit with '+' or '-' to enter delta times.\n")); - Gtkmm2ext::UI::instance()->set_tip (_auditioning_alert_button, _("When active, auditioning is taking place.\nClick to stop the audition")); - Gtkmm2ext::UI::instance()->set_tip (_feedback_alert_button, _("When lit, there is a ports connection issue, leading to feedback loop or ambiguous alignment.\nThis is caused by connecting an output back to some input (feedback), or by multiple connections from a source to the same output via different paths (ambiguous latency, record alignment).")); - Gtkmm2ext::UI::instance()->set_tip (_cue_rec_enable, _("When enabled, triggering Cues will result in Cue Markers added to the timeline")); - Gtkmm2ext::UI::instance()->set_tip (_cue_play_enable, _("When enabled, Cue Markers will trigger the associated Cue when passed on the timeline")); - Gtkmm2ext::UI::instance()->set_tip (_editor_meter_peak_display, _("Reset All Peak Meters")); - /* theming */ _sync_button.set_name ("transport active option button"); _punch_in_button.set_name ("punch button"); @@ -432,6 +421,21 @@ ApplicationBar::on_parent_changed (Gtk::Widget*) #undef PX_SCALE #undef TCOL +void +ApplicationBar::setup_tooltips () +{ + /* tooltips -- after actions have been set */ + Gtkmm2ext::UI::instance()->set_tip (_record_mode_selector, _("Layered, new recordings will be added as regions on a layer atop existing regions.\nSoundOnSound, behaves like Layered, except underlying regions will be audible.\nNon Layered, the underlying region will be spliced and replaced with the newly recorded region.")); + Gtkmm2ext::UI::instance()->set_tip (_latency_disable_button, _("Disable all Plugin Delay Compensation. This results in the shortest delay from live input to output, but any paths with delay-causing plugins will sound later than those without.")); + Gtkmm2ext::UI::instance()->set_tip (_primary_clock, _("Primary Clock right-click to set display mode. Click to edit, click+drag a digit or mouse-over+scroll wheel to modify.\nText edits: right-to-left overwrite Esc: cancel; Enter: confirm; postfix the edit with '+' or '-' to enter delta times.\n")); + Gtkmm2ext::UI::instance()->set_tip (_secondary_clock, _("Secondary Clock right-click to set display mode. Click to edit, click+drag a digit or mouse-over+scroll wheel to modify.\nText edits: right-to-left overwrite Esc: cancel; Enter: confirm; postfix the edit with '+' or '-' to enter delta times.\n")); + Gtkmm2ext::UI::instance()->set_tip (_auditioning_alert_button, _("When active, auditioning is taking place.\nClick to stop the audition")); + Gtkmm2ext::UI::instance()->set_tip (_feedback_alert_button, _("When lit, there is a ports connection issue, leading to feedback loop or ambiguous alignment.\nThis is caused by connecting an output back to some input (feedback), or by multiple connections from a source to the same output via different paths (ambiguous latency, record alignment).")); + Gtkmm2ext::UI::instance()->set_tip (_cue_rec_enable, _("When enabled, triggering Cues will result in Cue Markers added to the timeline")); + Gtkmm2ext::UI::instance()->set_tip (_cue_play_enable, _("When enabled, Cue Markers will trigger the associated Cue when passed on the timeline")); + Gtkmm2ext::UI::instance()->set_tip (_editor_meter_peak_display, _("Reset All Peak Meters")); +} + void ApplicationBar::ui_actions_ready () { @@ -489,6 +493,8 @@ ApplicationBar::ui_actions_ready () if (_session && _have_layout) { repack_transport_hbox(); } + + setup_tooltips (); } void diff --git a/gtk2_ardour/application_bar.h b/gtk2_ardour/application_bar.h index c15bb9fd6b..7372cd2cd5 100644 --- a/gtk2_ardour/application_bar.h +++ b/gtk2_ardour/application_bar.h @@ -70,6 +70,7 @@ private: void parameter_changed (std::string); void ui_actions_ready (); + void setup_tooltips (); void repack_transport_hbox ();