21 #include "gtk2ardour-config.h"
32 #include "canvas/wave_view.h"
60 if (_session->config.get_video_pullup() != 0.0f) {
63 _(
"It is not possible to use JACK as the the sync source\n\
64 when the pull up/down setting is non-zero."));
70 ActionManager::toggle_config_state_foo (
"Transport",
"ToggleExternalSync", sigc::mem_fun (_session->config, &SessionConfiguration::set_external_sync), sigc::mem_fun (_session->config, &SessionConfiguration::get_external_sync));
88 ActionManager::toggle_config_state_foo (
"Transport",
"ToggleTimeMaster", sigc::mem_fun (_session->config, &SessionConfiguration::set_jack_time_master), sigc::mem_fun (_session->config, &SessionConfiguration::get_jack_time_master));
124 ActionManager::toggle_config_state_foo (
"Transport",
"ToggleAutoInput", sigc::mem_fun (_session->config, &SessionConfiguration::set_auto_input), sigc::mem_fun (_session->config, &SessionConfiguration::get_auto_input));
130 ActionManager::toggle_config_state_foo (
"Transport",
"ToggleAutoPlay", sigc::mem_fun (_session->config, &SessionConfiguration::set_auto_play), sigc::mem_fun (_session->config, &SessionConfiguration::get_auto_play));
136 ActionManager::toggle_config_state_foo (
"Transport",
"ToggleAutoReturn", sigc::mem_fun (_session->config, &SessionConfiguration::set_auto_return), sigc::mem_fun (_session->config, &SessionConfiguration::get_auto_return));
151 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(action);
153 ignore_dual_punch =
true;
154 tact->set_active (
false);
155 ignore_dual_punch =
false;
163 if (ignore_dual_punch) {
171 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(action);
182 if (in_action && out_action) {
183 Glib::RefPtr<ToggleAction> tiact = Glib::RefPtr<ToggleAction>::cast_dynamic(in_action);
184 Glib::RefPtr<ToggleAction> toact = Glib::RefPtr<ToggleAction>::cast_dynamic(out_action);
185 tiact->set_active (tact->get_active());
186 toact->set_active (tact->get_active());
199 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
204 if (tact->get_active() != _session->config.get_punch_in()) {
205 _session->config.set_punch_in (tact->get_active ());
208 if (tact->get_active()) {
211 show_loop_punch_ruler_and_disallow_hide ();
214 reenable_hide_loop_punch_ruler_if_appropriate ();
225 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
230 if (tact->get_active() != _session->config.get_punch_out()) {
231 _session->config.set_punch_out (tact->get_active ());
234 if (tact->get_active()) {
237 show_loop_punch_ruler_and_disallow_hide ();
240 reenable_hide_loop_punch_ruler_if_appropriate ();
251 act->set_sensitive (
false);
253 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
258 if (!tact->get_active()) {
267 if (!_session->config.get_punch_in() && !_session->config.get_punch_out()) {
271 act->set_sensitive (
true);
281 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
282 _session->config.set_use_video_sync (tact->get_active());
292 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
293 if (tact->get_active()) {
294 maximise_editing_space ();
296 restore_editing_space ();
306 _session->config.map_parameters (pc);
312 if (p ==
"external-sync") {
314 ActionManager::map_some_state (
"Transport",
"ToggleExternalSync", sigc::mem_fun (_session->config, &SessionConfiguration::get_external_sync));
316 if (!_session->config.get_external_sync()) {
317 sync_button.set_text (
_(
"Internal"));
329 }
else if (p ==
"follow-edits") {
333 }
else if (p ==
"send-mtc") {
337 }
else if (p ==
"send-mmc") {
341 }
else if (p ==
"keep-tearoffs") {
343 }
else if (p ==
"mmc-control") {
345 }
else if (p ==
"midi-feedback") {
347 }
else if (p ==
"auto-play") {
349 }
else if (p ==
"auto-return") {
351 }
else if (p ==
"auto-input") {
353 }
else if (p ==
"punch-out") {
355 if (!_session->config.get_punch_out()) {
358 }
else if (p ==
"punch-in") {
360 if (!_session->config.get_punch_in()) {
363 }
else if (p ==
"clicking") {
365 }
else if (p ==
"use-video-sync") {
367 }
else if (p ==
"sync-source") {
369 synchronize_sync_source_and_video_pullup ();
370 set_fps_timeout_connection ();
372 }
else if (p ==
"show-track-meters") {
373 if (editor) editor->toggle_meter_updating();
374 }
else if (p ==
"primary-clock-delta-edit-cursor") {
376 primary_clock->set_is_duration (
true);
377 primary_clock->set_editable (
false);
378 primary_clock->set_widget_name (
"transport delta");
380 primary_clock->set_is_duration (
false);
381 primary_clock->set_editable (
true);
382 primary_clock->set_widget_name (
"transport");
384 }
else if (p ==
"secondary-clock-delta-edit-cursor") {
386 secondary_clock->set_is_duration (
true);
387 secondary_clock->set_editable (
false);
388 secondary_clock->set_widget_name (
"secondary delta");
390 secondary_clock->set_is_duration (
false);
391 secondary_clock->set_editable (
true);
392 secondary_clock->set_widget_name (
"secondary");
394 }
else if (p ==
"super-rapid-clock-update") {
399 }
else if (p ==
"waveform-gradient-depth") {
400 ArdourCanvas::WaveView::set_global_gradient_depth (config()->get_waveform_gradient_depth());
401 }
else if (p ==
"show-editor-meter") {
405 if (meter_box.get_parent()) {
406 transport_tearoff_hbox.remove (meter_box);
407 transport_tearoff_hbox.remove (editor_meter_peak_display);
411 transport_tearoff_hbox.pack_start (meter_box,
false,
false);
412 transport_tearoff_hbox.pack_start (editor_meter_peak_display,
false,
false);
414 editor_meter_peak_display.show();
417 }
else if (p ==
"waveform-scale") {
419 }
else if (p ==
"widget-prelight") {
421 }
else if (p ==
"waveform-shape") {
424 }
else if (p ==
"show-waveform-clipping") {
425 ArdourCanvas::WaveView::set_global_show_waveform_clipping (
ARDOUR_UI::config()->get_show_waveform_clipping());
426 }
else if (p ==
"font-scale") {
427 ui_scale = config()->get_font_scale () / 102400.;
434 if (p ==
"native-file-data-format" || p ==
"native-file-header-format") {
436 }
else if (p ==
"timecode-format") {
437 set_fps_timeout_connection ();
438 }
else if (p ==
"video-pullup" || p ==
"timecode-format") {
439 set_fps_timeout_connection ();
441 synchronize_sync_source_and_video_pullup ();
442 reset_main_clocks ();
443 editor->queue_visual_videotimeline_update();
444 }
else if (p ==
"track-name-number") {
460 primary_clock->set (_session->audible_frame(),
true);
461 secondary_clock->set (_session->audible_frame(),
true);
463 primary_clock->set (0,
true);
464 secondary_clock->set (0,
true);
481 if (_session->config.get_video_pullup() == 0.0f) {
483 act->set_sensitive (
true);
487 act->set_sensitive (
false);
489 act->set_sensitive (
true);
499 if (act->get_sensitive ()) {
500 set_tip (sync_button,
_(
"Enable/Disable external positional sync"));
502 set_tip (sync_button,
_(
"Sync to JACK is not possible: video pull up/down is set"));
void reenable_hide_loop_punch_ruler_if_appropriate()
void session_parameter_changed(std::string)
LIBARDOUR_API const char * sync_source_to_string(ARDOUR::SyncSource src, bool sh=false)
LIBGTKMM2EXT_API Glib::RefPtr< Gtk::Action > get_action(const char *group, const char *name)
void toggle_config_state_foo(const char *group, const char *action, sigc::slot< bool, bool >, sigc::slot< bool >)
void toggle_external_sync()
void toggle_send_midi_clock()
void toggle_send_midi_feedback()
#define ENSURE_GUI_THREAD(obj, method,...)
void toggle_auto_return()
LIBARDOUR_API RCConfiguration * Config
void show_loop_punch_ruler_and_disallow_hide()
void map_some_state(const char *group, const char *action, bool(ARDOUR::RCConfiguration::*get)() const)
PBD::Signal1< void, std::string > ParameterChanged
void toggle_keep_tearoffs()
void setup_session_options()
static UIConfiguration * config()
void toggle_time_master()
void parameter_changed(std::string)
void toggle_editing_space()
void toggle_config_state(const char *group, const char *action, bool(UIConfiguration::*set)(bool), bool(UIConfiguration::*get)(void) const)
#define MISSING_INVALIDATOR
void update_tearoff_visibility()
void synchronize_sync_source_and_video_pullup()