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.
20 #include <pbd/convert.h>
21 #include <pbd/stacktrace.h>
23 #include <gtkmm2ext/utils.h>
25 #include <ardour/configuration.h>
26 #include <ardour/session.h>
27 #include <ardour/osc.h>
28 #include <ardour/audioengine.h>
30 #include "ardour_ui.h"
32 #include "gui_thread.h"
33 #include "public_editor.h"
38 using namespace Gtkmm2ext;
39 using namespace ARDOUR;
44 ARDOUR_UI::toggle_time_master ()
46 ActionManager::toggle_config_state ("Transport", "ToggleTimeMaster", &Configuration::set_jack_time_master, &Configuration::get_jack_time_master);
50 ARDOUR_UI::toggle_send_mtc ()
52 ActionManager::toggle_config_state ("options", "SendMTC", &Configuration::set_send_mtc, &Configuration::get_send_mtc);
56 ARDOUR_UI::toggle_send_mmc ()
58 ActionManager::toggle_config_state ("options", "SendMMC", &Configuration::set_send_mmc, &Configuration::get_send_mmc);
62 ARDOUR_UI::toggle_use_mmc ()
64 ActionManager::toggle_config_state ("options", "UseMMC", &Configuration::set_mmc_control, &Configuration::get_mmc_control);
68 ARDOUR_UI::toggle_use_osc ()
70 ActionManager::toggle_config_state ("options", "UseOSC", &Configuration::set_use_osc, &Configuration::get_use_osc);
74 ARDOUR_UI::toggle_send_midi_feedback ()
76 ActionManager::toggle_config_state ("options", "SendMIDIfeedback", &Configuration::set_midi_feedback, &Configuration::get_midi_feedback);
80 ARDOUR_UI::toggle_denormal_protection ()
82 ActionManager::toggle_config_state ("options", "DenormalProtection", &Configuration::set_denormal_protection, &Configuration::get_denormal_protection);
86 ARDOUR_UI::toggle_only_copy_imported_files ()
88 ActionManager::toggle_config_state ("options", "OnlyCopyImportedFiles", &Configuration::set_only_copy_imported_files, &Configuration::get_only_copy_imported_files);
92 ARDOUR_UI::set_native_file_header_format (HeaderFormat hf)
94 const char *action = 0;
98 action = X_("FileHeaderFormatBWF");
101 action = X_("FileHeaderFormatWAVE");
104 action = X_("FileHeaderFormatWAVE64");
107 action = X_("FileHeaderFormatiXML");
110 action = X_("FileHeaderFormatRF64");
113 action = X_("FileHeaderFormatCAF");
116 action = X_("FileHeaderFormatAIFF");
119 fatal << string_compose (_("programming error: %1"), "illegal file header format in ::set_native_file_header_format") << endmsg;
123 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
126 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
127 if (ract && ract->get_active() && Config->get_native_file_header_format() != hf) {
128 Config->set_native_file_header_format (hf);
134 ARDOUR_UI::set_native_file_data_format (SampleFormat sf)
136 const char* action = 0;
140 action = X_("FileDataFormatFloat");
143 action = X_("FileDataFormat24bit");
146 action = X_("FileDataFormat16bit");
149 fatal << string_compose (_("programming error: %1"), "illegal file data format in ::set_native_file_data_format") << endmsg;
153 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
156 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
157 if (ract && ract->get_active() && Config->get_native_file_data_format() != sf) {
158 Config->set_native_file_data_format (sf);
164 ARDOUR_UI::set_input_auto_connect (AutoConnectOption option)
169 case AutoConnectPhysical:
170 action = X_("InputAutoConnectPhysical");
173 action = X_("InputAutoConnectManual");
176 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
179 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
181 if (ract && ract->get_active() && Config->get_input_auto_connect() != option) {
182 Config->set_input_auto_connect (option);
188 ARDOUR_UI::set_output_auto_connect (AutoConnectOption option)
193 case AutoConnectPhysical:
194 action = X_("OutputAutoConnectPhysical");
196 case AutoConnectMaster:
197 action = X_("OutputAutoConnectMaster");
200 action = X_("OutputAutoConnectManual");
203 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
206 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
208 if (ract && ract->get_active() && Config->get_output_auto_connect() != option) {
209 Config->set_output_auto_connect (option);
215 ARDOUR_UI::set_solo_model (SoloModel model)
217 const char* action = 0;
221 action = X_("SoloViaBus");
225 action = X_("SoloInPlace");
228 fatal << string_compose (_("programming error: unknown solo model in ARDOUR_UI::set_solo_model: %1"), model) << endmsg;
232 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
235 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
237 if (ract && ract->get_active() && Config->get_solo_model() != model) {
238 Config->set_solo_model (model);
245 ARDOUR_UI::set_remote_model (RemoteModel model)
247 const char* action = 0;
251 action = X_("RemoteUserDefined");
254 action = X_("RemoteMixerDefined");
257 action = X_("RemoteEditorDefined");
261 fatal << string_compose (_("programming error: unknown remote model in ARDOUR_UI::set_remote_model: %1"), model) << endmsg;
265 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
268 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
270 if (ract && ract->get_active() && Config->get_remote_model() != model) {
271 Config->set_remote_model (model);
278 ARDOUR_UI::set_monitor_model (MonitorModel model)
280 const char* action = 0;
283 case HardwareMonitoring:
284 action = X_("UseHardwareMonitoring");
287 case SoftwareMonitoring:
288 action = X_("UseSoftwareMonitoring");
290 case ExternalMonitoring:
291 action = X_("UseExternalMonitoring");
295 fatal << string_compose (_("programming error: unknown monitor model in ARDOUR_UI::set_monitor_model: %1"), model) << endmsg;
299 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
302 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
304 if (ract && ract->get_active() && Config->get_monitoring_model() != model) {
305 Config->set_monitoring_model (model);
312 ARDOUR_UI::set_denormal_model (DenormalModel model)
314 const char* action = 0;
318 action = X_("DenormalNone");
322 action = X_("DenormalFTZ");
326 action = X_("DenormalDAZ");
330 action = X_("DenormalFTZDAZ");
334 fatal << string_compose (_("programming error: unknown denormal model in ARDOUR_UI::set_denormal_model: %1"), model) << endmsg;
338 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
341 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
343 if (ract && ract->get_active() && Config->get_denormal_model() != model) {
344 Config->set_denormal_model (model);
351 ARDOUR_UI::toggle_auto_input ()
353 ActionManager::toggle_config_state ("Transport", "ToggleAutoInput", &Configuration::set_auto_input, &Configuration::get_auto_input);
357 ARDOUR_UI::toggle_auto_play ()
359 ActionManager::toggle_config_state ("Transport", "ToggleAutoPlay", &Configuration::set_auto_play, &Configuration::get_auto_play);
363 ARDOUR_UI::toggle_auto_return ()
365 ActionManager::toggle_config_state ("Transport", "ToggleAutoReturn", &Configuration::set_auto_return, &Configuration::get_auto_return);
369 ARDOUR_UI::toggle_click ()
371 ActionManager::toggle_config_state ("Transport", "ToggleClick", &Configuration::set_clicking, &Configuration::get_clicking);
375 ARDOUR_UI::toggle_session_auto_loop ()
378 if (session->get_play_loop()) {
379 if (session->transport_rolling()) {
382 session->request_play_loop (false);
385 session->request_play_loop (true);
391 ARDOUR_UI::toggle_punch_in ()
393 ActionManager::toggle_config_state ("Transport", "TogglePunchIn", &Configuration::set_punch_in, &Configuration::get_punch_in);
397 ARDOUR_UI::toggle_punch_out ()
399 ActionManager::toggle_config_state ("Transport", "TogglePunchOut", &Configuration::set_punch_out, &Configuration::get_punch_out);
403 ARDOUR_UI::toggle_video_sync()
405 Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", "ToggleVideoSync");
407 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
408 Config->set_use_video_sync (tact->get_active());
413 ARDOUR_UI::toggle_editing_space()
415 Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalEditor");
417 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
418 if (tact->get_active()) {
419 maximise_editing_space ();
421 restore_editing_space ();
427 ARDOUR_UI::toggle_StopPluginsWithTransport()
429 ActionManager::toggle_config_state ("options", "StopPluginsWithTransport", &Configuration::set_plugins_stop_with_transport, &Configuration::get_plugins_stop_with_transport);
433 ARDOUR_UI::toggle_LatchedRecordEnable()
435 ActionManager::toggle_config_state ("options", "LatchedRecordEnable", &Configuration::set_latched_record_enable, &Configuration::get_latched_record_enable);
439 ARDOUR_UI::toggle_RegionEquivalentsOverlap()
441 ActionManager::toggle_config_state ("options", "RegionEquivalentsOverlap", &Configuration::set_use_overlap_equivalency, &Configuration::get_use_overlap_equivalency);
445 ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording()
447 ActionManager::toggle_config_state ("options", "DoNotRunPluginsWhileRecording", &Configuration::set_do_not_record_plugins, &Configuration::get_do_not_record_plugins);
451 ARDOUR_UI::toggle_VerifyRemoveLastCapture()
453 ActionManager::toggle_config_state ("options", "VerifyRemoveLastCapture", &Configuration::set_verify_remove_last_capture, &Configuration::get_verify_remove_last_capture);
457 ARDOUR_UI::toggle_PeriodicSafetyBackups()
459 ActionManager::toggle_config_state ("options", "PeriodicSafetyBackups", &Configuration::set_periodic_safety_backups, &Configuration::get_periodic_safety_backups);
463 ARDOUR_UI::toggle_StopRecordingOnXrun()
465 ActionManager::toggle_config_state ("options", "StopRecordingOnXrun", &Configuration::set_stop_recording_on_xrun, &Configuration::get_stop_recording_on_xrun);
469 ARDOUR_UI::toggle_sync_order_keys ()
471 ActionManager::toggle_config_state ("options", "SyncEditorAndMixerTrackOrder", &Configuration::set_sync_all_route_ordering, &Configuration::get_sync_all_route_ordering);
475 ARDOUR_UI::toggle_StopTransportAtEndOfSession()
477 ActionManager::toggle_config_state ("options", "StopTransportAtEndOfSession", &Configuration::set_stop_at_session_end, &Configuration::get_stop_at_session_end);
481 ARDOUR_UI::toggle_GainReduceFastTransport()
483 ActionManager::toggle_config_state ("options", "GainReduceFastTransport", &Configuration::set_quieten_at_speed, &Configuration::get_quieten_at_speed);
487 ARDOUR_UI::toggle_LatchedSolo()
489 ActionManager::toggle_config_state ("options", "LatchedSolo", &Configuration::set_solo_latched, &Configuration::get_solo_latched);
493 ARDOUR_UI::toggle_ShowSoloMutes()
495 ActionManager::toggle_config_state ("options", "ShowSoloMutes", &Configuration::set_show_solo_mutes, &Configuration::get_show_solo_mutes);
499 ARDOUR_UI::toggle_PrimaryClockDeltaEditCursor()
501 ActionManager::toggle_config_state ("options", "PrimaryClockDeltaEditCursor", &Configuration::set_primary_clock_delta_edit_cursor, &Configuration::get_primary_clock_delta_edit_cursor);
505 ARDOUR_UI::toggle_SecondaryClockDeltaEditCursor()
507 ActionManager::toggle_config_state ("options", "SecondaryClockDeltaEditCursor", &Configuration::set_secondary_clock_delta_edit_cursor, &Configuration::get_secondary_clock_delta_edit_cursor);
511 ARDOUR_UI::toggle_ShowTrackMeters()
513 ActionManager::toggle_config_state ("options", "ShowTrackMeters", &Configuration::set_show_track_meters, &Configuration::get_show_track_meters);
517 ARDOUR_UI::toggle_use_narrow_ms()
519 ActionManager::toggle_config_state ("options", "DefaultNarrowMS", &Configuration::set_default_narrow_ms, &Configuration::get_default_narrow_ms);
523 ARDOUR_UI::mtc_port_changed ()
528 if (session->mtc_port()) {
537 positional_sync_strings.clear ();
538 positional_sync_strings.push_back (slave_source_to_string (None));
540 positional_sync_strings.push_back (slave_source_to_string (MTC));
542 positional_sync_strings.push_back (slave_source_to_string (JACK));
544 set_popdown_strings (sync_option_combo, positional_sync_strings);
548 ARDOUR_UI::setup_session_options ()
552 Config->ParameterChanged.connect (mem_fun (*this, &ARDOUR_UI::parameter_changed));
557 ARDOUR_UI::map_solo_model ()
561 if (Config->get_solo_model() == InverseMute) {
562 on = X_("SoloInPlace");
564 on = X_("SoloViaBus");
567 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
569 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
571 if (tact && !tact->get_active()) {
572 tact->set_active (true);
578 ARDOUR_UI::map_monitor_model ()
582 switch (Config->get_monitoring_model()) {
583 case HardwareMonitoring:
584 on = X_("UseHardwareMonitoring");
586 case SoftwareMonitoring:
587 on = X_("UseSoftwareMonitoring");
589 case ExternalMonitoring:
590 on = X_("UseExternalMonitoring");
594 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
596 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
598 if (tact && !tact->get_active()) {
599 tact->set_active (true);
605 ARDOUR_UI::map_denormal_protection ()
607 Glib::RefPtr<Action> act = ActionManager::get_action ("options", X_("DenormalProtection"));
609 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
611 if (tact && !tact->get_active()) {
612 tact->set_active (Config->get_denormal_protection());
618 ARDOUR_UI::map_denormal_model ()
622 switch (Config->get_denormal_model()) {
624 on = X_("DenormalNone");
627 on = X_("DenormalFTZ");
630 on = X_("DenormalDAZ");
633 on = X_("DenormalFTZDAZ");
637 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
639 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
641 if (tact && !tact->get_active()) {
642 tact->set_active (true);
648 ARDOUR_UI::map_remote_model ()
652 switch (Config->get_remote_model()) {
654 on = X_("RemoteUserDefined");
657 on = X_("RemoteMixerDefined");
660 on = X_("RemoteEditorDefined");
664 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
666 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
668 if (tact && !tact->get_active()) {
669 tact->set_active (true);
675 ARDOUR_UI::map_file_header_format ()
677 const char* action = 0;
679 switch (Config->get_native_file_header_format()) {
681 action = X_("FileHeaderFormatBWF");
685 action = X_("FileHeaderFormatWAVE");
689 action = X_("FileHeaderFormatWAVE64");
693 action = X_("FileHeaderFormatiXML");
697 action = X_("FileHeaderFormatRF64");
701 action = X_("FileHeaderFormatCAF");
705 fatal << string_compose (_("programming error: unknown file header format passed to ARDOUR_UI::map_file_data_format: %1"),
706 Config->get_native_file_header_format()) << endmsg;
711 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
714 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
716 if (tact && !tact->get_active()) {
717 tact->set_active (true);
723 ARDOUR_UI::map_file_data_format ()
725 const char* action = 0;
727 switch (Config->get_native_file_data_format()) {
729 action = X_("FileDataFormatFloat");
733 action = X_("FileDataFormat24bit");
737 action = X_("FileDataFormat16bit");
741 fatal << string_compose (_("programming error: unknown file data format passed to ARDOUR_UI::map_file_data_format: %1"),
742 Config->get_native_file_data_format()) << endmsg;
747 Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
750 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
752 if (tact && !tact->get_active()) {
753 tact->set_active (true);
759 ARDOUR_UI::map_input_auto_connect ()
763 if (Config->get_input_auto_connect() == (AutoConnectOption) 0) {
764 on = "InputAutoConnectManual";
766 on = "InputAutoConnectPhysical";
769 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
771 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
773 if (tact && !tact->get_active()) {
774 tact->set_active (true);
780 ARDOUR_UI::map_output_auto_connect ()
784 if (Config->get_output_auto_connect() == (AutoConnectOption) 0) {
785 on = "OutputAutoConnectManual";
786 } else if (Config->get_output_auto_connect() == AutoConnectPhysical) {
787 on = "OutputAutoConnectPhysical";
789 on = "OutputAutoConnectMaster";
792 Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
794 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
796 if (tact && !tact->get_active()) {
797 tact->set_active (true);
803 ARDOUR_UI::map_only_copy_imported_files ()
805 Glib::RefPtr<Action> act = ActionManager::get_action ("options", X_("OnlyCopyImportedFiles"));
807 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
809 if (tact && !tact->get_active()) {
810 tact->set_active (Config->get_only_copy_imported_files());
817 ARDOUR_UI::map_meter_falloff ()
819 const char* action = X_("MeterFalloffMedium");
821 float val = Config->get_meter_falloff ();
822 MeterFalloff code = meter_falloff_from_float(val);
825 case MeterFalloffOff:
826 action = X_("MeterFalloffOff");
828 case MeterFalloffSlowest:
829 action = X_("MeterFalloffSlowest");
831 case MeterFalloffSlow:
832 action = X_("MeterFalloffSlow");
834 case MeterFalloffMedium:
835 action = X_("MeterFalloffMedium");
837 case MeterFalloffFast:
838 action = X_("MeterFalloffFast");
840 case MeterFalloffFaster:
841 action = X_("MeterFalloffFaster");
843 case MeterFalloffFastest:
844 action = X_("MeterFalloffFastest");
848 Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
851 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
852 if (ract && !ract->get_active()) {
853 ract->set_active (true);
859 ARDOUR_UI::map_meter_hold ()
861 const char* action = X_("MeterHoldMedium");
863 /* XXX hack alert. Fix this. Please */
865 float val = Config->get_meter_hold ();
866 MeterHold code = (MeterHold) (int) (floor (val));
870 action = X_("MeterHoldOff");
873 action = X_("MeterHoldShort");
875 case MeterHoldMedium:
876 action = X_("MeterHoldMedium");
879 action = X_("MeterHoldLong");
883 Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
886 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
887 if (ract && !ract->get_active()) {
888 ract->set_active (true);
894 ARDOUR_UI::set_meter_hold (MeterHold val)
896 const char* action = 0;
899 fval = meter_hold_to_float (val);
903 action = X_("MeterHoldOff");
906 action = X_("MeterHoldShort");
908 case MeterHoldMedium:
909 action = X_("MeterHoldMedium");
912 action = X_("MeterHoldLong");
916 Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
919 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
920 if (ract && ract->get_active() && Config->get_meter_hold() != fval) {
921 Config->set_meter_hold (fval);
927 ARDOUR_UI::set_meter_falloff (MeterFalloff val)
929 const char* action = 0;
932 fval = meter_falloff_to_float (val);
935 case MeterFalloffOff:
936 action = X_("MeterFalloffOff");
938 case MeterFalloffSlowest:
939 action = X_("MeterFalloffSlowest");
941 case MeterFalloffSlow:
942 action = X_("MeterFalloffSlow");
944 case MeterFalloffMedium:
945 action = X_("MeterFalloffMedium");
947 case MeterFalloffFast:
948 action = X_("MeterFalloffFast");
950 case MeterFalloffFaster:
951 action = X_("MeterFalloffFaster");
953 case MeterFalloffFastest:
954 action = X_("MeterFalloffFastest");
958 Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
961 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
962 if (ract && ract->get_active() && Config->get_meter_falloff () != fval) {
963 Config->set_meter_falloff (fval);
969 ARDOUR_UI::parameter_changed (const char* parameter_name)
971 ENSURE_GUI_THREAD (bind (mem_fun (*this, &ARDOUR_UI::parameter_changed), parameter_name));
973 #define PARAM_IS(x) (!strcmp (parameter_name, (x)))
975 if (PARAM_IS ("slave-source")) {
977 sync_option_combo.set_active_text (slave_source_to_string (Config->get_slave_source()));
979 switch (Config->get_slave_source()) {
981 ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
982 ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
986 /* XXX need to make auto-play is off as well as insensitive */
987 ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
988 ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
992 } else if (PARAM_IS ("send-mtc")) {
994 ActionManager::map_some_state ("options", "SendMTC", &Configuration::get_send_mtc);
996 } else if (PARAM_IS ("send-mmc")) {
998 ActionManager::map_some_state ("options", "SendMMC", &Configuration::get_send_mmc);
1000 } else if (PARAM_IS ("use-osc")) {
1003 if (Config->get_use_osc()) {
1010 ActionManager::map_some_state ("options", "UseOSC", &Configuration::get_use_osc);
1012 } else if (PARAM_IS ("mmc-control")) {
1013 ActionManager::map_some_state ("options", "UseMMC", &Configuration::get_mmc_control);
1014 } else if (PARAM_IS ("midi-feedback")) {
1015 ActionManager::map_some_state ("options", "SendMIDIfeedback", &Configuration::get_midi_feedback);
1016 } else if (PARAM_IS ("do-not-record-plugins")) {
1017 ActionManager::map_some_state ("options", "DoNotRunPluginsWhileRecording", &Configuration::get_do_not_record_plugins);
1018 } else if (PARAM_IS ("latched-record-enable")) {
1019 ActionManager::map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable);
1020 } else if (PARAM_IS ("solo-latched")) {
1021 ActionManager::map_some_state ("options", "LatchedSolo", &Configuration::get_solo_latched);
1022 } else if (PARAM_IS ("show-solo-mutes")) {
1023 ActionManager::map_some_state ("options", "ShowSoloMutes", &Configuration::get_show_solo_mutes);
1024 } else if (PARAM_IS ("solo-model")) {
1026 } else if (PARAM_IS ("auto-play")) {
1027 ActionManager::map_some_state ("Transport", "ToggleAutoPlay", &Configuration::get_auto_play);
1028 } else if (PARAM_IS ("auto-return")) {
1029 ActionManager::map_some_state ("Transport", "ToggleAutoReturn", &Configuration::get_auto_return);
1030 } else if (PARAM_IS ("auto-input")) {
1031 ActionManager::map_some_state ("Transport", "ToggleAutoInput", &Configuration::get_auto_input);
1032 } else if (PARAM_IS ("punch-out")) {
1033 ActionManager::map_some_state ("Transport", "TogglePunchOut", &Configuration::get_punch_out);
1034 } else if (PARAM_IS ("punch-in")) {
1035 ActionManager::map_some_state ("Transport", "TogglePunchIn", &Configuration::get_punch_in);
1036 } else if (PARAM_IS ("clicking")) {
1037 ActionManager::map_some_state ("Transport", "ToggleClick", &Configuration::get_clicking);
1038 } else if (PARAM_IS ("jack-time-master")) {
1039 ActionManager::map_some_state ("Transport", "ToggleTimeMaster", &Configuration::get_jack_time_master);
1040 } else if (PARAM_IS ("plugins-stop-with-transport")) {
1041 ActionManager::map_some_state ("options", "StopPluginsWithTransport", &Configuration::get_plugins_stop_with_transport);
1042 } else if (PARAM_IS ("latched-record-enable")) {
1043 ActionManager::map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable);
1044 } else if (PARAM_IS ("verify-remove-last-capture")) {
1045 ActionManager::map_some_state ("options", "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture);
1046 } else if (PARAM_IS ("periodic-safety-backups")) {
1047 ActionManager::map_some_state ("options", "PeriodicSafetyBackups", &Configuration::get_periodic_safety_backups);
1048 } else if (PARAM_IS ("stop-recording-on-xrun")) {
1049 ActionManager::map_some_state ("options", "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun);
1050 } else if (PARAM_IS ("sync-all-route-ordering")) {
1051 ActionManager::map_some_state ("options", "SyncEditorAndMixerTrackOrder", &Configuration::get_sync_all_route_ordering);
1052 } else if (PARAM_IS ("stop-at-session-end")) {
1053 ActionManager::map_some_state ("options", "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end);
1054 } else if (PARAM_IS ("monitoring-model")) {
1055 map_monitor_model ();
1056 } else if (PARAM_IS ("denormal-model")) {
1057 map_denormal_model ();
1058 } else if (PARAM_IS ("denormal-protection")) {
1059 map_denormal_protection ();
1060 } else if (PARAM_IS ("remote-model")) {
1061 map_remote_model ();
1062 } else if (PARAM_IS ("use-video-sync")) {
1063 ActionManager::map_some_state ("Transport", "ToggleVideoSync", &Configuration::get_use_video_sync);
1064 } else if (PARAM_IS ("quieten-at-speed")) {
1065 ActionManager::map_some_state ("options", "GainReduceFastTransport", &Configuration::get_quieten_at_speed);
1066 } else if (PARAM_IS ("shuttle-behaviour")) {
1068 switch (Config->get_shuttle_behaviour ()) {
1070 shuttle_style_button.set_active_text (_("sprung"));
1071 shuttle_fract = 0.0;
1072 shuttle_box.queue_draw ();
1074 if (session->transport_rolling()) {
1075 shuttle_fract = SHUTTLE_FRACT_SPEED1;
1076 session->request_transport_speed (1.0);
1081 shuttle_style_button.set_active_text (_("wheel"));
1085 } else if (PARAM_IS ("shuttle-units")) {
1087 switch (Config->get_shuttle_units()) {
1089 shuttle_units_button.set_label("% ");
1092 shuttle_units_button.set_label(_("ST"));
1095 } else if (PARAM_IS ("input-auto-connect")) {
1096 map_input_auto_connect ();
1097 } else if (PARAM_IS ("output-auto-connect")) {
1098 map_output_auto_connect ();
1099 } else if (PARAM_IS ("native-file-header-format")) {
1100 map_file_header_format ();
1101 } else if (PARAM_IS ("native-file-data-format")) {
1102 map_file_data_format ();
1103 } else if (PARAM_IS ("meter-hold")) {
1105 } else if (PARAM_IS ("meter-falloff")) {
1106 map_meter_falloff ();
1107 } else if (PARAM_IS ("video-pullup") || PARAM_IS ("smpte-format")) {
1109 primary_clock.set (session->audible_frame(), true);
1110 secondary_clock.set (session->audible_frame(), true);
1112 primary_clock.set (0, true);
1113 secondary_clock.set (0, true);
1115 } else if (PARAM_IS ("use-overlap-equivalency")) {
1116 ActionManager::map_some_state ("options", "RegionEquivalentsOverlap", &Configuration::get_use_overlap_equivalency);
1117 } else if (PARAM_IS ("primary-clock-delta-edit-cursor")) {
1118 ActionManager::map_some_state ("options", "PrimaryClockDeltaEditCursor", &Configuration::get_primary_clock_delta_edit_cursor);
1119 } else if (PARAM_IS ("secondary-clock-delta-edit-cursor")) {
1120 ActionManager::map_some_state ("options", "SecondaryClockDeltaEditCursor", &Configuration::get_secondary_clock_delta_edit_cursor);
1121 } else if (PARAM_IS ("only-copy-imported-files")) {
1122 map_only_copy_imported_files ();
1123 } else if (PARAM_IS ("show-track-meters")) {
1124 ActionManager::map_some_state ("options", "ShowTrackMeters", &Configuration::get_show_track_meters);
1125 editor->toggle_meter_updating();
1126 } else if (PARAM_IS ("default-narrow_ms")) {
1127 ActionManager::map_some_state ("options", "DefaultNarrowMS", &Configuration::get_default_narrow_ms);