possible big clock sizing fix
[ardour.git] / gtk2_ardour / location_ui.cc
index 328d87b5449ec182a4805fce0d8d4c010e103f7d..1bb251999c587760625177527b8ff55a341eea94 100644 (file)
@@ -260,18 +260,18 @@ LocationEditRow::set_location (Location *loc)
                end_clock.show();
                length_clock.show();
 
-               ARDOUR_UI::instance()->tooltips().set_tip (end_go_button, _("Jump to the end of this range"));
-               ARDOUR_UI::instance()->tooltips().set_tip (start_go_button, _("Jump to the start of this range"));
-               ARDOUR_UI::instance()->tooltips().set_tip (remove_button, _("Forget this range"));
-               ARDOUR_UI::instance()->tooltips().set_tip (start_clock, _("Start time"));
-               ARDOUR_UI::instance()->tooltips().set_tip (end_clock, _("End time"));
-               ARDOUR_UI::instance()->tooltips().set_tip (length_clock, _("Length"));
+               ARDOUR_UI::instance()->set_tip (end_go_button, _("Jump to the end of this range"));
+               ARDOUR_UI::instance()->set_tip (start_go_button, _("Jump to the start of this range"));
+               ARDOUR_UI::instance()->set_tip (remove_button, _("Forget this range"));
+               ARDOUR_UI::instance()->set_tip (start_clock, _("Start time"));
+               ARDOUR_UI::instance()->set_tip (end_clock, _("End time"));
+               ARDOUR_UI::instance()->set_tip (length_clock, _("Length"));
 
        } else {
 
-               ARDOUR_UI::instance()->tooltips().set_tip (start_go_button, _("Jump to this marker"));
-               ARDOUR_UI::instance()->tooltips().set_tip (remove_button, _("Forget this marker"));
-               ARDOUR_UI::instance()->tooltips().set_tip (start_clock, _("Position"));
+               ARDOUR_UI::instance()->set_tip (start_go_button, _("Jump to this marker"));
+               ARDOUR_UI::instance()->set_tip (remove_button, _("Forget this marker"));
+               ARDOUR_UI::instance()->set_tip (start_clock, _("Position"));
 
                end_go_button.hide();
                end_clock.hide();
@@ -282,11 +282,11 @@ LocationEditRow::set_location (Location *loc)
        end_clock.set_sensitive (!location->locked());
        length_clock.set_sensitive (!location->locked());
 
-       connections.add_connection (location->start_changed.connect (boost::bind (&LocationEditRow::start_changed, this, _1)));
-       connections.add_connection (location->end_changed.connect (boost::bind (&LocationEditRow::end_changed, this, _1)));
-       connections.add_connection (location->name_changed.connect (boost::bind (&LocationEditRow::name_changed, this, _1)));
-       connections.add_connection (location->changed.connect (boost::bind (&LocationEditRow::location_changed, this, _1)));
-       connections.add_connection (location->FlagsChanged.connect (boost::bind (&LocationEditRow::flags_changed, this, _1, _2)));
+       location->start_changed.connect (connections, ui_bind (&LocationEditRow::start_changed, this, _1), gui_context());
+       location->end_changed.connect (connections, ui_bind (&LocationEditRow::end_changed, this, _1), gui_context());
+       location->name_changed.connect (connections, ui_bind (&LocationEditRow::name_changed, this, _1), gui_context());
+       location->changed.connect (connections, ui_bind (&LocationEditRow::location_changed, this, _1), gui_context());
+       location->FlagsChanged.connect (connections, ui_bind (&LocationEditRow::flags_changed, this, _1, _2), gui_context());
 }
 
 void
@@ -860,12 +860,15 @@ LocationUI::set_session(ARDOUR::Session* s)
        SessionHandlePtr::set_session (s);
 
        if (_session) {
-               _session_connections.add_connection (_session->locations()->changed.connect (boost::bind (&LocationUI::refresh_location_list, this)));
-               _session_connections.add_connection (_session->locations()->StateChanged.connect (boost::bind (&LocationUI::refresh_location_list, this)));
-               _session_connections.add_connection (_session->locations()->added.connect (boost::bind (&LocationUI::location_added, this, _1)));
-               _session_connections.add_connection (_session->locations()->removed.connect (boost::bind (&LocationUI::location_removed, this, _1)));
+               _session->locations()->changed.connect (_session_connections, boost::bind (&LocationUI::refresh_location_list, this), gui_context());
+               _session->locations()->StateChanged.connect (_session_connections, boost::bind (&LocationUI::refresh_location_list, this), gui_context());
+               _session->locations()->added.connect (_session_connections, ui_bind (&LocationUI::location_added, this, _1), gui_context());
+               _session->locations()->removed.connect (_session_connections, ui_bind (&LocationUI::location_removed, this, _1), gui_context());
        }
 
+       loop_edit_row.set_session (s);
+       punch_edit_row.set_session (s);
+
        refresh_location_list ();
 }