2 Copyright (C) 2012 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include "ardour_ui.h"
21 #include "main_clock.h"
27 MainClock::MainClock (
28 const std::string& clock_name,
30 const std::string& widget_name,
32 bool follows_playhead,
37 : AudioClock (clock_name, is_transient, widget_name, editable, follows_playhead, duration, with_info)
44 MainClock::build_ops_menu ()
46 using namespace Menu_Helpers;
48 AudioClock::build_ops_menu ();
50 MenuList& ops_items = ops_menu->items();
51 ops_items.push_back (SeparatorElem ());
52 ops_items.push_back (CheckMenuElem (_("Display delta to edit cursor"), sigc::mem_fun (*this, &MainClock::display_delta_to_edit_cursor)));
53 Gtk::CheckMenuItem* c = dynamic_cast<Gtk::CheckMenuItem *> (&ops_items.back());
55 if (ARDOUR_UI::config()->get_primary_clock_delta_edit_cursor ()) {
56 ARDOUR_UI::config()->set_primary_clock_delta_edit_cursor (false);
60 if (ARDOUR_UI::config()->get_secondary_clock_delta_edit_cursor ()) {
61 ARDOUR_UI::config()->set_secondary_clock_delta_edit_cursor (false);
68 MainClock::display_delta_to_edit_cursor ()
71 ARDOUR_UI::config()->set_primary_clock_delta_edit_cursor (!ARDOUR_UI::config()->get_primary_clock_delta_edit_cursor ());
73 ARDOUR_UI::config()->set_secondary_clock_delta_edit_cursor (!ARDOUR_UI::config()->get_secondary_clock_delta_edit_cursor ());