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