closing in on pin management.
[ardour.git] / gtk2_ardour / location_ui.cc
index f56006e5ceb0b26ff8797ce6fc81371197ea796d..4a2fc45a4770c354b54b439b21febcfa50bfc3b1 100644 (file)
@@ -34,6 +34,8 @@
 #include "prompter.h"
 #include "utils.h"
 #include "public_editor.h"
+#include "tooltips.h"
+#include "ui_config.h"
 
 #include "i18n.h"
 
@@ -314,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"));
+
+               set_tooltip (start_to_playhead_button, _("Set range start from playhead location"));
+               set_tooltip (end_to_playhead_button, _("Set range end from playhead location"));
 
-               ARDOUR_UI::instance()->tooltips().set_tip (start_to_playhead_button, _("Set range start from playhead location"));
-               ARDOUR_UI::instance()->tooltips().set_tip (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()->tooltips().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();
@@ -343,7 +345,7 @@ LocationEditRow::set_location (Location *loc)
         location->StartChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::start_changed, this), gui_context());
         location->EndChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::end_changed, this), gui_context());
         location->Changed.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::location_changed, this), gui_context());
-        location->FlagsChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::flags_changed, this), gui_context()); 
+        location->FlagsChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::flags_changed, this), gui_context());
         location->LockChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::lock_changed, this), gui_context());
         location->PositionLockStyleChanged.connect (connections, invalidator (*this), boost::bind (&LocationEditRow::position_lock_style_changed, this), gui_context());
 }
@@ -901,7 +903,7 @@ LocationUI::location_added (Location* location)
                loc.sort (LocationSortByStart ());
 
                LocationEditRow* erow = manage (new LocationEditRow (_session, location));
-               
+
                 erow->set_clock_group (*_clock_group);
                erow->remove_requested.connect (sigc::mem_fun (*this, &LocationUI::location_remove_requested));
 
@@ -1017,7 +1019,7 @@ LocationUI::add_new_location()
                framepos_t where = _session->audible_frame();
                _session->locations()->next_available_name(markername,"mark");
                Location *location = new Location (*_session, where, where, markername, Location::IsMark);
-               if (ARDOUR_UI::config()->get_name_new_markers()) {
+               if (UIConfiguration::instance().get_name_new_markers()) {
                        newest_location = location;
                }
                PublicEditor::instance().begin_reversible_command (_("add marker"));
@@ -1130,7 +1132,7 @@ LocationUI::clock_mode_from_session_instant_xml () const
        if (!p) {
                return ARDOUR_UI::instance()->secondary_clock->mode();
        }
-             
+
        return (AudioClock::Mode) string_2_enum (p->value (), AudioClock::Mode);
 }