From ae09a5812b665483daa04adb790ab2f2bd32a29b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 20 Nov 2011 16:38:51 +0000 Subject: audio clocks: focus-on-clock shortcut now works, scrolling and dragging know about x-offsets; cursor colors defined; click on an off clock no longer locates (time info box) git-svn-id: svn://localhost/ardour2/branches/3.0@10709 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui_ed.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/ardour_ui_ed.cc') diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index f7005e99d9..88b7e409b8 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -354,7 +354,7 @@ ARDOUR_UI::install_actions () ActionManager::session_sensitive_actions.push_back (act); ActionManager::transport_sensitive_actions.push_back (act); - act = ActionManager::register_action (transport_actions, X_("focus-on-clock"), _("Focus On Clock"), sigc::mem_fun(primary_clock, &AudioClock::focus)); + act = ActionManager::register_action (transport_actions, X_("focus-on-clock"), _("Focus On Clock"), sigc::mem_fun(*this, &ARDOUR_UI::focus_on_clock)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::transport_sensitive_actions.push_back (act); @@ -862,3 +862,12 @@ ARDOUR_UI::resize_text_widgets () set_size_request_to_display_given_text (cpu_load_label, "DSP: 100.0%", 2, 2); set_size_request_to_display_given_text (buffer_load_label, "Buffers: p:100% c:100%", 2, 2); } + +void +ARDOUR_UI::focus_on_clock () +{ + if (editor && primary_clock) { + editor->present (); + primary_clock->focus (); + } +} -- cgit v1.2.3