diff options
author | Robin Gareus <robin@gareus.org> | 2016-12-11 17:24:30 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-12-17 02:43:42 +0100 |
commit | 1a25b906b3ad73b8636909ab6562b0c97374aa14 (patch) | |
tree | d9a8127c589f544a80798ebb44ec37ce3ccd4197 /gtk2_ardour/main_clock.cc | |
parent | a6317060599e7a17eddc6172eab28bfed4cb1b97 (diff) |
Commence transport tool bar re-layout
Diffstat (limited to 'gtk2_ardour/main_clock.cc')
-rw-r--r-- | gtk2_ardour/main_clock.cc | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/gtk2_ardour/main_clock.cc b/gtk2_ardour/main_clock.cc index 9a7360b41f..6a759eb9dc 100644 --- a/gtk2_ardour/main_clock.cc +++ b/gtk2_ardour/main_clock.cc @@ -17,15 +17,15 @@ */ -#include "main_clock.h" -#include "public_editor.h" +#include "ardour/tempo.h" +#include "actions.h" +#include "main_clock.h" #include "ui_config.h" +#include "public_editor.h" #include "pbd/i18n.h" -#include "ardour/tempo.h" - using namespace Gtk; MainClock::MainClock ( @@ -36,7 +36,14 @@ MainClock::MainClock ( : AudioClock (clock_name, false, widget_name, true, true, false, true) , _primary (primary) { +} +void +MainClock::set_session (ARDOUR::Session *s) +{ + AudioClock::set_session (s); + _left_btn.set_related_action (ActionManager::get_action (X_("Editor"), X_("edit-current-tempo"))); + _right_btn.set_related_action (ActionManager::get_action (X_("Editor"), X_("edit-current-meter"))); } void @@ -117,25 +124,3 @@ MainClock::insert_new_meter () { PublicEditor::instance().mouse_add_new_meter_event (absolute_time ()); } - -bool -MainClock::on_button_press_event (GdkEventButton *ev) -{ - if (ev->button == 1) { - if (mode() == BBT) { - if (is_lower_layout_click(ev->y)) { - if (is_right_layout_click(ev->x)) { - // meter on the right - edit_current_meter(); - } else { - // tempo on the left - edit_current_tempo(); - } - return true; - } - } - } - - return AudioClock::on_button_press_event (ev); -} - |