2 Copyright (C) 2005 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.
21 #include <ardour/configuration.h>
22 #include <ardour/session.h>
23 #include <ardour/audioengine.h>
25 #include "ardour_ui.h"
29 using namespace ARDOUR;
32 ARDOUR_UI::toggle_time_master ()
34 bool yn = time_master_button.get_active();
36 Config->set_jack_time_master (yn);
39 session->engine().reset_timebase ();
44 ARDOUR_UI::toggle_session_state (const char* group, const char* action, void (Session::*set)(bool))
47 Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
49 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
50 (session->*set) (tact->get_active());
56 ARDOUR_UI::toggle_send_mtc ()
58 toggle_session_state ("options", "SendMTC", &Session::set_send_mtc);
62 ARDOUR_UI::toggle_send_mmc ()
64 toggle_session_state ("options", "SendMMC", &Session::set_send_mmc);
68 ARDOUR_UI::toggle_use_mmc ()
70 toggle_session_state ("options", "UseMMC", &Session::set_mmc_control);
74 ARDOUR_UI::toggle_use_midi_control ()
76 toggle_session_state ("options", "UseMIDIcontrol", &Session::set_midi_control);
80 ARDOUR_UI::toggle_send_midi_feedback ()
82 toggle_session_state ("options", "SendMIDIfeedback", &Session::set_midi_feedback);
86 ARDOUR_UI::toggle_AutoConnectNewTrackInputsToHardware()
90 ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToHardware()
94 ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToMaster()
98 ARDOUR_UI::toggle_ManuallyConnectNewTrackOutputs()
102 ARDOUR_UI::toggle_UseHardwareMonitoring()
106 ARDOUR_UI::toggle_UseSoftwareMonitoring()
110 ARDOUR_UI::toggle_UseExternalMonitoring()
114 ARDOUR_UI::toggle_StopPluginsWithTransport()
118 ARDOUR_UI::toggle_RunPluginsWhileRecording()
122 ARDOUR_UI::toggle_VerifyRemoveLastCapture()
126 ARDOUR_UI::toggle_StopRecordingOnXrun()
130 ARDOUR_UI::toggle_StopTransportAtEndOfSession()
134 ARDOUR_UI::toggle_GainReduceFastTransport()
138 ARDOUR_UI::toggle_LatchedSolo()
142 ARDOUR_UI::toggle_SoloViaBus()
146 ARDOUR_UI::toggle_AutomaticallyCreateCrossfades()
150 ARDOUR_UI::toggle_UnmuteNewFullCrossfades()