4998f76303483f31639c9188647f23e5cbf2a3ae
[ardour.git] / gtk2_ardour / ardour_ui_options.cc
1 /*
2  * Copyright (C) 2005-2019 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2006-2007 Doug McLain <doug@nostar.net>
4  * Copyright (C) 2006-2007 Nick Mainsbridge <mainsbridge@gmail.com>
5  * Copyright (C) 2006 Sampo Savolainen <v2@iki.fi>
6  * Copyright (C) 2007-2015 Tim Mayberry <mojofunk@gmail.com>
7  * Copyright (C) 2008-2012 David Robillard <d@drobilla.net>
8  * Copyright (C) 2008 Hans Baier <hansfbaier@googlemail.com>
9  * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
10  * Copyright (C) 2012-2019 Robin Gareus <robin@gareus.org>
11  * Copyright (C) 2014-2018 Ben Loftis <ben@harrisonconsoles.com>
12  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License along
24  * with this program; if not, write to the Free Software Foundation, Inc.,
25  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26  */
27
28 #ifdef WAF_BUILD
29 #include "gtk2ardour-config.h"
30 #endif
31
32 #include "pbd/convert.h"
33 #include "pbd/stacktrace.h"
34 #include "pbd/unwind.h"
35
36 #include "ardour/rc_configuration.h"
37 #include "ardour/session.h"
38 #include "ardour/transport_master_manager.h"
39
40 #include "gtkmm2ext/utils.h"
41 #include "waveview/wave_view.h"
42
43 #include "audio_clock.h"
44 #include "ardour_ui.h"
45 #include "actions.h"
46 #include "gui_thread.h"
47 #include "public_editor.h"
48 #include "main_clock.h"
49
50 #include "pbd/i18n.h"
51
52 using namespace Gtk;
53 using namespace Gtkmm2ext;
54 using namespace ARDOUR;
55 using namespace PBD;
56 using namespace ArdourWidgets;
57
58 void
59 ARDOUR_UI::toggle_external_sync()
60 {
61         if (_session) {
62                 if (_session->config.get_video_pullup() != 0.0f && (TransportMasterManager::instance().current()->type() == Engine)) {
63                         MessageDialog msg (_("It is not possible to use JACK as the the sync source\n when the pull up/down setting is non-zero."));
64                         msg.run ();
65                         return;
66                 }
67
68                 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));
69
70                 /* activating a slave is a session-property.
71                  * The slave type is a RC property.
72                  * When the slave is active is must not be reconfigured.
73                  * This is a UI limitation, imposed by audio-clock and
74                  * status displays which combine RC-config & session-properties.
75                  *
76                  * Notify RCOptionEditor by emitting a signal if the active
77                  * status changed:
78                  */
79                 Config->ParameterChanged("sync-source");
80         }
81 }
82
83 void
84 ARDOUR_UI::toggle_time_master ()
85 {
86         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));
87 }
88
89 void
90 ARDOUR_UI::toggle_send_mtc ()
91 {
92         ActionManager::toggle_config_state ("Options", "SendMTC", &RCConfiguration::set_send_mtc, &RCConfiguration::get_send_mtc);
93 }
94
95 void
96 ARDOUR_UI::toggle_send_mmc ()
97 {
98         ActionManager::toggle_config_state ("Options", "SendMMC", &RCConfiguration::set_send_mmc, &RCConfiguration::get_send_mmc);
99 }
100
101 void
102 ARDOUR_UI::toggle_send_midi_clock ()
103 {
104         ActionManager::toggle_config_state ("Options", "SendMidiClock", &RCConfiguration::set_send_midi_clock, &RCConfiguration::get_send_midi_clock);
105 }
106
107 void
108 ARDOUR_UI::toggle_use_mmc ()
109 {
110         ActionManager::toggle_config_state ("Options", "UseMMC", &RCConfiguration::set_mmc_control, &RCConfiguration::get_mmc_control);
111 }
112
113 void
114 ARDOUR_UI::toggle_auto_input ()
115 {
116         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));
117 }
118
119 void
120 ARDOUR_UI::toggle_auto_play ()
121 {
122         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));
123 }
124
125 void
126 ARDOUR_UI::toggle_auto_return ()
127 {
128         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));
129 }
130
131 void
132 ARDOUR_UI::toggle_click ()
133 {
134         ActionManager::toggle_config_state ("Transport", "ToggleClick", &RCConfiguration::set_clicking, &RCConfiguration::get_clicking);
135 }
136
137 void
138 ARDOUR_UI::toggle_session_monitoring_in ()
139 {
140         Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorIn"));
141
142         if (tact->get_active() && _session->config.get_session_monitoring () == MonitorInput) {
143                 return;
144         }
145         if (!tact->get_active() && _session->config.get_session_monitoring () != MonitorInput) {
146                 return;
147         }
148
149         if (tact->get_active()) {
150                 _session->config.set_session_monitoring (MonitorInput);
151         } else {
152                 _session->config.set_session_monitoring (MonitorAuto);
153         }
154 }
155
156 void
157 ARDOUR_UI::toggle_session_monitoring_disk ()
158 {
159         Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorDisk"));
160         if (tact->get_active() && _session->config.get_session_monitoring () == MonitorDisk) {
161                 return;
162         }
163         if (!tact->get_active() && _session->config.get_session_monitoring () != MonitorDisk) {
164                 return;
165         }
166
167         if (tact->get_active()) {
168                 _session->config.set_session_monitoring (MonitorDisk);
169         } else {
170                 _session->config.set_session_monitoring (MonitorAuto);
171         }
172 }
173
174 void
175 ARDOUR_UI::unset_dual_punch ()
176 {
177         Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action ("Transport", "TogglePunch");
178         if (tact) {
179                 ignore_dual_punch = true;
180                 tact->set_active (false);
181                 ignore_dual_punch = false;
182         }
183 }
184
185 void
186 ARDOUR_UI::toggle_punch ()
187 {
188         if (ignore_dual_punch) {
189                 return;
190         }
191
192         Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action ("Transport", "TogglePunch");
193
194         /* drive the other two actions from this one */
195         Glib::RefPtr<ToggleAction> in_action = ActionManager::get_toggle_action ("Transport", "TogglePunchIn");
196         Glib::RefPtr<ToggleAction> out_action = ActionManager::get_toggle_action ("Transport", "TogglePunchOut");
197
198         in_action->set_active (tact->get_active());
199         out_action->set_active (tact->get_active());
200 }
201
202 void
203 ARDOUR_UI::toggle_punch_in ()
204 {
205         Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Transport"), X_("TogglePunchIn"));
206
207         if (tact->get_active() != _session->config.get_punch_in()) {
208                 _session->config.set_punch_in (tact->get_active ());
209         }
210
211         if (tact->get_active()) {
212                 /* if punch-in is turned on, make sure the loop/punch ruler is visible, and stop it being hidden,
213                    to avoid confusing the user */
214                 show_loop_punch_ruler_and_disallow_hide ();
215         }
216
217         reenable_hide_loop_punch_ruler_if_appropriate ();
218 }
219
220 void
221 ARDOUR_UI::toggle_punch_out ()
222 {
223         Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Transport"), X_("TogglePunchOut"));
224
225         if (tact->get_active() != _session->config.get_punch_out()) {
226                 _session->config.set_punch_out (tact->get_active ());
227         }
228
229         if (tact->get_active()) {
230                 /* if punch-out is turned on, make sure the loop/punch ruler is visible, and stop it being hidden,
231                    to avoid confusing the user */
232                 show_loop_punch_ruler_and_disallow_hide ();
233         }
234
235         reenable_hide_loop_punch_ruler_if_appropriate ();
236 }
237
238 void
239 ARDOUR_UI::show_loop_punch_ruler_and_disallow_hide ()
240 {
241         Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Rulers"), "toggle-loop-punch-ruler");
242
243         tact->set_sensitive (false);
244
245         if (!tact->get_active()) {
246                 tact->set_active ();
247         }
248 }
249
250 /* This is a bit of a silly name for a method */
251 void
252 ARDOUR_UI::reenable_hide_loop_punch_ruler_if_appropriate ()
253 {
254         if (!_session->config.get_punch_in() && !_session->config.get_punch_out()) {
255                 /* if punch in/out are now both off, reallow hiding of the loop/punch ruler */
256                 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Rulers"), "toggle-loop-punch-ruler");
257                 if (act) {
258                         act->set_sensitive (true);
259                 }
260         }
261 }
262
263 void
264 ARDOUR_UI::toggle_video_sync()
265 {
266         Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action ("Transport", "ToggleVideoSync");
267         _session->config.set_use_video_sync (tact->get_active());
268 }
269
270 void
271 ARDOUR_UI::toggle_editing_space()
272 {
273         Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action ("Common", "ToggleMaximalEditor");
274         if (tact->get_active()) {
275                 maximise_editing_space ();
276         } else {
277                 restore_editing_space ();
278         }
279 }
280
281 void
282 ARDOUR_UI::toggle_latency_switch ()
283 {
284         Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action ("Main", "ToggleLatencyCompensation");
285         ARDOUR::Latent::force_zero_latency (tact->get_active());
286 }
287
288 void
289 ARDOUR_UI::setup_session_options ()
290 {
291         _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context());
292         boost::function<void (std::string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
293         _session->config.map_parameters (pc);
294 }
295
296 void
297 ARDOUR_UI::parameter_changed (std::string p)
298 {
299         if (p == "external-sync") {
300
301                 /* session parameter */
302
303                 ActionManager::map_some_state ("Transport", "ToggleExternalSync", sigc::mem_fun (_session->config, &SessionConfiguration::get_external_sync));
304
305                 if (!_session->config.get_external_sync()) {
306                         sync_button.set_text (S_("SyncSource|Int."));
307                         ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
308                         ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
309                         ActionManager::get_action ("Transport", "ToggleFollowEdits")->set_sensitive (true);
310                 } else {
311                         /* XXX we need to make sure that auto-play is off as well as insensitive */
312                         ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
313                         ActionManager::get_action ("Transport", "ToggleFollowEdits")->set_sensitive (false);
314                         if (!_session->synced_to_engine()) {
315                                 /* JACK transport allows auto-return */
316                                 ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
317                         }
318                 }
319
320         } else if (p == "sync-source") {
321
322                 /* app parameter (RC config) */
323
324                 if (_session) {
325                         if (!_session->config.get_external_sync()) {
326                                 sync_button.set_text (S_("SyncSource|Int."));
327                         } else {
328                                 sync_button.set_text (TransportMasterManager::instance().current()->display_name());
329                         }
330                 } else {
331                         /* changing sync source without a session is unlikely/impossible , except during startup */
332                         sync_button.set_text (TransportMasterManager::instance().current()->display_name());
333                 }
334
335         } else if (p == "follow-edits") {
336
337                 ActionManager::map_some_state ("Transport", "ToggleFollowEdits", &UIConfiguration::get_follow_edits);
338
339         } else if (p == "send-mtc") {
340
341                 ActionManager::map_some_state ("Options", "SendMTC", &RCConfiguration::get_send_mtc);
342
343         } else if (p == "send-mmc") {
344
345                 ActionManager::map_some_state ("Options", "SendMMC", &RCConfiguration::get_send_mmc);
346
347         } else if (p == "mmc-control") {
348                 ActionManager::map_some_state ("Options", "UseMMC", &RCConfiguration::get_mmc_control);
349         } else if (p == "auto-play") {
350                 ActionManager::map_some_state ("Transport", "ToggleAutoPlay", sigc::mem_fun (_session->config, &SessionConfiguration::get_auto_play));
351         } else if (p == "auto-return") {
352                 ActionManager::map_some_state ("Transport", "ToggleAutoReturn", sigc::mem_fun (_session->config, &SessionConfiguration::get_auto_return));
353         } else if (p == "auto-input") {
354                 ActionManager::map_some_state ("Transport", "ToggleAutoInput", sigc::mem_fun (_session->config, &SessionConfiguration::get_auto_input));
355         } else if (p == "session-monitoring") {
356                 Glib::RefPtr<ToggleAction> tiact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorIn"));
357                 Glib::RefPtr<ToggleAction> tdact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorDisk"));
358                 switch (_session->config.get_session_monitoring ()) {
359                         case MonitorDisk:
360                                 tdact->set_active (true);
361                                 tiact->set_active (false);
362                                 break;
363                         case MonitorInput:
364                                 tiact->set_active (true);
365                                 tdact->set_active (false);
366                                 break;
367                         default:
368                                 tdact->set_active (false);
369                                 tiact->set_active (false);
370                                 break;
371                 }
372         } else if (p == "punch-out") {
373                 ActionManager::map_some_state ("Transport", "TogglePunchOut", sigc::mem_fun (_session->config, &SessionConfiguration::get_punch_out));
374                 if (!_session->config.get_punch_out()) {
375                         unset_dual_punch ();
376                 }
377         } else if (p == "punch-in") {
378                 ActionManager::map_some_state ("Transport", "TogglePunchIn", sigc::mem_fun (_session->config, &SessionConfiguration::get_punch_in));
379                 if (!_session->config.get_punch_in()) {
380                         unset_dual_punch ();
381                 }
382         } else if (p == "clicking") {
383                 ActionManager::map_some_state ("Transport", "ToggleClick", &RCConfiguration::get_clicking);
384         } else if (p == "use-video-sync") {
385                 ActionManager::map_some_state ("Transport",  "ToggleVideoSync", sigc::mem_fun (_session->config, &SessionConfiguration::get_use_video_sync));
386         } else if (p == "sync-source") {
387
388                 synchronize_sync_source_and_video_pullup ();
389                 set_fps_timeout_connection ();
390
391         } else if (p == "show-track-meters") {
392                 if (editor) editor->toggle_meter_updating();
393         } else if (p == "primary-clock-delta-mode") {
394                 if (UIConfiguration::instance().get_primary_clock_delta_mode() != NoDelta) {
395                         primary_clock->set_is_duration (true);
396                         primary_clock->set_editable (false);
397                         primary_clock->set_widget_name ("transport delta");
398                 } else {
399                         primary_clock->set_is_duration (false);
400                         primary_clock->set_editable (true);
401                         primary_clock->set_widget_name ("transport");
402                 }
403         } else if (p == "secondary-clock-delta-mode") {
404                 if (UIConfiguration::instance().get_secondary_clock_delta_mode() != NoDelta) {
405                         secondary_clock->set_is_duration (true);
406                         secondary_clock->set_editable (false);
407                         secondary_clock->set_widget_name ("secondary delta");
408                 } else {
409                         secondary_clock->set_is_duration (false);
410                         secondary_clock->set_editable (true);
411                         secondary_clock->set_widget_name ("secondary");
412                 }
413         } else if (p == "super-rapid-clock-update") {
414                 if (_session) {
415                         stop_clocking ();
416                         start_clocking ();
417                 }
418         } else if (p == "use-tooltips") {
419                 /* this doesn't really belong here but it has to go somewhere */
420                 if (UIConfiguration::instance().get_use_tooltips()) {
421                         Gtkmm2ext::enable_tooltips ();
422                 } else {
423                         Gtkmm2ext::disable_tooltips ();
424                 }
425         } else if (p == "waveform-gradient-depth") {
426                 ArdourWaveView::WaveView::set_global_gradient_depth (UIConfiguration::instance().get_waveform_gradient_depth());
427         } else if (p == "show-mini-timeline") {
428                 repack_transport_hbox ();
429         } else if (p == "show-dsp-load-info") {
430                 repack_transport_hbox ();
431         } else if (p == "show-disk-space-info") {
432                 repack_transport_hbox ();
433         } else if (p == "show-toolbar-recpunch") {
434                 repack_transport_hbox ();
435         } else if (p == "show-toolbar-monitoring") {
436                 repack_transport_hbox ();
437         } else if (p == "show-toolbar-selclock") {
438                 repack_transport_hbox ();
439         } else if (p == "show-toolbar-latency") {
440                 repack_transport_hbox ();
441         } else if (p == "show-editor-meter") {
442                 repack_transport_hbox ();
443         } else if (p == "show-secondary-clock") {
444                 update_clock_visibility ();
445         } else if (p == "waveform-scale") {
446                 ArdourWaveView::WaveView::set_global_logscaled (UIConfiguration::instance().get_waveform_scale() == Logarithmic);
447         } else if (p == "widget-prelight") {
448                 CairoWidget::set_widget_prelight (UIConfiguration::instance().get_widget_prelight());
449         } else if (p == "waveform-shape") {
450                 ArdourWaveView::WaveView::set_global_shape (UIConfiguration::instance().get_waveform_shape() == Rectified
451                                 ? ArdourWaveView::WaveView::Rectified : ArdourWaveView::WaveView::Normal);
452         } else if (p == "show-waveform-clipping") {
453                 ArdourWaveView::WaveView::set_global_show_waveform_clipping (UIConfiguration::instance().get_show_waveform_clipping());
454         } else if (p == "waveform-cache-size") {
455                 /* GUI option has units of megabytes; image cache uses units of bytes */
456                 ArdourWaveView::WaveView::set_image_cache_size (UIConfiguration::instance().get_waveform_cache_size() * 1048576);
457         } else if (p == "use-wm-visibility") {
458                 VisibilityTracker::set_use_window_manager_visibility (UIConfiguration::instance().get_use_wm_visibility());
459         } else if (p == "action-table-columns") {
460                 const uint32_t cols = UIConfiguration::instance().get_action_table_columns ();
461                 for (int i = 0; i < MAX_LUA_ACTION_BUTTONS; ++i) {
462                         const int col = i / 2;
463                         if (cols & (1<<col)) {
464                                 action_script_call_btn[i].show();
465                         } else {
466                                 action_script_call_btn[i].hide();
467                         }
468                 }
469         } else if (p == "layered-record-mode") {
470                 layered_button.set_active (_session->config.get_layered_record_mode ());
471         } else if (p == "flat-buttons") {
472                 bool flat = UIConfiguration::instance().get_flat_buttons();
473                 if (ArdourButton::flat_buttons () != flat) {
474                         ArdourButton::set_flat_buttons (flat);
475                         /* force a redraw */
476                         gtk_rc_reset_styles (gtk_settings_get_default());
477                 }
478         } else if (p == "boxy-buttons") {
479                 bool boxy = UIConfiguration::instance().get_boxy_buttons();
480                 if (ArdourButton::boxy_buttons () != boxy) {
481                         ArdourButton::set_boxy_buttons (boxy);
482                         /* force a redraw */
483                         gtk_rc_reset_styles (gtk_settings_get_default());
484                 }
485         } else if ( (p == "snap-to-region-sync") || (p == "snap-to-region-start") || (p == "snap-to-region-end") ) {
486                 if (editor) editor->mark_region_boundary_cache_dirty();
487         } else if (p == "screen-saver-mode") {
488                 switch (UIConfiguration::instance().get_screen_saver_mode ()) {
489                         using namespace ARDOUR_UI_UTILS;
490                         case InhibitWhileRecording:
491                                 inhibit_screensaver (_session && _session->actively_recording ());
492                                 break;
493                         case InhibitAlways:
494                                 inhibit_screensaver (true);
495                                 break;
496                         case InhibitNever:
497                                 inhibit_screensaver (false);
498                                 break;
499                 }
500         }
501 }
502
503 void
504 ARDOUR_UI::session_parameter_changed (std::string p)
505 {
506         if (p == "native-file-data-format" || p == "native-file-header-format") {
507                 update_format ();
508         } else if (p == "timecode-format") {
509                 set_fps_timeout_connection ();
510         } else if (p == "video-pullup" || p == "timecode-format") {
511                 set_fps_timeout_connection ();
512
513                 synchronize_sync_source_and_video_pullup ();
514                 reset_main_clocks ();
515                 editor->queue_visual_videotimeline_update();
516         } else if (p == "track-name-number") {
517                 /* DisplaySuspender triggers _route->redisplay() when going out of scope
518                  * which eventually calls reset_controls_layout_width() and re-sets the
519                  * track-header width.
520                  * see also RouteTimeAxisView::update_track_number_visibility()
521                  */
522                 DisplaySuspender ds;
523         }
524 }
525
526 void
527 ARDOUR_UI::reset_main_clocks ()
528 {
529         ENSURE_GUI_THREAD (*this, &ARDOUR_UI::reset_main_clocks)
530
531         if (_session) {
532                 primary_clock->set (_session->audible_sample(), true);
533                 secondary_clock->set (_session->audible_sample(), true);
534         } else {
535                 primary_clock->set (0, true);
536                 secondary_clock->set (0, true);
537         }
538 }
539
540 void
541 ARDOUR_UI::synchronize_sync_source_and_video_pullup ()
542 {
543         Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("ToggleExternalSync"));
544
545         if (!act) {
546                 return;
547         }
548
549         if (!_session) {
550                 goto just_label;
551         }
552
553         if (_session->config.get_video_pullup() == 0.0f) {
554                 /* with no video pull up/down, any sync source is OK */
555                 act->set_sensitive (true);
556         } else {
557                 /* can't sync to JACK if video pullup != 0.0 */
558                 if (TransportMasterManager::instance().current()->type() == Engine) {
559                         act->set_sensitive (false);
560                 } else {
561                         act->set_sensitive (true);
562                 }
563         }
564
565         /* XXX should really be able to set the video pull up
566            action to insensitive/sensitive, but there is no action.
567            FIXME
568         */
569
570   just_label:
571         if (act->get_sensitive ()) {
572                 set_tip (sync_button, _("Enable/Disable external positional sync"));
573         } else {
574                 set_tip (sync_button, _("Sync to JACK is not possible: video pull up/down is set"));
575         }
576
577 }