From 1d42ed077e555a83a93bac436547e7c378ee0c00 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Mon, 5 Jan 2015 12:32:14 +0700 Subject: Use ARDOUR_UI_UTILS::set_tooltip rather than via ARDOUR_UI::set_tip This removes the direct dependence on ARDOUR_UI/Gtk_UI for setting tooltips. Removes inclusion of ardour_ui.h from 16 files. --- gtk2_ardour/automation_time_axis.cc | 10 +++--- gtk2_ardour/button_joiner.cc | 5 +-- gtk2_ardour/editor.cc | 49 ++++++++++++++------------- gtk2_ardour/editor_regions.cc | 3 +- gtk2_ardour/editor_route_groups.cc | 3 +- gtk2_ardour/editor_routes.cc | 3 +- gtk2_ardour/export_timespan_selector.cc | 2 -- gtk2_ardour/gain_meter.cc | 10 +++--- gtk2_ardour/generic_pluginui.cc | 7 ++-- gtk2_ardour/location_ui.cc | 19 ++++++----- gtk2_ardour/meter_strip.cc | 12 +++---- gtk2_ardour/midi_time_axis.cc | 8 ++--- gtk2_ardour/mixer_strip.cc | 20 +++++------ gtk2_ardour/monitor_section.cc | 20 +++++------ gtk2_ardour/panner_ui.cc | 7 ++-- gtk2_ardour/plugin_selector.cc | 7 ++-- gtk2_ardour/plugin_ui.cc | 22 ++++++------ gtk2_ardour/processor_box.cc | 11 +++--- gtk2_ardour/region_editor.cc | 4 ++- gtk2_ardour/route_time_axis.cc | 25 +++++++------- gtk2_ardour/session_dialog.cc | 3 +- gtk2_ardour/shuttle_control.cc | 5 +-- gtk2_ardour/startup.cc | 1 - gtk2_ardour/step_entry.cc | 60 ++++++++++++++++----------------- gtk2_ardour/time_axis_view.cc | 4 +-- 25 files changed, 166 insertions(+), 154 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 032ffc3b11..c9deae95df 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -36,7 +36,6 @@ #include "canvas/debug.h" -#include "ardour_ui.h" #include "automation_time_axis.h" #include "automation_streamview.h" #include "gui_thread.h" @@ -45,6 +44,7 @@ #include "paste_context.h" #include "public_editor.h" #include "selection.h" +#include "tooltips.h" #include "rgb_macros.h" #include "point_selection.h" #include "control_point.h" @@ -101,7 +101,7 @@ AutomationTimeAxisView::AutomationTimeAxisView ( tipname += ": "; } tipname += nom; - ARDOUR_UI::instance()->set_tip(controls_ebox, tipname); + set_tooltip(controls_ebox, tipname); //plugin name and param name appear on 2 separate lines in the track header tipname = nomparent; @@ -160,8 +160,8 @@ AutomationTimeAxisView::AutomationTimeAxisView ( controls_table.set_no_show_all(); - ARDOUR_UI::instance()->set_tip(auto_button, _("automation state")); - ARDOUR_UI::instance()->set_tip(hide_button, _("hide track")); + set_tooltip(auto_button, _("automation state")); + set_tooltip(hide_button, _("hide track")); const string str = gui_property ("height"); if (!str.empty()) { @@ -171,7 +171,7 @@ AutomationTimeAxisView::AutomationTimeAxisView ( } //name label isn't editable on an automation track; remove the tooltip - ARDOUR_UI::instance()->set_tip (name_label, X_("")); + set_tooltip (name_label, X_("")); /* repack the name label */ diff --git a/gtk2_ardour/button_joiner.cc b/gtk2_ardour/button_joiner.cc index 88f79c25a2..59affc646f 100644 --- a/gtk2_ardour/button_joiner.cc +++ b/gtk2_ardour/button_joiner.cc @@ -27,11 +27,12 @@ #include "gtkmm2ext/utils.h" #include "gtkmm2ext/rgb_macros.h" -#include "ardour_ui.h" #include "button_joiner.h" +#include "tooltips.h" #include "ui_config.h" using namespace Gtk; +using namespace ARDOUR_UI_UTILS; ButtonJoiner::ButtonJoiner (const std::string& str, Gtk::Widget& lw, Gtk::Widget& rw, bool central_joiner) : left (lw) @@ -219,7 +220,7 @@ void ButtonJoiner::action_tooltip_changed () { std::string str = _action->property_tooltip().get_value(); - ARDOUR_UI::instance()->set_tip (*this, str); + set_tooltip (*this, str); } void diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 2f6a52cab9..06a2d9d8f5 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -124,6 +124,7 @@ #include "tempo_lines.h" #include "time_axis_view.h" #include "timers.h" +#include "tooltips.h" #include "ui_config.h" #include "utils.h" #include "verbose_cursor.h" @@ -3232,30 +3233,30 @@ Editor::build_snap_type_menu () void Editor::setup_tooltips () { - ARDOUR_UI::instance()->set_tip (smart_mode_button, _("Smart Mode (add Range functions to Grab mode)")); - ARDOUR_UI::instance()->set_tip (mouse_move_button, _("Grab Mode (select/move objects)")); - ARDOUR_UI::instance()->set_tip (mouse_cut_button, _("Cut Mode (split regions)")); - ARDOUR_UI::instance()->set_tip (mouse_select_button, _("Range Mode (select time ranges)")); - ARDOUR_UI::instance()->set_tip (mouse_draw_button, _("Draw Mode (draw and edit gain/notes/automation)")); - ARDOUR_UI::instance()->set_tip (mouse_timefx_button, _("Stretch Mode (time-stretch audio and midi regions, preserving pitch)")); - ARDOUR_UI::instance()->set_tip (mouse_audition_button, _("Audition Mode (listen to regions)")); - ARDOUR_UI::instance()->set_tip (mouse_content_button, _("Internal Edit Mode (edit notes and automation points)")); - ARDOUR_UI::instance()->set_tip (*_group_tabs, _("Groups: click to (de)activate\nContext-click for other operations")); - ARDOUR_UI::instance()->set_tip (nudge_forward_button, _("Nudge Region/Selection Later")); - ARDOUR_UI::instance()->set_tip (nudge_backward_button, _("Nudge Region/Selection Earlier")); - ARDOUR_UI::instance()->set_tip (zoom_in_button, _("Zoom In")); - ARDOUR_UI::instance()->set_tip (zoom_out_button, _("Zoom Out")); - ARDOUR_UI::instance()->set_tip (zoom_preset_selector, _("Zoom to Time Scale")); - ARDOUR_UI::instance()->set_tip (zoom_out_full_button, _("Zoom to Session")); - ARDOUR_UI::instance()->set_tip (zoom_focus_selector, _("Zoom focus")); - ARDOUR_UI::instance()->set_tip (tav_expand_button, _("Expand Tracks")); - ARDOUR_UI::instance()->set_tip (tav_shrink_button, _("Shrink Tracks")); - ARDOUR_UI::instance()->set_tip (visible_tracks_selector, _("Number of visible tracks")); - ARDOUR_UI::instance()->set_tip (snap_type_selector, _("Snap/Grid Units")); - ARDOUR_UI::instance()->set_tip (snap_mode_selector, _("Snap/Grid Mode")); - ARDOUR_UI::instance()->set_tip (edit_point_selector, _("Edit point")); - ARDOUR_UI::instance()->set_tip (edit_mode_selector, _("Edit Mode")); - ARDOUR_UI::instance()->set_tip (nudge_clock, _("Nudge Clock\n(controls distance used to nudge regions and selections)")); + set_tooltip (smart_mode_button, _("Smart Mode (add Range functions to Grab mode)")); + set_tooltip (mouse_move_button, _("Grab Mode (select/move objects)")); + set_tooltip (mouse_cut_button, _("Cut Mode (split regions)")); + set_tooltip (mouse_select_button, _("Range Mode (select time ranges)")); + set_tooltip (mouse_draw_button, _("Draw Mode (draw and edit gain/notes/automation)")); + set_tooltip (mouse_timefx_button, _("Stretch Mode (time-stretch audio and midi regions, preserving pitch)")); + set_tooltip (mouse_audition_button, _("Audition Mode (listen to regions)")); + set_tooltip (mouse_content_button, _("Internal Edit Mode (edit notes and automation points)")); + set_tooltip (*_group_tabs, _("Groups: click to (de)activate\nContext-click for other operations")); + set_tooltip (nudge_forward_button, _("Nudge Region/Selection Later")); + set_tooltip (nudge_backward_button, _("Nudge Region/Selection Earlier")); + set_tooltip (zoom_in_button, _("Zoom In")); + set_tooltip (zoom_out_button, _("Zoom Out")); + set_tooltip (zoom_preset_selector, _("Zoom to Time Scale")); + set_tooltip (zoom_out_full_button, _("Zoom to Session")); + set_tooltip (zoom_focus_selector, _("Zoom focus")); + set_tooltip (tav_expand_button, _("Expand Tracks")); + set_tooltip (tav_shrink_button, _("Shrink Tracks")); + set_tooltip (visible_tracks_selector, _("Number of visible tracks")); + set_tooltip (snap_type_selector, _("Snap/Grid Units")); + set_tooltip (snap_mode_selector, _("Snap/Grid Mode")); + set_tooltip (edit_point_selector, _("Edit point")); + set_tooltip (edit_mode_selector, _("Edit Mode")); + set_tooltip (nudge_clock, _("Nudge Clock\n(controls distance used to nudge regions and selections)")); } int diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc index ef6adb844a..446e79a0c0 100644 --- a/gtk2_ardour/editor_regions.cc +++ b/gtk2_ardour/editor_regions.cc @@ -48,6 +48,7 @@ #include "editor_regions.h" #include "editor_drag.h" #include "main_clock.h" +#include "tooltips.h" #include "ui_config.h" #include "i18n.h" @@ -127,7 +128,7 @@ EditorRegions::EditorRegions (Editor* e) for (int i = 0; ci[i].index >= 0; ++i) { col = _display.get_column (ci[i].index); l = manage (new Label (ci[i].label)); - ARDOUR_UI::instance()->set_tip (*l, ci[i].tooltip); + set_tooltip (*l, ci[i].tooltip); col->set_widget (*l); l->show (); diff --git a/gtk2_ardour/editor_route_groups.cc b/gtk2_ardour/editor_route_groups.cc index 64dc1e414b..98a38b9b00 100644 --- a/gtk2_ardour/editor_route_groups.cc +++ b/gtk2_ardour/editor_route_groups.cc @@ -45,6 +45,7 @@ #include "route_group_dialog.h" #include "route_time_axis.h" #include "time_axis_view.h" +#include "tooltips.h" #include "utils.h" #include "i18n.h" @@ -112,7 +113,7 @@ EditorRouteGroups::EditorRouteGroups (Editor* e) for (int i = 0; ci[i].index >= 0; ++i) { col = _display.get_column (ci[i].index); l = manage (new Label (ci[i].label)); - ARDOUR_UI::instance()->set_tip (*l, ci[i].tooltip); + set_tooltip (*l, ci[i].tooltip); col->set_widget (*l); l->show (); diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc index b249c0a100..7e5747a8df 100644 --- a/gtk2_ardour/editor_routes.cc +++ b/gtk2_ardour/editor_routes.cc @@ -47,6 +47,7 @@ #include "midi_time_axis.h" #include "mixer_strip.h" #include "route_sorter.h" +#include "tooltips.h" #include "utils.h" #include "i18n.h" @@ -219,7 +220,7 @@ EditorRoutes::EditorRoutes (Editor* e) for (int i = 0; ci[i].index >= 0; ++i) { col = _display.get_column (ci[i].index); l = manage (new Label (ci[i].label)); - ARDOUR_UI::instance()->set_tip (*l, ci[i].tooltip); + set_tooltip (*l, ci[i].tooltip); col->set_widget (*l); l->show (); } diff --git a/gtk2_ardour/export_timespan_selector.cc b/gtk2_ardour/export_timespan_selector.cc index 61d813d222..0c6ff08cf9 100644 --- a/gtk2_ardour/export_timespan_selector.cc +++ b/gtk2_ardour/export_timespan_selector.cc @@ -20,8 +20,6 @@ #include "export_timespan_selector.h" -#include "ardour_ui.h" - #include "ardour/location.h" #include "ardour/types.h" #include "ardour/session.h" diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 8f1f516119..eb88b1ec9b 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -34,7 +34,6 @@ #include "pbd/fastlog.h" #include "pbd/stacktrace.h" -#include "ardour_ui.h" #include "gain_meter.h" #include "logmeter.h" #include "gui_thread.h" @@ -43,6 +42,7 @@ #include "utils.h" #include "meter_patterns.h" #include "timers.h" +#include "tooltips.h" #include "ui_config.h" #include "ardour/session.h" @@ -146,8 +146,8 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int gain_automation_style_button.set_name ("mixer strip button"); gain_automation_state_button.set_name ("mixer strip button"); - ARDOUR_UI::instance()->set_tip (gain_automation_state_button, _("Fader automation mode")); - ARDOUR_UI::instance()->set_tip (gain_automation_style_button, _("Fader automation type")); + set_tooltip (gain_automation_state_button, _("Fader automation mode")); + set_tooltip (gain_automation_style_button, _("Fader automation type")); gain_automation_style_button.unset_flags (Gtk::CAN_FOCUS); gain_automation_state_button.unset_flags (Gtk::CAN_FOCUS); @@ -959,8 +959,8 @@ GainMeter::GainMeter (Session* s, int fader_length) gain_automation_style_button.set_name ("mixer strip button"); gain_automation_state_button.set_name ("mixer strip button"); - ARDOUR_UI::instance()->set_tip (gain_automation_state_button, _("Fader automation mode")); - ARDOUR_UI::instance()->set_tip (gain_automation_style_button, _("Fader automation type")); + set_tooltip (gain_automation_state_button, _("Fader automation mode")); + set_tooltip (gain_automation_style_button, _("Fader automation type")); gain_automation_style_button.unset_flags (Gtk::CAN_FOCUS); gain_automation_state_button.unset_flags (Gtk::CAN_FOCUS); diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index 8abefa7fc8..71d5639c79 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -43,12 +43,12 @@ #include "ardour/session.h" #include "ardour/value_as_string.h" -#include "ardour_ui.h" #include "prompter.h" #include "plugin_ui.h" #include "gui_thread.h" #include "automation_controller.h" #include "timers.h" +#include "tooltips.h" #include "ui_config.h" #include "i18n.h" @@ -58,6 +58,7 @@ using namespace ARDOUR; using namespace PBD; using namespace Gtkmm2ext; using namespace Gtk; +using namespace ARDOUR_UI_UTILS; GenericPluginUI::GenericPluginUI (boost::shared_ptr pi, bool scrollable) : PlugUIBase (pi) @@ -298,7 +299,7 @@ GenericPluginUI::build () const std::string param_docs = plugin->get_parameter_docs(i); if (!param_docs.empty()) { - ARDOUR_UI::instance()->set_tip(cui, param_docs.c_str()); + set_tooltip(cui, param_docs.c_str()); } control_uis.push_back(cui); @@ -489,7 +490,7 @@ GenericPluginUI::ControlUI::ControlUI (const Evoral::Parameter& p) , file_button(NULL) { automate_button.set_name ("PluginAutomateButton"); - ARDOUR_UI::instance()->set_tip (automate_button, _("Automation control")); + set_tooltip (automate_button, _("Automation control")); /* XXX translators: use a string here that will be at least as long as the longest automation label (see ::automation_state_changed() diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index 3a080191a4..0d61718a61 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -34,6 +34,7 @@ #include "prompter.h" #include "utils.h" #include "public_editor.h" +#include "tooltips.h" #include "ui_config.h" #include "i18n.h" @@ -315,20 +316,20 @@ LocationEditRow::set_location (Location *loc) show_cd_track_details (); } - ARDOUR_UI::instance()->set_tip (remove_button, _("Remove this range")); - ARDOUR_UI::instance()->set_tip (start_clock, _("Start time - middle click to locate here")); - ARDOUR_UI::instance()->set_tip (end_clock, _("End time - middle click to locate here")); - ARDOUR_UI::instance()->set_tip (length_clock, _("Length")); + set_tooltip (remove_button, _("Remove this range")); + set_tooltip (start_clock, _("Start time - middle click to locate here")); + set_tooltip (end_clock, _("End time - middle click to locate here")); + set_tooltip (length_clock, _("Length")); - ARDOUR_UI::instance()->set_tip (start_to_playhead_button, _("Set range start from playhead location")); - ARDOUR_UI::instance()->set_tip (end_to_playhead_button, _("Set range end from playhead location")); + set_tooltip (start_to_playhead_button, _("Set range start from playhead location")); + set_tooltip (end_to_playhead_button, _("Set range end from playhead location")); } else { - ARDOUR_UI::instance()->set_tip (remove_button, _("Remove this marker")); - ARDOUR_UI::instance()->set_tip (start_clock, _("Position - middle click to locate here")); + set_tooltip (remove_button, _("Remove this marker")); + set_tooltip (start_clock, _("Position - middle click to locate here")); - ARDOUR_UI::instance()->set_tip (start_to_playhead_button, _("Set marker time from playhead location")); + set_tooltip (start_to_playhead_button, _("Set marker time from playhead location")); end_clock.hide(); length_clock.hide(); diff --git a/gtk2_ardour/meter_strip.cc b/gtk2_ardour/meter_strip.cc index b1199811ef..82acd1dad5 100644 --- a/gtk2_ardour/meter_strip.cc +++ b/gtk2_ardour/meter_strip.cc @@ -34,10 +34,10 @@ #include #include -#include "ardour_ui.h" #include "logmeter.h" #include "gui_thread.h" #include "ardour_window.h" +#include "tooltips.h" #include "ui_config.h" #include "utils.h" @@ -158,7 +158,7 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr rt) // peak display peak_display.set_name ("meterbridge peakindicator"); peak_display.set_elements((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body)); - ARDOUR_UI::instance()->set_tip (peak_display, _("Reset Peak")); + set_tooltip (peak_display, _("Reset Peak")); max_peak = minus_infinity(); peak_display.unset_flags (Gtk::CAN_FOCUS); peak_display.set_size_request(PX_SCALE(12, 12), PX_SCALE(8, 8)); @@ -183,8 +183,8 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr rt) name_label.set_layout_ellipsize_width(48 * PANGO_SCALE); name_label.set_size_request(PX_SCALE(18, 18), PX_SCALE(50, 50)); name_label.set_alignment(-1.0, .5); - ARDOUR_UI::instance()->set_tip (name_label, _route->name()); - ARDOUR_UI::instance()->set_tip (*level_meter, _route->name()); + set_tooltip (name_label, _route->name()); + set_tooltip (*level_meter, _route->name()); number_label.set_corner_radius(2); number_label.set_elements((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::Text|ArdourButton::Inactive)); @@ -396,9 +396,9 @@ MeterStrip::strip_property_changed (const PropertyChange& what_changed) } ENSURE_GUI_THREAD (*this, &MeterStrip::strip_name_changed, what_changed); name_changed(); - ARDOUR_UI::instance()->set_tip (name_label, _route->name()); + set_tooltip (name_label, _route->name()); if (level_meter) { - ARDOUR_UI::instance()->set_tip (*level_meter, _route->name()); + set_tooltip (*level_meter, _route->name()); } } diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 53ef92c30a..7b75c994a1 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -60,7 +60,6 @@ #include "ardour/track.h" #include "ardour/types.h" -#include "ardour_ui.h" #include "ardour_button.h" #include "automation_line.h" #include "automation_time_axis.h" @@ -84,6 +83,7 @@ #include "rgb_macros.h" #include "selection.h" #include "step_editor.h" +#include "tooltips.h" #include "utils.h" #include "note_base.h" @@ -311,8 +311,8 @@ MidiTimeAxisView::set_route (boost::shared_ptr rt) } } - ARDOUR_UI::instance()->set_tip (_midnam_model_selector, _("External MIDI Device")); - ARDOUR_UI::instance()->set_tip (_midnam_custom_device_mode_selector, _("External Device Mode")); + set_tooltip (_midnam_model_selector, _("External MIDI Device")); + set_tooltip (_midnam_custom_device_mode_selector, _("External Device Mode")); _midi_controls_box.set_homogeneous(false); _midi_controls_box.set_border_width (2); @@ -322,7 +322,7 @@ MidiTimeAxisView::set_route (boost::shared_ptr rt) ArdourButton *channel_selector_button = manage (new ArdourButton(_("Chns"))); channel_selector_button->set_name ("route button"); - ARDOUR_UI::instance()->set_tip (channel_selector_button, _("Click to edit channel settings")); + set_tooltip (channel_selector_button, _("Click to edit channel settings")); // Insert expanding space labels to get full width justification _channel_status_box.pack_start (_playback_channel_status, false, false, 2); diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 0a0c44447c..bda775ed56 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -53,7 +53,6 @@ #include "ardour/types.h" #include "ardour/user_bundle.h" -#include "ardour_ui.h" #include "ardour_window.h" #include "mixer_strip.h" #include "mixer_ui.h" @@ -66,6 +65,7 @@ #include "gui_thread.h" #include "route_group_menu.h" #include "meter_patterns.h" +#include "tooltips.h" #include "ui_config.h" #include "i18n.h" @@ -156,10 +156,10 @@ MixerStrip::init () } width_button.set_icon (ArdourIcon::StripWidth); - ARDOUR_UI::instance()->set_tip (width_button, t); + set_tooltip (width_button, t); hide_button.set_icon (ArdourIcon::CloseCross); - ARDOUR_UI::instance()->set_tip (&hide_button, _("Hide this mixer strip")); + set_tooltip (&hide_button, _("Hide this mixer strip")); input_button_box.set_spacing(2); @@ -170,7 +170,7 @@ MixerStrip::init () output_button.set_text (_("Output")); output_button.set_name ("mixer strip button"); - ARDOUR_UI::instance()->set_tip (&meter_point_button, _("Click to select metering point"), ""); + set_tooltip (&meter_point_button, _("Click to select metering point")); meter_point_button.set_name ("mixer strip button"); bottom_button_table.attach (meter_point_button, 2, 3, 0, 1); @@ -251,7 +251,7 @@ MixerStrip::init () name_button.set_text_ellipsize (Pango::ELLIPSIZE_END); name_button.signal_size_allocate().connect (sigc::mem_fun (*this, &MixerStrip::name_button_resized)); - ARDOUR_UI::instance()->set_tip (&group_button, _("Mix group"), ""); + set_tooltip (&group_button, _("Mix group")); group_button.set_name ("mixer strip button"); _comment_button.set_name (X_("mixer strip button")); @@ -544,7 +544,7 @@ MixerStrip::set_route (boost::shared_ptr rt) midi_input_enable_button->set_icon (ArdourIcon::DinMidi); midi_input_enable_button->signal_button_press_event().connect (sigc::mem_fun (*this, &MixerStrip::input_active_button_press), false); midi_input_enable_button->signal_button_release_event().connect (sigc::mem_fun (*this, &MixerStrip::input_active_button_release), false); - ARDOUR_UI::instance()->set_tip (midi_input_enable_button, _("Enable/Disable MIDI input")); + set_tooltip (midi_input_enable_button, _("Enable/Disable MIDI input")); } else { input_button_box.remove (*midi_input_enable_button); } @@ -1335,9 +1335,9 @@ MixerStrip::update_io_button (boost::shared_ptr route, Width widt strcpy(tooltip_cstr, tooltip.str().c_str()); if (for_input) { - ARDOUR_UI::instance()->set_tip (&input_button, tooltip_cstr, ""); + set_tooltip (&input_button, tooltip_cstr); } else { - ARDOUR_UI::instance()->set_tip (&output_button, tooltip_cstr, ""); + set_tooltip (&output_button, tooltip_cstr); } if (each_io_has_one_connection) { @@ -1472,7 +1472,7 @@ MixerStrip::setup_comment_button () break; } - ARDOUR_UI::instance()->set_tip ( + set_tooltip ( _comment_button, _route->comment().empty() ? _("Click to Add/Edit Comments") : _route->comment() ); @@ -1698,7 +1698,7 @@ MixerStrip::name_changed () break; } - ARDOUR_UI::instance()->set_tip (name_button, _route->name()); + set_tooltip (name_button, _route->name()); if (_session->config.get_track_name_number()) { const int64_t track_number = _route->track_number (); diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc index eb54b04bdd..5335b3ee1c 100644 --- a/gtk2_ardour/monitor_section.cc +++ b/gtk2_ardour/monitor_section.cc @@ -37,11 +37,11 @@ #include "ardour/route.h" #include "ardour/user_bundle.h" -#include "ardour_ui.h" #include "gui_thread.h" #include "monitor_section.h" #include "public_editor.h" #include "timers.h" +#include "tooltips.h" #include "volume_controller.h" #include "ui_config.h" #include "utils.h" @@ -139,19 +139,19 @@ MonitorSection::MonitorSection (Session* s) solo_model_box.show (); act = ActionManager::get_action (X_("Solo"), X_("solo-use-in-place")); - ARDOUR_UI::instance()->set_tip (solo_in_place_button, _("Solo controls affect solo-in-place")); + set_tooltip (solo_in_place_button, _("Solo controls affect solo-in-place")); if (act) { solo_in_place_button.set_related_action (act); } act = ActionManager::get_action (X_("Solo"), X_("solo-use-afl")); - ARDOUR_UI::instance()->set_tip (afl_button, _("Solo controls toggle after-fader-listen")); + set_tooltip (afl_button, _("Solo controls toggle after-fader-listen")); if (act) { afl_button.set_related_action (act); } act = ActionManager::get_action (X_("Solo"), X_("solo-use-pfl")); - ARDOUR_UI::instance()->set_tip (pfl_button, _("Solo controls toggle pre-fader-listen")); + set_tooltip (pfl_button, _("Solo controls toggle pre-fader-listen")); if (act) { pfl_button.set_related_action (act); } @@ -161,7 +161,7 @@ MonitorSection::MonitorSection (Session* s) solo_boost_control = new ArdourKnob (); solo_boost_control->set_name("monitor knob"); solo_boost_control->set_size_request (PX_SCALE(40), PX_SCALE(40)); - ARDOUR_UI::instance()->set_tip (*solo_boost_control, _("Gain increase for soloed signals (0dB is normal)")); + set_tooltip (*solo_boost_control, _("Gain increase for soloed signals (0dB is normal)")); solo_boost_display = new ArdourDisplay (); solo_boost_display->set_name("monitor section cut"); @@ -190,7 +190,7 @@ MonitorSection::MonitorSection (Session* s) solo_cut_control = new ArdourKnob (); solo_cut_control->set_name ("monitor knob"); solo_cut_control->set_size_request (PX_SCALE(40), PX_SCALE(40)); - ARDOUR_UI::instance()->set_tip (*solo_cut_control, _("Gain reduction non-soloed signals\nA value above -inf dB causes \"solo-in-front\"")); + set_tooltip (*solo_cut_control, _("Gain reduction non-soloed signals\nA value above -inf dB causes \"solo-in-front\"")); solo_cut_display = new ArdourDisplay (); solo_cut_display->set_name("monitor section cut"); @@ -216,7 +216,7 @@ MonitorSection::MonitorSection (Session* s) dim_control = new ArdourKnob (ArdourKnob::default_elements, ArdourKnob::Detent); dim_control->set_name ("monitor knob"); dim_control->set_size_request (PX_SCALE(40), PX_SCALE(40)); - ARDOUR_UI::instance()->set_tip (*dim_control, _("Gain reduction to use when dimming monitor outputs")); + set_tooltip (*dim_control, _("Gain reduction to use when dimming monitor outputs")); dim_display = new ArdourDisplay (); dim_display->set_name("monitor section cut"); @@ -242,7 +242,7 @@ MonitorSection::MonitorSection (Session* s) exclusive_solo_button.set_text (_("Excl. Solo")); exclusive_solo_button.set_name (X_("monitor solo exclusive")); - ARDOUR_UI::instance()->set_tip (&exclusive_solo_button, _("Exclusive solo means that only 1 solo is active at a time")); + set_tooltip (&exclusive_solo_button, _("Exclusive solo means that only 1 solo is active at a time")); act = ActionManager::get_action (X_("Monitor"), X_("toggle-exclusive-solo")); if (act) { @@ -251,7 +251,7 @@ MonitorSection::MonitorSection (Session* s) solo_mute_override_button.set_text (_("Solo ยป Mute")); solo_mute_override_button.set_name (X_("monitor solo override")); - ARDOUR_UI::instance()->set_tip (&solo_mute_override_button, _("If enabled, solo will override mute\n(a soloed & muted track or bus will be audible)")); + set_tooltip (&solo_mute_override_button, _("If enabled, solo will override mute\n(a soloed & muted track or bus will be audible)")); act = ActionManager::get_action (X_("Monitor"), X_("toggle-mute-overrides-solo")); if (act) { @@ -1458,7 +1458,7 @@ MonitorSection::update_output_display () tooltip_cstr = new char[tooltip.str().size() + 1]; strcpy(tooltip_cstr, tooltip.str().c_str()); - ARDOUR_UI::instance()->set_tip (output_button, tooltip_cstr, ""); + set_tooltip (output_button, tooltip_cstr, ""); if (each_io_has_one_connection) { if (total_connection_count == ardour_connection_count) { diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index f5ea069624..2df7a819ad 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -27,12 +27,12 @@ #include "ardour/panner_shell.h" #include "ardour/session.h" -#include "ardour_ui.h" #include "panner_ui.h" #include "panner2d.h" #include "gui_thread.h" #include "stereo_panner.h" #include "timers.h" +#include "tooltips.h" #include "mono_panner.h" #include "ui_config.h" @@ -43,6 +43,7 @@ using namespace ARDOUR; using namespace PBD; using namespace Gtkmm2ext; using namespace Gtk; +using namespace ARDOUR_UI_UTILS; PannerUI::PannerUI (Session* s) : _current_nouts (-1) @@ -68,8 +69,8 @@ PannerUI::PannerUI (Session* s) pan_automation_style_button.set_name ("MixerAutomationModeButton"); pan_automation_state_button.set_name ("MixerAutomationPlaybackButton"); - ARDOUR_UI::instance()->set_tip (pan_automation_state_button, _("Pan automation mode")); - ARDOUR_UI::instance()->set_tip (pan_automation_style_button, _("Pan automation type")); + set_tooltip (pan_automation_state_button, _("Pan automation mode")); + set_tooltip (pan_automation_style_button, _("Pan automation type")); //set_size_request_to_display_given_text (pan_automation_state_button, X_("O"), 2, 2); //set_size_request_to_display_given_text (pan_automation_style_button, X_("0"), 2, 2); diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index 3c3d08c2d0..79e76462b4 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -38,9 +38,9 @@ #include "ardour/plugin.h" #include "ardour/utils.h" -#include "ardour_ui.h" #include "plugin_selector.h" #include "gui_thread.h" +#include "tooltips.h" #include "i18n.h" @@ -48,6 +48,7 @@ using namespace ARDOUR; using namespace PBD; using namespace Gtk; using namespace std; +using namespace ARDOUR_UI_UTILS; static const char* _filter_mode_strings[] = { N_("Name contains"), @@ -126,11 +127,11 @@ PluginSelector::PluginSelector (PluginManager& mgr) ascroller.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); ascroller.add(added_list); btn_add = manage(new Gtk::Button(Stock::ADD)); - ARDOUR_UI::instance()->set_tip(*btn_add, _("Add a plugin to the effect list")); + set_tooltip(*btn_add, _("Add a plugin to the effect list")); btn_add->set_sensitive (false); btn_remove = manage(new Gtk::Button(Stock::REMOVE)); btn_remove->set_sensitive (false); - ARDOUR_UI::instance()->set_tip(*btn_remove, _("Remove a plugin from the effect list")); + set_tooltip(*btn_remove, _("Remove a plugin from the effect list")); btn_add->set_name("PluginSelectorButton"); btn_remove->set_name("PluginSelectorButton"); diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index 2483cb35fa..a5db9d9c69 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -58,7 +58,6 @@ #endif #include "ardour_window.h" -#include "ardour_ui.h" #include "prompter.h" #include "plugin_ui.h" #include "utils.h" @@ -68,6 +67,7 @@ #include "latency_gui.h" #include "plugin_eq_gui.h" #include "new_plugin_preset_dialog.h" +#include "tooltips.h" #include "i18n.h" @@ -428,12 +428,12 @@ PlugUIBase::PlugUIBase (boost::shared_ptr pi) { _preset_modified.set_size_request (16, -1); _preset_combo.set_text("(default)"); - ARDOUR_UI::instance()->set_tip (_preset_combo, _("Presets (if any) for this plugin\n(Both factory and user-created)")); - ARDOUR_UI::instance()->set_tip (add_button, _("Save a new preset")); - ARDOUR_UI::instance()->set_tip (save_button, _("Save the current preset")); - ARDOUR_UI::instance()->set_tip (delete_button, _("Delete the current preset")); - ARDOUR_UI::instance()->set_tip (reset_button, _("Reset parameters to default (if no parameters are in automation play mode)")); - ARDOUR_UI::instance()->set_tip (bypass_button, _("Disable signal processing by the plugin")); + set_tooltip (_preset_combo, _("Presets (if any) for this plugin\n(Both factory and user-created)")); + set_tooltip (add_button, _("Save a new preset")); + set_tooltip (save_button, _("Save the current preset")); + set_tooltip (delete_button, _("Delete the current preset")); + set_tooltip (reset_button, _("Reset parameters to default (if no parameters are in automation play mode)")); + set_tooltip (bypass_button, _("Disable signal processing by the plugin")); _no_load_preset = 0; update_preset_list (); @@ -470,8 +470,8 @@ PlugUIBase::PlugUIBase (boost::shared_ptr pi) focus_button.add (*focus_out_image); - ARDOUR_UI::instance()->set_tip (focus_button, string_compose (_("Click to allow the plugin to receive keyboard events that %1 would normally use as a shortcut"), PROGRAM_NAME)); - ARDOUR_UI::instance()->set_tip (bypass_button, _("Click to enable/disable this plugin")); + set_tooltip (focus_button, string_compose (_("Click to allow the plugin to receive keyboard events that %1 would normally use as a shortcut"), PROGRAM_NAME)); + set_tooltip (bypass_button, _("Click to enable/disable this plugin")); description_expander.property_expanded().signal_changed().connect( sigc::mem_fun(*this, &PlugUIBase::toggle_description)); description_expander.set_expanded(false); @@ -682,14 +682,14 @@ PlugUIBase::focus_toggled (GdkEventButton*) focus_button.remove (); focus_button.add (*focus_out_image); focus_out_image->show (); - ARDOUR_UI::instance()->set_tip (focus_button, string_compose (_("Click to allow the plugin to receive keyboard events that %1 would normally use as a shortcut"), PROGRAM_NAME)); + set_tooltip (focus_button, string_compose (_("Click to allow the plugin to receive keyboard events that %1 would normally use as a shortcut"), PROGRAM_NAME)); KeyboardFocused (false); } else { Keyboard::the_keyboard().magic_widget_grab_focus(); focus_button.remove (); focus_button.add (*focus_in_image); focus_in_image->show (); - ARDOUR_UI::instance()->set_tip (focus_button, string_compose (_("Click to allow normal use of %1 keyboard shortcuts"), PROGRAM_NAME)); + set_tooltip (focus_button, string_compose (_("Click to allow normal use of %1 keyboard shortcuts"), PROGRAM_NAME)); KeyboardFocused (true); } diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index a1e066797f..eb52ec074b 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -74,6 +74,7 @@ #include "route_processor_selection.h" #include "send_ui.h" #include "timers.h" +#include "tooltips.h" #include "i18n.h" @@ -322,10 +323,10 @@ ProcessorEntry::setup_tooltip () postfix = string_compose(_("\nThis mono plugin has been replicated %1 times."), replicated); } if (pi->plugin()->has_editor()) { - ARDOUR_UI::instance()->set_tip (_button, + ARDOUR_UI_UTILS::set_tooltip (_button, string_compose (_("%1\nDouble-click to show GUI.\nAlt+double-click to show generic GUI.%2"), name (Wide), postfix)); } else { - ARDOUR_UI::instance()->set_tip (_button, + ARDOUR_UI_UTILS::set_tooltip (_button, string_compose (_("%1\nDouble-click to show generic GUI.%2"), name (Wide), postfix)); } return; @@ -336,7 +337,7 @@ ProcessorEntry::setup_tooltip () return; } } - ARDOUR_UI::instance()->set_tip (_button, string_compose ("%1", name (Wide))); + ARDOUR_UI_UTILS::set_tooltip (_button, string_compose ("%1", name (Wide))); } string @@ -603,7 +604,7 @@ ProcessorEntry::Control::set_tooltip () string sm = Glib::Markup::escape_text (tmp); _slider_persistant_tooltip.set_tip (sm); - ARDOUR_UI::instance()->set_tip (_button, sm); + ARDOUR_UI_UTILS::set_tooltip (_button, sm); } void @@ -1048,7 +1049,7 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::functionset_tip (processor_display, _("Right-click to add/remove/edit\nplugins,inserts,sends and more")); + ARDOUR_UI_UTILS::set_tooltip (processor_display, _("Right-click to add/remove/edit\nplugins,inserts,sends and more")); } ProcessorBox::~ProcessorBox () diff --git a/gtk2_ardour/region_editor.cc b/gtk2_ardour/region_editor.cc index e41e012ce6..725e5c33dd 100644 --- a/gtk2_ardour/region_editor.cc +++ b/gtk2_ardour/region_editor.cc @@ -34,6 +34,7 @@ #include "gui_thread.h" #include "region_editor.h" #include "public_editor.h" +#include "tooltips.h" #include "i18n.h" @@ -41,6 +42,7 @@ using namespace ARDOUR; using namespace PBD; using namespace std; using namespace Gtkmm2ext; +using namespace ARDOUR_UI_UTILS; RegionEditor::RegionEditor (Session* s, boost::shared_ptr r) : ArdourDialog (_("Region")) @@ -76,7 +78,7 @@ RegionEditor::RegionEditor (Session* s, boost::shared_ptr r) sync_offset_absolute_clock.set_session (_session); start_clock.set_session (_session); - ARDOUR_UI::instance()->set_tip (audition_button, _("audition this region")); + set_tooltip (audition_button, _("audition this region")); audition_button.unset_flags (Gtk::CAN_FOCUS); diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 224ff3fd1c..f929761057 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -76,6 +76,7 @@ #include "rgb_macros.h" #include "selection.h" #include "streamview.h" +#include "tooltips.h" #include "ui_config.h" #include "utils.h" #include "route_group_menu.h" @@ -180,10 +181,10 @@ RouteTimeAxisView::set_route (boost::shared_ptr rt) } if (is_midi_track()) { - ARDOUR_UI::instance()->set_tip(*rec_enable_button, _("Record (Right-click for Step Edit)")); + set_tooltip(*rec_enable_button, _("Record (Right-click for Step Edit)")); gm.set_fader_name ("MidiTrackFader"); } else { - ARDOUR_UI::instance()->set_tip(*rec_enable_button, _("Record")); + set_tooltip(*rec_enable_button, _("Record")); gm.set_fader_name ("AudioTrackFader"); } @@ -251,9 +252,9 @@ RouteTimeAxisView::set_route (boost::shared_ptr rt) controls_table.attach (gm.get_gain_slider(), 0, 2, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 1, 0); } - ARDOUR_UI::instance()->set_tip(*solo_button,_("Solo")); - ARDOUR_UI::instance()->set_tip(*mute_button,_("Mute")); - ARDOUR_UI::instance()->set_tip(route_group_button, _("Route Group")); + set_tooltip(*solo_button,_("Solo")); + set_tooltip(*mute_button,_("Mute")); + set_tooltip(route_group_button, _("Route Group")); mute_button->set_tweaks(ArdourButton::TrackHeader); solo_button->set_tweaks(ArdourButton::TrackHeader); @@ -263,9 +264,9 @@ RouteTimeAxisView::set_route (boost::shared_ptr rt) route_group_button.set_tweaks(ArdourButton::TrackHeader); if (is_midi_track()) { - ARDOUR_UI::instance()->set_tip(automation_button, _("MIDI Controllers and Automation")); + set_tooltip(automation_button, _("MIDI Controllers and Automation")); } else { - ARDOUR_UI::instance()->set_tip(automation_button, _("Automation")); + set_tooltip(automation_button, _("Automation")); } update_track_number_visibility(); @@ -1786,7 +1787,7 @@ RouteTimeAxisView::update_playlist_tip () take_name = take_name.substr (idx + group_string.length()); /* set the playlist button tooltip to the take name */ - ARDOUR_UI::instance()->set_tip ( + set_tooltip ( playlist_button, string_compose(_("Take: %1.%2"), Glib::Markup::escape_text(rg->name()), @@ -1798,7 +1799,7 @@ RouteTimeAxisView::update_playlist_tip () } /* set the playlist button tooltip to the playlist name */ - ARDOUR_UI::instance()->set_tip (playlist_button, _("Playlist") + std::string(": ") + Glib::Markup::escape_text(track()->playlist()->name())); + set_tooltip (playlist_button, _("Playlist") + std::string(": ") + Glib::Markup::escape_text(track()->playlist()->name())); } @@ -2727,16 +2728,16 @@ RouteTimeAxisView::set_button_names () switch (Config->get_listen_position()) { case AfterFaderListen: solo_button->set_text (S_("AfterFader|A")); - ARDOUR_UI::instance()->set_tip (*solo_button, _("After-fade listen (AFL)")); + set_tooltip (*solo_button, _("After-fade listen (AFL)")); break; case PreFaderListen: solo_button->set_text (S_("PreFader|P")); - ARDOUR_UI::instance()->set_tip (*solo_button, _("Pre-fade listen (PFL)")); + set_tooltip (*solo_button, _("Pre-fade listen (PFL)")); break; } } else { solo_button->set_text (S_("Solo|S")); - ARDOUR_UI::instance()->set_tip (*solo_button, _("Solo")); + set_tooltip (*solo_button, _("Solo")); } mute_button->set_text (S_("Mute|M")); } diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc index 911bf285c0..8e98de2868 100644 --- a/gtk2_ardour/session_dialog.cc +++ b/gtk2_ardour/session_dialog.cc @@ -51,6 +51,7 @@ #include "opts.h" #include "engine_dialog.h" #include "i18n.h" +#include "tooltips.h" #include "utils.h" using namespace std; @@ -360,7 +361,7 @@ SessionDialog::setup_initial_choice_box () Gtk::Button *updates_button = manage (new Gtk::Button (_("Check the website for more..."))); updates_button->signal_clicked().connect (mem_fun(*this, &SessionDialog::updates_button_clicked) ); - ARDOUR_UI::instance()->set_tip (*updates_button, _("Click to open the program website in your web browser")); + set_tooltip (*updates_button, _("Click to open the program website in your web browser")); info_box->pack_start (*updates_button, false, false); diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc index 06afd6c39c..ba520152c4 100644 --- a/gtk2_ardour/shuttle_control.cc +++ b/gtk2_ardour/shuttle_control.cc @@ -32,15 +32,16 @@ #include "gtkmm2ext/rgb_macros.h" #include "actions.h" -#include "ardour_ui.h" #include "rgb_macros.h" #include "shuttle_control.h" +#include "tooltips.h" #include "i18n.h" using namespace Gtk; using namespace Gtkmm2ext; using namespace ARDOUR; +using namespace ARDOUR_UI_UTILS; using std::min; using std::max; @@ -53,7 +54,7 @@ ShuttleControl::ShuttleControl () : _controllable (new ShuttleControllable (*this)) , binding_proxy (_controllable) { - ARDOUR_UI::instance()->set_tip (*this, _("Shuttle speed control (Context-click for options)")); + set_tooltip (*this, _("Shuttle speed control (Context-click for options)")); pattern = 0; shine_pattern = 0; diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc index f3e1808a9c..19ae453a1d 100644 --- a/gtk2_ardour/startup.cc +++ b/gtk2_ardour/startup.cc @@ -48,7 +48,6 @@ #include "ardour/session_state_utils.h" #include "ardour/template_utils.h" -#include "ardour_ui.h" #include "startup.h" #include "opts.h" #include "engine_dialog.h" diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc index ace02c0c68..366a9e199a 100644 --- a/gtk2_ardour/step_entry.cc +++ b/gtk2_ardour/step_entry.cc @@ -27,11 +27,11 @@ #include "ardour/filesystem_paths.h" -#include "ardour_ui.h" #include "midi_channel_selector.h" #include "midi_time_axis.h" #include "step_editor.h" #include "step_entry.h" +#include "tooltips.h" #include "utils.h" #include "i18n.h" @@ -188,13 +188,13 @@ StepEntry::StepEntry (StepEditor& seditor) note_length_box.pack_start (length_32_button, false, false); note_length_box.pack_start (length_64_button, false, false); - ARDOUR_UI::instance()->set_tip (&length_1_button, _("Set note length to a whole note"), ""); - ARDOUR_UI::instance()->set_tip (&length_2_button, _("Set note length to a half note"), ""); - ARDOUR_UI::instance()->set_tip (&length_4_button, _("Set note length to a quarter note"), ""); - ARDOUR_UI::instance()->set_tip (&length_8_button, _("Set note length to a eighth note"), ""); - ARDOUR_UI::instance()->set_tip (&length_16_button, _("Set note length to a sixteenth note"), ""); - ARDOUR_UI::instance()->set_tip (&length_32_button, _("Set note length to a thirty-second note"), ""); - ARDOUR_UI::instance()->set_tip (&length_64_button, _("Set note length to a sixty-fourth note"), ""); + set_tooltip (&length_1_button, _("Set note length to a whole note"), ""); + set_tooltip (&length_2_button, _("Set note length to a half note"), ""); + set_tooltip (&length_4_button, _("Set note length to a quarter note"), ""); + set_tooltip (&length_8_button, _("Set note length to a eighth note"), ""); + set_tooltip (&length_16_button, _("Set note length to a sixteenth note"), ""); + set_tooltip (&length_32_button, _("Set note length to a thirty-second note"), ""); + set_tooltip (&length_64_button, _("Set note length to a sixty-fourth note"), ""); RadioButtonGroup velocity_group = velocity_ppp_button.get_group(); velocity_pp_button.set_group (velocity_group); @@ -273,14 +273,14 @@ StepEntry::StepEntry (StepEditor& seditor) velocity_ff_button.property_draw_indicator() = false; velocity_fff_button.property_draw_indicator() = false; - ARDOUR_UI::instance()->set_tip (&velocity_ppp_button, _("Set volume (velocity) to pianississimo"), ""); - ARDOUR_UI::instance()->set_tip (&velocity_pp_button, _("Set volume (velocity) to pianissimo"), ""); - ARDOUR_UI::instance()->set_tip (&velocity_p_button, _("Set volume (velocity) to piano"), ""); - ARDOUR_UI::instance()->set_tip (&velocity_mp_button, _("Set volume (velocity) to mezzo-piano"), ""); - ARDOUR_UI::instance()->set_tip (&velocity_mf_button, _("Set volume (velocity) to mezzo-forte"), ""); - ARDOUR_UI::instance()->set_tip (&velocity_f_button, _("Set volume (velocity) to forte"), ""); - ARDOUR_UI::instance()->set_tip (&velocity_ff_button, _("Set volume (velocity) to fortissimo"), ""); - ARDOUR_UI::instance()->set_tip (&velocity_fff_button, _("Set volume (velocity) to fortississimo"), ""); + set_tooltip (&velocity_ppp_button, _("Set volume (velocity) to pianississimo"), ""); + set_tooltip (&velocity_pp_button, _("Set volume (velocity) to pianissimo"), ""); + set_tooltip (&velocity_p_button, _("Set volume (velocity) to piano"), ""); + set_tooltip (&velocity_mp_button, _("Set volume (velocity) to mezzo-piano"), ""); + set_tooltip (&velocity_mf_button, _("Set volume (velocity) to mezzo-forte"), ""); + set_tooltip (&velocity_f_button, _("Set volume (velocity) to forte"), ""); + set_tooltip (&velocity_ff_button, _("Set volume (velocity) to fortissimo"), ""); + set_tooltip (&velocity_fff_button, _("Set volume (velocity) to fortississimo"), ""); note_velocity_box.pack_start (velocity_ppp_button, false, false); note_velocity_box.pack_start (velocity_pp_button, false, false); @@ -328,20 +328,20 @@ StepEntry::StepEntry (StepEditor& seditor) resync_box.pack_start (bar_resync_button, true, false); resync_box.pack_start (resync_button, true, false); - ARDOUR_UI::instance()->set_tip (&chord_button, _("Stack inserted notes to form a chord"), ""); - ARDOUR_UI::instance()->set_tip (&sustain_button, _("Extend selected notes by note length"), ""); - ARDOUR_UI::instance()->set_tip (&dot0_button, _("Use undotted note lengths"), ""); - ARDOUR_UI::instance()->set_tip (&dot1_button, _("Use dotted (* 1.5) note lengths"), ""); - ARDOUR_UI::instance()->set_tip (&dot2_button, _("Use double-dotted (* 1.75) note lengths"), ""); - ARDOUR_UI::instance()->set_tip (&dot3_button, _("Use triple-dotted (* 1.875) note lengths"), ""); - ARDOUR_UI::instance()->set_tip (&rest_button, _("Insert a note-length's rest"), ""); - ARDOUR_UI::instance()->set_tip (&grid_rest_button, _("Insert a grid-unit's rest"), ""); - ARDOUR_UI::instance()->set_tip (&beat_resync_button, _("Insert a rest until the next beat"), ""); - ARDOUR_UI::instance()->set_tip (&bar_resync_button, _("Insert a rest until the next bar"), ""); - ARDOUR_UI::instance()->set_tip (&bank_button, _("Insert a bank change message"), ""); - ARDOUR_UI::instance()->set_tip (&program_button, _("Insert a program change message"), ""); - ARDOUR_UI::instance()->set_tip (&back_button, _("Move Insert Position Back by Note Length"), ""); - ARDOUR_UI::instance()->set_tip (&resync_button, _("Move Insert Position to Edit Point"), ""); + set_tooltip (&chord_button, _("Stack inserted notes to form a chord"), ""); + set_tooltip (&sustain_button, _("Extend selected notes by note length"), ""); + set_tooltip (&dot0_button, _("Use undotted note lengths"), ""); + set_tooltip (&dot1_button, _("Use dotted (* 1.5) note lengths"), ""); + set_tooltip (&dot2_button, _("Use double-dotted (* 1.75) note lengths"), ""); + set_tooltip (&dot3_button, _("Use triple-dotted (* 1.875) note lengths"), ""); + set_tooltip (&rest_button, _("Insert a note-length's rest"), ""); + set_tooltip (&grid_rest_button, _("Insert a grid-unit's rest"), ""); + set_tooltip (&beat_resync_button, _("Insert a rest until the next beat"), ""); + set_tooltip (&bar_resync_button, _("Insert a rest until the next bar"), ""); + set_tooltip (&bank_button, _("Insert a bank change message"), ""); + set_tooltip (&program_button, _("Insert a program change message"), ""); + set_tooltip (&back_button, _("Move Insert Position Back by Note Length"), ""); + set_tooltip (&resync_button, _("Move Insert Position to Edit Point"), ""); act = myactions.find_action ("StepEditing/back"); gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (back_button.gobj()), false); diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index e7d43f4ae9..e251d67d9c 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -41,7 +41,6 @@ #include "ardour/profile.h" -#include "ardour_ui.h" #include "ardour_dialog.h" #include "gui_thread.h" #include "public_editor.h" @@ -55,6 +54,7 @@ #include "streamview.h" #include "editor_drag.h" #include "editor.h" +#include "tooltips.h" #include "ui_config.h" #include "i18n.h" @@ -147,7 +147,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie name_label.set_name ("TrackLabel"); name_label.set_alignment (0.0, 0.5); name_label.set_width_chars (12); - ARDOUR_UI::instance()->set_tip (name_label, _("Track/Bus name (double click to edit)")); + set_tooltip (name_label, _("Track/Bus name (double click to edit)")); Gtk::Entry* an_entry = new Gtkmm2ext::FocusEntry; an_entry->set_name ("EditorTrackNameDisplay"); -- cgit v1.2.3