2 #include "gtk2ardour-config.h"
5 #include <gtkmm/liststore.h>
6 #include <gtkmm/stock.h>
7 #include <gtkmm/scale.h>
8 #include <gtkmm2ext/utils.h>
9 #include <gtkmm2ext/slider_controller.h>
14 #include "midi++/manager.h"
16 #include "ardour/audioengine.h"
17 #include "ardour/dB.h"
18 #include "ardour/rc_configuration.h"
19 #include "ardour/control_protocol_manager.h"
20 #include "control_protocol/control_protocol.h"
22 #include "gui_thread.h"
23 #include "midi_tracer.h"
24 #include "rc_option_editor.h"
26 #include "midi_port_dialog.h"
33 using namespace Gtkmm2ext
;
35 using namespace ARDOUR
;
37 class ClickOptions
: public OptionEditorBox
40 ClickOptions (RCConfiguration
* c
, ArdourDialog
* p
)
44 Table
* t
= manage (new Table (2, 3));
47 Label
* l
= manage (new Label (_("Click audio file:")));
48 l
->set_alignment (0, 0.5);
49 t
->attach (*l
, 0, 1, 0, 1, FILL
);
50 t
->attach (_click_path_entry
, 1, 2, 0, 1, FILL
);
51 Button
* b
= manage (new Button (_("Browse...")));
52 b
->signal_clicked().connect (sigc::mem_fun (*this, &ClickOptions::click_browse_clicked
));
53 t
->attach (*b
, 2, 3, 0, 1, FILL
);
55 l
= manage (new Label (_("Click emphasis audio file:")));
56 l
->set_alignment (0, 0.5);
57 t
->attach (*l
, 0, 1, 1, 2, FILL
);
58 t
->attach (_click_emphasis_path_entry
, 1, 2, 1, 2, FILL
);
59 b
= manage (new Button (_("Browse...")));
60 b
->signal_clicked().connect (sigc::mem_fun (*this, &ClickOptions::click_emphasis_browse_clicked
));
61 t
->attach (*b
, 2, 3, 1, 2, FILL
);
63 _box
->pack_start (*t
, false, false);
66 void parameter_changed (string
const & p
)
68 if (p
== "click-sound") {
69 _click_path_entry
.set_text (_rc_config
->get_click_sound());
70 } else if (p
== "click-emphasis-sound") {
71 _click_emphasis_path_entry
.set_text (_rc_config
->get_click_emphasis_sound());
75 void set_state_from_config ()
77 parameter_changed ("click-sound");
78 parameter_changed ("click-emphasis-sound");
83 void click_browse_clicked ()
85 SoundFileChooser
sfdb (*_parent
, _("Choose Click"));
90 if (sfdb
.run () == RESPONSE_OK
) {
91 click_chosen (sfdb
.get_filename());
95 void click_chosen (string
const & path
)
97 _click_path_entry
.set_text (path
);
98 _rc_config
->set_click_sound (path
);
101 void click_emphasis_browse_clicked ()
103 SoundFileChooser
sfdb (*_parent
, _("Choose Click Emphasis"));
108 if (sfdb
.run () == RESPONSE_OK
) {
109 click_emphasis_chosen (sfdb
.get_filename());
113 void click_emphasis_chosen (string
const & path
)
115 _click_emphasis_path_entry
.set_text (path
);
116 _rc_config
->set_click_emphasis_sound (path
);
119 RCConfiguration
* _rc_config
;
120 ArdourDialog
* _parent
;
121 Entry _click_path_entry
;
122 Entry _click_emphasis_path_entry
;
125 class UndoOptions
: public OptionEditorBox
128 UndoOptions (RCConfiguration
* c
) :
130 _limit_undo_button (_("Limit undo history to")),
131 _save_undo_button (_("Save undo history of"))
133 Table
* t
= new Table (2, 3);
136 t
->attach (_limit_undo_button
, 0, 1, 0, 1, FILL
);
137 _limit_undo_spin
.set_range (0, 512);
138 _limit_undo_spin
.set_increments (1, 10);
139 t
->attach (_limit_undo_spin
, 1, 2, 0, 1, FILL
| EXPAND
);
140 Label
* l
= manage (new Label (_("commands")));
141 l
->set_alignment (0, 0.5);
142 t
->attach (*l
, 2, 3, 0, 1);
144 t
->attach (_save_undo_button
, 0, 1, 1, 2, FILL
);
145 _save_undo_spin
.set_range (0, 512);
146 _save_undo_spin
.set_increments (1, 10);
147 t
->attach (_save_undo_spin
, 1, 2, 1, 2, FILL
| EXPAND
);
148 l
= manage (new Label (_("commands")));
149 l
->set_alignment (0, 0.5);
150 t
->attach (*l
, 2, 3, 1, 2);
152 _box
->pack_start (*t
);
154 _limit_undo_button
.signal_toggled().connect (sigc::mem_fun (*this, &UndoOptions::limit_undo_toggled
));
155 _limit_undo_spin
.signal_value_changed().connect (sigc::mem_fun (*this, &UndoOptions::limit_undo_changed
));
156 _save_undo_button
.signal_toggled().connect (sigc::mem_fun (*this, &UndoOptions::save_undo_toggled
));
157 _save_undo_spin
.signal_value_changed().connect (sigc::mem_fun (*this, &UndoOptions::save_undo_changed
));
160 void parameter_changed (string
const & p
)
162 if (p
== "history-depth") {
163 int32_t const d
= _rc_config
->get_history_depth();
164 _limit_undo_button
.set_active (d
!= 0);
165 _limit_undo_spin
.set_sensitive (d
!= 0);
166 _limit_undo_spin
.set_value (d
);
167 } else if (p
== "save-history") {
168 bool const x
= _rc_config
->get_save_history ();
169 _save_undo_button
.set_active (x
);
170 _save_undo_spin
.set_sensitive (x
);
171 } else if (p
== "save-history-depth") {
172 _save_undo_spin
.set_value (_rc_config
->get_saved_history_depth());
176 void set_state_from_config ()
178 parameter_changed ("save-history");
179 parameter_changed ("history-depth");
180 parameter_changed ("save-history-depth");
183 void limit_undo_toggled ()
185 bool const x
= _limit_undo_button
.get_active ();
186 _limit_undo_spin
.set_sensitive (x
);
187 int32_t const n
= x
? 16 : 0;
188 _limit_undo_spin
.set_value (n
);
189 _rc_config
->set_history_depth (n
);
192 void limit_undo_changed ()
194 _rc_config
->set_history_depth (_limit_undo_spin
.get_value_as_int ());
197 void save_undo_toggled ()
199 bool const x
= _save_undo_button
.get_active ();
200 _rc_config
->set_save_history (x
);
203 void save_undo_changed ()
205 _rc_config
->set_saved_history_depth (_save_undo_spin
.get_value_as_int ());
209 RCConfiguration
* _rc_config
;
210 CheckButton _limit_undo_button
;
211 SpinButton _limit_undo_spin
;
212 CheckButton _save_undo_button
;
213 SpinButton _save_undo_spin
;
218 static const struct {
230 { "Shift", GDK_SHIFT_MASK
},
231 { "Command", GDK_META_MASK
},
232 { "Control", GDK_CONTROL_MASK
},
233 { "Option", GDK_MOD1_MASK
},
234 { "Command-Shift", GDK_META_MASK
|GDK_SHIFT_MASK
},
235 { "Command-Option", GDK_MOD1_MASK
|GDK_META_MASK
},
236 { "Shift-Option", GDK_SHIFT_MASK
|GDK_MOD1_MASK
},
237 { "Shift-Command-Option", GDK_MOD5_MASK
|GDK_SHIFT_MASK
|GDK_META_MASK
},
240 { "Shift", GDK_SHIFT_MASK
},
241 { "Control", GDK_CONTROL_MASK
},
242 { "Alt (Mod1)", GDK_MOD1_MASK
},
243 { "Control-Shift", GDK_CONTROL_MASK
|GDK_SHIFT_MASK
},
244 { "Control-Alt", GDK_CONTROL_MASK
|GDK_MOD1_MASK
},
245 { "Shift-Alt", GDK_SHIFT_MASK
|GDK_MOD1_MASK
},
246 { "Control-Shift-Alt", GDK_CONTROL_MASK
|GDK_SHIFT_MASK
|GDK_MOD1_MASK
},
247 { "Mod2", GDK_MOD2_MASK
},
248 { "Mod3", GDK_MOD3_MASK
},
249 { "Mod4", GDK_MOD4_MASK
},
250 { "Mod5", GDK_MOD5_MASK
},
256 class KeyboardOptions
: public OptionEditorBox
260 _delete_button_adjustment (3, 1, 12),
261 _delete_button_spin (_delete_button_adjustment
),
262 _edit_button_adjustment (3, 1, 5),
263 _edit_button_spin (_edit_button_adjustment
),
264 _insert_note_button_adjustment (3, 1, 5),
265 _insert_note_button_spin (_insert_note_button_adjustment
)
269 /* internationalize and prepare for use with combos */
272 for (int i
= 0; modifiers
[i
].name
; ++i
) {
273 dumb
.push_back (_(modifiers
[i
].name
));
276 set_popdown_strings (_edit_modifier_combo
, dumb
);
277 _edit_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::edit_modifier_chosen
));
279 for (int x
= 0; modifiers
[x
].name
; ++x
) {
280 if (modifiers
[x
].modifier
== Keyboard::edit_modifier ()) {
281 _edit_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
286 Table
* t
= manage (new Table (4, 4));
289 Label
* l
= manage (new Label (_("Edit using:")));
290 l
->set_name ("OptionsLabel");
291 l
->set_alignment (0, 0.5);
293 t
->attach (*l
, 0, 1, 0, 1, FILL
| EXPAND
, FILL
);
294 t
->attach (_edit_modifier_combo
, 1, 2, 0, 1, FILL
| EXPAND
, FILL
);
296 l
= manage (new Label (_("+ button")));
297 l
->set_name ("OptionsLabel");
299 t
->attach (*l
, 3, 4, 0, 1, FILL
| EXPAND
, FILL
);
300 t
->attach (_edit_button_spin
, 4, 5, 0, 1, FILL
| EXPAND
, FILL
);
302 _edit_button_spin
.set_name ("OptionsEntry");
303 _edit_button_adjustment
.set_value (Keyboard::edit_button());
304 _edit_button_adjustment
.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::edit_button_changed
));
306 set_popdown_strings (_delete_modifier_combo
, dumb
);
307 _delete_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_modifier_chosen
));
309 for (int x
= 0; modifiers
[x
].name
; ++x
) {
310 if (modifiers
[x
].modifier
== Keyboard::delete_modifier ()) {
311 _delete_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
316 l
= manage (new Label (_("Delete using:")));
317 l
->set_name ("OptionsLabel");
318 l
->set_alignment (0, 0.5);
320 t
->attach (*l
, 0, 1, 1, 2, FILL
| EXPAND
, FILL
);
321 t
->attach (_delete_modifier_combo
, 1, 2, 1, 2, FILL
| EXPAND
, FILL
);
323 l
= manage (new Label (_("+ button")));
324 l
->set_name ("OptionsLabel");
326 t
->attach (*l
, 3, 4, 1, 2, FILL
| EXPAND
, FILL
);
327 t
->attach (_delete_button_spin
, 4, 5, 1, 2, FILL
| EXPAND
, FILL
);
329 _delete_button_spin
.set_name ("OptionsEntry");
330 _delete_button_adjustment
.set_value (Keyboard::delete_button());
331 _delete_button_adjustment
.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_button_changed
));
334 set_popdown_strings (_insert_note_modifier_combo
, dumb
);
335 _insert_note_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_modifier_chosen
));
337 for (int x
= 0; modifiers
[x
].name
; ++x
) {
338 if (modifiers
[x
].modifier
== Keyboard::insert_note_modifier ()) {
339 _insert_note_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
344 l
= manage (new Label (_("Insert note using:")));
345 l
->set_name ("OptionsLabel");
346 l
->set_alignment (0, 0.5);
348 t
->attach (*l
, 0, 1, 2, 3, FILL
| EXPAND
, FILL
);
349 t
->attach (_insert_note_modifier_combo
, 1, 2, 2, 3, FILL
| EXPAND
, FILL
);
351 l
= manage (new Label (_("+ button")));
352 l
->set_name ("OptionsLabel");
354 t
->attach (*l
, 3, 4, 2, 3, FILL
| EXPAND
, FILL
);
355 t
->attach (_insert_note_button_spin
, 4, 5, 2, 3, FILL
| EXPAND
, FILL
);
357 _insert_note_button_spin
.set_name ("OptionsEntry");
358 _insert_note_button_adjustment
.set_value (Keyboard::insert_note_button());
359 _insert_note_button_adjustment
.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_button_changed
));
362 set_popdown_strings (_snap_modifier_combo
, dumb
);
363 _snap_modifier_combo
.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen
));
365 for (int x
= 0; modifiers
[x
].name
; ++x
) {
366 if (modifiers
[x
].modifier
== (guint
) Keyboard::snap_modifier ()) {
367 _snap_modifier_combo
.set_active_text (_(modifiers
[x
].name
));
372 l
= manage (new Label (_("Toggle snap using:")));
373 l
->set_name ("OptionsLabel");
374 l
->set_alignment (0, 0.5);
376 t
->attach (*l
, 0, 1, 3, 4, FILL
| EXPAND
, FILL
);
377 t
->attach (_snap_modifier_combo
, 1, 2, 3, 4, FILL
| EXPAND
, FILL
);
381 for (map
<string
,string
>::iterator bf
= Keyboard::binding_files
.begin(); bf
!= Keyboard::binding_files
.end(); ++bf
) {
382 strs
.push_back (bf
->first
);
385 set_popdown_strings (_keyboard_layout_selector
, strs
);
386 _keyboard_layout_selector
.set_active_text (Keyboard::current_binding_name());
387 _keyboard_layout_selector
.signal_changed().connect (sigc::mem_fun (*this, &KeyboardOptions::bindings_changed
));
389 l
= manage (new Label (_("Keyboard layout:")));
390 l
->set_name ("OptionsLabel");
391 l
->set_alignment (0, 0.5);
393 t
->attach (*l
, 0, 1, 4, 5, FILL
| EXPAND
, FILL
);
394 t
->attach (_keyboard_layout_selector
, 1, 2, 4, 5, FILL
| EXPAND
, FILL
);
396 _box
->pack_start (*t
, false, false);
399 void parameter_changed (string
const &)
401 /* XXX: these aren't really config options... */
404 void set_state_from_config ()
406 /* XXX: these aren't really config options... */
411 void bindings_changed ()
413 string
const txt
= _keyboard_layout_selector
.get_active_text();
415 /* XXX: config...? for all this keyboard stuff */
417 for (map
<string
,string
>::iterator i
= Keyboard::binding_files
.begin(); i
!= Keyboard::binding_files
.end(); ++i
) {
418 if (txt
== i
->first
) {
419 if (Keyboard::load_keybindings (i
->second
)) {
420 Keyboard::save_keybindings ();
426 void edit_modifier_chosen ()
428 string
const txt
= _edit_modifier_combo
.get_active_text();
430 for (int i
= 0; modifiers
[i
].name
; ++i
) {
431 if (txt
== _(modifiers
[i
].name
)) {
432 Keyboard::set_edit_modifier (modifiers
[i
].modifier
);
438 void delete_modifier_chosen ()
440 string
const txt
= _delete_modifier_combo
.get_active_text();
442 for (int i
= 0; modifiers
[i
].name
; ++i
) {
443 if (txt
== _(modifiers
[i
].name
)) {
444 Keyboard::set_delete_modifier (modifiers
[i
].modifier
);
450 void insert_note_modifier_chosen ()
452 string
const txt
= _insert_note_modifier_combo
.get_active_text();
454 for (int i
= 0; modifiers
[i
].name
; ++i
) {
455 if (txt
== _(modifiers
[i
].name
)) {
456 Keyboard::set_insert_note_modifier (modifiers
[i
].modifier
);
462 void snap_modifier_chosen ()
464 string
const txt
= _snap_modifier_combo
.get_active_text();
466 for (int i
= 0; modifiers
[i
].name
; ++i
) {
467 if (txt
== _(modifiers
[i
].name
)) {
468 Keyboard::set_snap_modifier (modifiers
[i
].modifier
);
474 void delete_button_changed ()
476 Keyboard::set_delete_button (_delete_button_spin
.get_value_as_int());
479 void edit_button_changed ()
481 Keyboard::set_edit_button (_edit_button_spin
.get_value_as_int());
484 void insert_note_button_changed ()
486 Keyboard::set_insert_note_button (_insert_note_button_spin
.get_value_as_int());
489 ComboBoxText _keyboard_layout_selector
;
490 ComboBoxText _edit_modifier_combo
;
491 ComboBoxText _delete_modifier_combo
;
492 ComboBoxText _insert_note_modifier_combo
;
493 ComboBoxText _snap_modifier_combo
;
494 Adjustment _delete_button_adjustment
;
495 SpinButton _delete_button_spin
;
496 Adjustment _edit_button_adjustment
;
497 SpinButton _edit_button_spin
;
498 Adjustment _insert_note_button_adjustment
;
499 SpinButton _insert_note_button_spin
;
503 class FontScalingOptions
: public OptionEditorBox
506 FontScalingOptions (RCConfiguration
* c
) :
508 _dpi_adjustment (50, 50, 250, 1, 10),
509 _dpi_slider (_dpi_adjustment
)
511 _dpi_adjustment
.set_value (_rc_config
->get_font_scale () / 1024);
513 Label
* l
= manage (new Label (_("Font scaling:")));
514 l
->set_name ("OptionsLabel");
516 _dpi_slider
.set_update_policy (UPDATE_DISCONTINUOUS
);
517 HBox
* h
= manage (new HBox
);
519 h
->pack_start (*l
, false, false);
520 h
->pack_start (_dpi_slider
, true, true);
522 _box
->pack_start (*h
, false, false);
524 _dpi_adjustment
.signal_value_changed().connect (sigc::mem_fun (*this, &FontScalingOptions::dpi_changed
));
527 void parameter_changed (string
const & p
)
529 if (p
== "font-scale") {
530 _dpi_adjustment
.set_value (_rc_config
->get_font_scale() / 1024);
534 void set_state_from_config ()
536 parameter_changed ("font-scale");
543 _rc_config
->set_font_scale ((long) floor (_dpi_adjustment
.get_value() * 1024));
544 /* XXX: should be triggered from the parameter changed signal */
548 RCConfiguration
* _rc_config
;
549 Adjustment _dpi_adjustment
;
553 class BufferingOptions
: public OptionEditorBox
556 BufferingOptions (RCConfiguration
* c
)
558 , _playback_adjustment (5, 1, 60, 1, 4)
559 , _capture_adjustment (5, 1, 60, 1, 4)
560 , _playback_slider (_playback_adjustment
)
561 , _capture_slider (_capture_adjustment
)
563 _playback_adjustment
.set_value (_rc_config
->get_audio_playback_buffer_seconds());
565 Label
* l
= manage (new Label (_("Playback (seconds of buffering):")));
566 l
->set_name ("OptionsLabel");
568 _playback_slider
.set_update_policy (UPDATE_DISCONTINUOUS
);
569 HBox
* h
= manage (new HBox
);
571 h
->pack_start (*l
, false, false);
572 h
->pack_start (_playback_slider
, true, true);
574 _box
->pack_start (*h
, false, false);
576 _capture_adjustment
.set_value (_rc_config
->get_audio_capture_buffer_seconds());
578 l
= manage (new Label (_("Recording (seconds of buffering):")));
579 l
->set_name ("OptionsLabel");
581 _capture_slider
.set_update_policy (UPDATE_DISCONTINUOUS
);
582 h
= manage (new HBox
);
584 h
->pack_start (*l
, false, false);
585 h
->pack_start (_capture_slider
, true, true);
587 _box
->pack_start (*h
, false, false);
589 _capture_adjustment
.signal_value_changed().connect (sigc::mem_fun (*this, &BufferingOptions::capture_changed
));
590 _playback_adjustment
.signal_value_changed().connect (sigc::mem_fun (*this, &BufferingOptions::playback_changed
));
593 void parameter_changed (string
const & p
)
595 if (p
== "playback-buffer-seconds") {
596 _playback_adjustment
.set_value (_rc_config
->get_audio_playback_buffer_seconds());
597 } else if (p
== "capture-buffer-seconds") {
598 _capture_adjustment
.set_value (_rc_config
->get_audio_capture_buffer_seconds());
602 void set_state_from_config ()
604 parameter_changed ("playback-buffer-seconds");
605 parameter_changed ("capture-buffer-seconds");
610 void playback_changed ()
612 _rc_config
->set_audio_playback_buffer_seconds ((long) _playback_adjustment
.get_value());
615 void capture_changed ()
617 _rc_config
->set_audio_capture_buffer_seconds ((long) _capture_adjustment
.get_value());
620 RCConfiguration
* _rc_config
;
621 Adjustment _playback_adjustment
;
622 Adjustment _capture_adjustment
;
623 HScale _playback_slider
;
624 HScale _capture_slider
;
627 class ControlSurfacesOptions
: public OptionEditorBox
630 ControlSurfacesOptions (ArdourDialog
& parent
)
633 _store
= ListStore::create (_model
);
634 _view
.set_model (_store
);
635 _view
.append_column (_("Name"), _model
.name
);
636 _view
.get_column(0)->set_resizable (true);
637 _view
.get_column(0)->set_expand (true);
638 _view
.append_column_editable (_("Enabled"), _model
.enabled
);
639 _view
.append_column_editable (_("Feedback"), _model
.feedback
);
641 _box
->pack_start (_view
, false, false);
643 Label
* label
= manage (new Label
);
644 label
->set_markup (string_compose (X_("<i>%1</i>"), _("Double-click on a name to edit settings for an enabled protocol")));
646 _box
->pack_start (*label
, false, false);
649 _store
->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::model_changed
));
650 _view
.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_clicked
));
653 void parameter_changed (std::string
const &)
658 void set_state_from_config ()
662 ControlProtocolManager
& m
= ControlProtocolManager::instance ();
663 for (list
<ControlProtocolInfo
*>::iterator i
= m
.control_protocol_info
.begin(); i
!= m
.control_protocol_info
.end(); ++i
) {
665 if (!(*i
)->mandatory
) {
666 TreeModel::Row r
= *_store
->append ();
667 r
[_model
.name
] = (*i
)->name
;
668 r
[_model
.enabled
] = ((*i
)->protocol
|| (*i
)->requested
);
669 r
[_model
.feedback
] = ((*i
)->protocol
&& (*i
)->protocol
->get_feedback ());
670 r
[_model
.protocol_info
] = *i
;
677 void model_changed (TreeModel::Path
const &, TreeModel::iterator
const & i
)
679 TreeModel::Row r
= *i
;
681 ControlProtocolInfo
* cpi
= r
[_model
.protocol_info
];
686 bool const was_enabled
= (cpi
->protocol
!= 0);
687 bool const is_enabled
= r
[_model
.enabled
];
689 if (was_enabled
!= is_enabled
) {
691 ControlProtocolManager::instance().instantiate (*cpi
);
693 ControlProtocolManager::instance().teardown (*cpi
);
697 bool const was_feedback
= (cpi
->protocol
&& cpi
->protocol
->get_feedback ());
698 bool const is_feedback
= r
[_model
.feedback
];
700 if (was_feedback
!= is_feedback
&& cpi
->protocol
) {
701 cpi
->protocol
->set_feedback (is_feedback
);
705 void edit_clicked (GdkEventButton
* ev
)
707 if (ev
->type
!= GDK_2BUTTON_PRESS
) {
712 ControlProtocolInfo
* cpi
;
715 row
= *(_view
.get_selection()->get_selected());
717 Window
* win
= row
[_model
.editor
];
718 if (win
&& !win
->is_visible()) {
721 cpi
= row
[_model
.protocol_info
];
723 if (cpi
&& cpi
->protocol
&& cpi
->protocol
->has_editor ()) {
724 Box
* box
= (Box
*) cpi
->protocol
->get_gui ();
726 string title
= row
[_model
.name
];
727 ArdourDialog
* win
= new ArdourDialog (_parent
, title
);
728 win
->get_vbox()->pack_start (*box
, false, false);
731 row
[_model
.editor
] = win
;
737 class ControlSurfacesModelColumns
: public TreeModelColumnRecord
741 ControlSurfacesModelColumns ()
750 TreeModelColumn
<string
> name
;
751 TreeModelColumn
<bool> enabled
;
752 TreeModelColumn
<bool> feedback
;
753 TreeModelColumn
<ControlProtocolInfo
*> protocol_info
;
754 TreeModelColumn
<Gtk::Window
*> editor
;
757 Glib::RefPtr
<ListStore
> _store
;
758 ControlSurfacesModelColumns _model
;
760 Gtk::Window
& _parent
;
764 RCOptionEditor::RCOptionEditor ()
765 : OptionEditor (Config
, string_compose (_("%1 Preferences"), PROGRAM_NAME
))
766 , _rc_config (Config
)
770 uint32_t hwcpus
= hardware_concurrency ();
773 add_option (_("Misc"), new OptionEditorHeading (_("DSP CPU Utilization")));
775 ComboOption
<int32_t>* procs
= new ComboOption
<int32_t> (
777 _("Signal processing uses"),
778 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_processor_usage
),
779 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_processor_usage
)
782 procs
->add (-1, _("all but one processor"));
783 procs
->add (0, _("all available processors"));
785 for (uint32_t i
= 1; i
<= hwcpus
; ++i
) {
786 procs
->add (i
, string_compose (_("%1 processors"), i
));
789 add_option (_("Misc"), procs
);
792 add_option (_("Misc"), new OptionEditorHeading (_("Metering")));
794 ComboOption
<float>* mht
= new ComboOption
<float> (
796 _("Meter hold time"),
797 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_meter_hold
),
798 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_meter_hold
)
801 mht
->add (MeterHoldOff
, _("off"));
802 mht
->add (MeterHoldShort
, _("short"));
803 mht
->add (MeterHoldMedium
, _("medium"));
804 mht
->add (MeterHoldLong
, _("long"));
806 add_option (_("Misc"), mht
);
808 ComboOption
<float>* mfo
= new ComboOption
<float> (
811 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_meter_falloff
),
812 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_meter_falloff
)
815 mfo
->add (METER_FALLOFF_OFF
, _("off"));
816 mfo
->add (METER_FALLOFF_SLOWEST
, _("slowest"));
817 mfo
->add (METER_FALLOFF_SLOW
, _("slow"));
818 mfo
->add (METER_FALLOFF_MEDIUM
, _("medium"));
819 mfo
->add (METER_FALLOFF_FAST
, _("fast"));
820 mfo
->add (METER_FALLOFF_FASTER
, _("faster"));
821 mfo
->add (METER_FALLOFF_FASTEST
, _("fastest"));
823 add_option (_("Misc"), mfo
);
825 add_option (_("Misc"), new OptionEditorHeading (_("Undo")));
827 add_option (_("Misc"), new UndoOptions (_rc_config
));
829 add_option (_("Misc"), new OptionEditorHeading (_("Misc")));
832 /* font scaling does nothing with GDK/Quartz */
833 add_option (_("Misc"), new FontScalingOptions (_rc_config
));
836 add_option (_("Misc"),
838 "verify-remove-last-capture",
839 _("Verify removal of last capture"),
840 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_verify_remove_last_capture
),
841 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_verify_remove_last_capture
)
844 add_option (_("Misc"),
846 "periodic-safety-backups",
847 _("Make periodic backups of the session file"),
848 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_periodic_safety_backups
),
849 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_periodic_safety_backups
)
852 add_option (_("Misc"),
854 "sync-all-route-ordering",
855 _("Syncronise editor and mixer track order"),
856 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_sync_all_route_ordering
),
857 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_sync_all_route_ordering
)
860 add_option (_("Misc"),
862 "only-copy-imported-files",
863 _("Always copy imported files"),
864 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_only_copy_imported_files
),
865 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_only_copy_imported_files
)
868 add_option (_("Misc"),
871 _("Use narrow mixer strips"),
872 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_default_narrow_ms
),
873 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_default_narrow_ms
)
876 add_option (_("Misc"),
879 _("Name new markers"),
880 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_name_new_markers
),
881 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_name_new_markers
)
884 add_option (_("Misc"), new OptionEditorHeading (_("Click")));
886 add_option (_("Misc"), new ClickOptions (_rc_config
, this));
890 add_option (_("Transport"),
892 "latched-record-enable",
893 _("Keep record-enable engaged on stop"),
894 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_latched_record_enable
),
895 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_latched_record_enable
)
898 add_option (_("Transport"),
900 "stop-recording-on-xrun",
901 _("Stop recording when an xrun occurs"),
902 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_stop_recording_on_xrun
),
903 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_stop_recording_on_xrun
)
906 add_option (_("Transport"),
908 "create-xrun-marker",
909 _("Create markers where xruns occur"),
910 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_create_xrun_marker
),
911 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_create_xrun_marker
)
914 add_option (_("Transport"),
916 "stop-at-session-end",
917 _("Stop at the end of the session"),
918 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_stop_at_session_end
),
919 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_stop_at_session_end
)
922 add_option (_("Transport"),
925 _("Do seamless looping (not possible when slaved to MTC, JACK etc)"),
926 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_seamless_loop
),
927 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_seamless_loop
)
930 add_option (_("Transport"),
932 "primary-clock-delta-edit-cursor",
933 _("Primary clock delta to edit cursor"),
934 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_primary_clock_delta_edit_cursor
),
935 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_primary_clock_delta_edit_cursor
)
938 add_option (_("Transport"),
940 "secondary-clock-delta-edit-cursor",
941 _("Secondary clock delta to edit cursor"),
942 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_secondary_clock_delta_edit_cursor
),
943 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_secondary_clock_delta_edit_cursor
)
946 add_option (_("Transport"),
948 "disable-disarm-during-roll",
949 _("Disable per-track record disarm while rolling"),
950 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_disable_disarm_during_roll
),
951 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_disable_disarm_during_roll
)
954 add_option (_("Transport"),
957 _("12dB gain reduction during fast-forward and fast-rewind"),
958 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_quieten_at_speed
),
959 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_quieten_at_speed
)
964 add_option (_("Editor"),
966 "link-region-and-track-selection",
967 _("Link selection of regions and tracks"),
968 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_link_region_and_track_selection
),
969 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_link_region_and_track_selection
)
972 add_option (_("Editor"),
974 "automation-follows-regions",
975 _("Move relevant automation when audio regions are moved"),
976 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_automation_follows_regions
),
977 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_automation_follows_regions
)
980 add_option (_("Editor"),
983 _("Show meters on tracks in the editor"),
984 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_track_meters
),
985 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_track_meters
)
988 add_option (_("Editor"),
990 "use-overlap-equivalency",
991 _("Use overlap equivalency for regions"),
992 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_use_overlap_equivalency
),
993 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_use_overlap_equivalency
)
996 add_option (_("Editor"),
998 "rubberbanding-snaps-to-grid",
999 _("Make rubberband selection rectangle snap to the grid"),
1000 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_rubberbanding_snaps_to_grid
),
1001 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_rubberbanding_snaps_to_grid
)
1004 add_option (_("Editor"),
1007 _("Show waveforms in regions"),
1008 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_waveforms
),
1009 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_waveforms
)
1012 ComboOption
<WaveformScale
>* wfs
= new ComboOption
<WaveformScale
> (
1014 _("Waveform scale"),
1015 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_waveform_scale
),
1016 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_waveform_scale
)
1019 wfs
->add (Linear
, _("linear"));
1020 wfs
->add (Logarithmic
, _("logarithmic"));
1022 add_option (_("Editor"), wfs
);
1024 ComboOption
<WaveformShape
>* wfsh
= new ComboOption
<WaveformShape
> (
1026 _("Waveform shape"),
1027 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_waveform_shape
),
1028 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_waveform_shape
)
1031 wfsh
->add (Traditional
, _("traditional"));
1032 wfsh
->add (Rectified
, _("rectified"));
1034 add_option (_("Editor"), wfsh
);
1036 add_option (_("Editor"),
1038 "show-waveforms-while-recording",
1039 _("Show waveforms for audio while it is being recorded"),
1040 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_waveforms_while_recording
),
1041 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_waveforms_while_recording
)
1044 add_option (_("Editor"),
1047 _("Show zoom toolbar"),
1048 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_zoom_tools
),
1049 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_zoom_tools
)
1054 add_option (_("Audio"), new OptionEditorHeading (_("Buffering")));
1056 add_option (_("Audio"), new BufferingOptions (_rc_config
));
1058 add_option (_("Audio"), new OptionEditorHeading (_("Monitoring")));
1060 add_option (_("Audio"),
1063 _("Use a monitor bus (allows AFL/PFL and more control)"),
1064 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_use_monitor_bus
),
1065 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_use_monitor_bus
)
1068 ComboOption
<MonitorModel
>* mm
= new ComboOption
<MonitorModel
> (
1070 _("Record monitoring handled by"),
1071 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_monitoring_model
),
1072 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_monitoring_model
)
1076 /* no JACK monitoring on CoreAudio */
1077 if (AudioEngine::instance()->can_request_hardware_monitoring()) {
1078 mm
->add (HardwareMonitoring
, _("JACK"));
1081 mm
->add (SoftwareMonitoring
, _("ardour"));
1082 mm
->add (ExternalMonitoring
, _("audio hardware"));
1084 add_option (_("Audio"), mm
);
1086 add_option (_("Audio"),
1088 "tape-machine-mode",
1089 _("Tape machine mode"),
1090 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_tape_machine_mode
),
1091 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_tape_machine_mode
)
1094 add_option (_("Audio"), new OptionEditorHeading (_("Connection of tracks and busses")));
1096 add_option (_("Audio"),
1098 "auto-connect-standard-busses",
1099 _("Auto-connect master/monitor busses"),
1100 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_auto_connect_standard_busses
),
1101 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_auto_connect_standard_busses
)
1104 ComboOption
<AutoConnectOption
>* iac
= new ComboOption
<AutoConnectOption
> (
1105 "input-auto-connect",
1106 _("Connect track inputs"),
1107 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_input_auto_connect
),
1108 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_input_auto_connect
)
1111 iac
->add (AutoConnectPhysical
, _("automatically to physical inputs"));
1112 iac
->add (ManualConnect
, _("manually"));
1114 add_option (_("Audio"), iac
);
1116 ComboOption
<AutoConnectOption
>* oac
= new ComboOption
<AutoConnectOption
> (
1117 "output-auto-connect",
1118 _("Connect track and bus outputs"),
1119 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_output_auto_connect
),
1120 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_output_auto_connect
)
1123 oac
->add (AutoConnectPhysical
, _("automatically to physical outputs"));
1124 oac
->add (AutoConnectMaster
, _("automatically to master bus"));
1125 oac
->add (ManualConnect
, _("manually"));
1127 add_option (_("Audio"), oac
);
1129 add_option (_("Audio"), new OptionEditorHeading (_("Denormals")));
1131 add_option (_("Audio"),
1133 "denormal-protection",
1134 _("Use DC bias to protect against denormals"),
1135 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_denormal_protection
),
1136 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_denormal_protection
)
1139 ComboOption
<DenormalModel
>* dm
= new ComboOption
<DenormalModel
> (
1141 _("Processor handling"),
1142 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_denormal_model
),
1143 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_denormal_model
)
1146 dm
->add (DenormalNone
, _("no processor handling"));
1150 if (fpu
.has_flush_to_zero()) {
1151 dm
->add (DenormalFTZ
, _("use FlushToZero"));
1154 if (fpu
.has_denormals_are_zero()) {
1155 dm
->add (DenormalDAZ
, _("use DenormalsAreZero"));
1158 if (fpu
.has_flush_to_zero() && fpu
.has_denormals_are_zero()) {
1159 dm
->add (DenormalFTZDAZ
, _("use FlushToZero and DenormalsAreZerO"));
1162 add_option (_("Audio"), dm
);
1164 add_option (_("Audio"), new OptionEditorHeading (_("Plugins")));
1166 add_option (_("Audio"),
1168 "plugins-stop-with-transport",
1169 _("Stop plugins when the transport is stopped"),
1170 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_plugins_stop_with_transport
),
1171 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_plugins_stop_with_transport
)
1174 add_option (_("Audio"),
1176 "do-not-record-plugins",
1177 _("Disable plugins during recording"),
1178 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_do_not_record_plugins
),
1179 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_do_not_record_plugins
)
1182 add_option (_("Audio"),
1184 "new-plugins-active",
1185 _("Make new plugins active"),
1186 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_new_plugins_active
),
1187 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_new_plugins_active
)
1190 add_option (_("Audio"),
1192 "auto-analyse-audio",
1193 _("Enable automatic analysis of audio"),
1194 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_auto_analyse_audio
),
1195 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_auto_analyse_audio
)
1198 add_option (_("Audio"),
1200 "replicate-missing-region-channels",
1201 _("Replicate missing region channels"),
1202 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_replicate_missing_region_channels
),
1203 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_replicate_missing_region_channels
)
1208 add_option (_("Solo / mute"),
1211 _("Solo mute cut (dB)"),
1212 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_solo_mute_gain
),
1213 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_solo_mute_gain
)
1216 _solo_control_is_listen_control
= new BoolOption (
1217 "solo-control-is-listen-control",
1218 _("Solo controls are Listen controls"),
1219 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_solo_control_is_listen_control
),
1220 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_solo_control_is_listen_control
)
1223 add_option (_("Solo / mute"), _solo_control_is_listen_control
);
1225 _listen_position
= new ComboOption
<ListenPosition
> (
1227 _("Listen Position"),
1228 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_listen_position
),
1229 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_listen_position
)
1232 _listen_position
->add (AfterFaderListen
, _("after-fader listen"));
1233 _listen_position
->add (PreFaderListen
, _("pre-fader listen"));
1235 add_option (_("Solo / mute"), _listen_position
);
1237 parameter_changed ("use-monitor-bus");
1239 add_option (_("Solo / mute"),
1242 _("Exclusive solo"),
1243 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_exclusive_solo
),
1244 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_exclusive_solo
)
1247 add_option (_("Solo / mute"),
1250 _("Show solo muting"),
1251 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_show_solo_mutes
),
1252 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_show_solo_mutes
)
1255 add_option (_("Solo / mute"),
1257 "solo-mute-override",
1258 _("Soloing overrides muting"),
1259 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_solo_mute_override
),
1260 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_solo_mute_override
)
1263 add_option (_("Solo / mute"), new OptionEditorHeading (_("Default track / bus muting options")));
1265 add_option (_("Solo / mute"),
1267 "mute-affects-pre-fader",
1268 _("Mute affects pre-fader sends"),
1269 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_pre_fader
),
1270 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_pre_fader
)
1273 add_option (_("Solo / mute"),
1275 "mute-affects-post-fader",
1276 _("Mute affects post-fader sends"),
1277 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_post_fader
),
1278 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_post_fader
)
1281 add_option (_("Solo / mute"),
1283 "mute-affects-control-outs",
1284 _("Mute affects control outputs"),
1285 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_control_outs
),
1286 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_control_outs
)
1289 add_option (_("Solo / mute"),
1291 "mute-affects-main-outs",
1292 _("Mute affects main outputs"),
1293 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mute_affects_main_outs
),
1294 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mute_affects_main_outs
)
1297 add_option (_("MIDI control"),
1300 _("Send MIDI Clock"),
1301 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_send_midi_clock
),
1302 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_send_midi_clock
)
1305 add_option (_("MIDI control"),
1308 _("Send MIDI Time Code"),
1309 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_send_mtc
),
1310 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_send_mtc
)
1313 add_option (_("MIDI control"),
1314 new SpinOption
<int> (
1315 "mtc-qf-speed-tolerance",
1316 _("Percentage either side of normal transport speed to transmit MTC"),
1317 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mtc_qf_speed_tolerance
),
1318 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mtc_qf_speed_tolerance
),
1322 add_option (_("MIDI control"),
1325 _("Obey MIDI Machine Control commands"),
1326 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mmc_control
),
1327 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mmc_control
)
1330 add_option (_("MIDI control"),
1333 _("Send MIDI Machine Control commands"),
1334 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_send_mmc
),
1335 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_send_mmc
)
1338 add_option (_("MIDI control"),
1341 _("Send MIDI control feedback"),
1342 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_midi_feedback
),
1343 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_midi_feedback
)
1346 add_option (_("MIDI control"),
1347 new SpinOption
<uint8_t> (
1348 "mmc-receive-device-id",
1349 _("Inbound MMC device ID"),
1350 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mmc_receive_device_id
),
1351 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mmc_receive_device_id
),
1355 add_option (_("MIDI control"),
1356 new SpinOption
<uint8_t> (
1357 "mmc-send-device-id",
1358 _("Outbound MMC device ID"),
1359 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_mmc_send_device_id
),
1360 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_mmc_send_device_id
),
1364 add_option (_("MIDI control"),
1365 new SpinOption
<int32_t> (
1366 "initial-program-change",
1367 _("Initial program change"),
1368 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_initial_program_change
),
1369 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_initial_program_change
),
1373 /* CONTROL SURFACES */
1375 add_option (_("Control surfaces"), new ControlSurfacesOptions (*this));
1377 ComboOption
<RemoteModel
>* rm
= new ComboOption
<RemoteModel
> (
1379 _("Control surface remote ID"),
1380 sigc::mem_fun (*_rc_config
, &RCConfiguration::get_remote_model
),
1381 sigc::mem_fun (*_rc_config
, &RCConfiguration::set_remote_model
)
1384 rm
->add (UserOrdered
, _("assigned by user"));
1385 rm
->add (MixerOrdered
, _("follows order of mixer"));
1386 rm
->add (EditorOrdered
, _("follows order of editor"));
1388 add_option (_("Control surfaces"), rm
);
1392 add_option (_("Keyboard"), new KeyboardOptions
);
1396 RCOptionEditor::parameter_changed (string
const & p
)
1398 OptionEditor::parameter_changed (p
);
1400 if (p
== "use-monitor-bus") {
1401 bool const s
= Config
->get_use_monitor_bus ();
1403 /* we can't use this if we don't have a monitor bus */
1404 Config
->set_solo_control_is_listen_control (false);
1406 _solo_control_is_listen_control
->set_sensitive (s
);
1407 _listen_position
->set_sensitive (s
);