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/rc_configuration.h"
21 #include "main_clock.h"
26 MainClock::MainClock (
27 const std::string& clock_name,
29 const std::string& widget_name,
31 bool follows_playhead,
36 : AudioClock (clock_name, is_transient, widget_name, editable, follows_playhead, duration, with_info)
43 MainClock::build_ops_menu ()
45 using namespace Menu_Helpers;
47 AudioClock::build_ops_menu ();
49 MenuList& ops_items = ops_menu->items();
50 ops_items.push_back (SeparatorElem ());
51 ops_items.push_back (CheckMenuElem (_("Display delta to edit cursor"), sigc::mem_fun (*this, &MainClock::display_delta_to_edit_cursor)));
52 CheckMenuItem* c = dynamic_cast<CheckMenuItem *> (&ops_items.back());
54 if (ARDOUR::Config->get_primary_clock_delta_edit_cursor ()) {
55 ARDOUR::Config->set_primary_clock_delta_edit_cursor (false);
59 if (ARDOUR::Config->get_secondary_clock_delta_edit_cursor ()) {
60 ARDOUR::Config->set_secondary_clock_delta_edit_cursor (false);
67 MainClock::display_delta_to_edit_cursor ()
70 ARDOUR::Config->set_primary_clock_delta_edit_cursor (!ARDOUR::Config->get_primary_clock_delta_edit_cursor ());
72 ARDOUR::Config->set_secondary_clock_delta_edit_cursor (!ARDOUR::Config->get_secondary_clock_delta_edit_cursor ());