X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Frc_option_editor.cc;h=722612d21c9ffaec7d3c6d863c384c0640119aa3;hb=b502bbc61895d61c39bf240b47e8a3664be2c541;hp=1cb29e5be208ddd17f5515c4c799663dc9f5112b;hpb=b85b4d9e54caef0585d308ef3bffee21d0e5ae56;p=ardour.git diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 1cb29e5be2..722612d21c 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -260,7 +260,10 @@ public: _delete_button_adjustment (3, 1, 12), _delete_button_spin (_delete_button_adjustment), _edit_button_adjustment (3, 1, 5), - _edit_button_spin (_edit_button_adjustment) + _edit_button_spin (_edit_button_adjustment), + _insert_note_button_adjustment (3, 1, 5), + _insert_note_button_spin (_insert_note_button_adjustment) + { /* internationalize and prepare for use with combos */ @@ -327,6 +330,35 @@ public: _delete_button_adjustment.set_value (Keyboard::delete_button()); _delete_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::delete_button_changed)); + + set_popdown_strings (_insert_note_modifier_combo, dumb); + _insert_note_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_modifier_chosen)); + + for (int x = 0; modifiers[x].name; ++x) { + if (modifiers[x].modifier == Keyboard::insert_note_modifier ()) { + _insert_note_modifier_combo.set_active_text (_(modifiers[x].name)); + break; + } + } + + l = manage (new Label (_("Insert note using:"))); + l->set_name ("OptionsLabel"); + l->set_alignment (0, 0.5); + + t->attach (*l, 0, 1, 2, 3, FILL | EXPAND, FILL); + t->attach (_insert_note_modifier_combo, 1, 2, 2, 3, FILL | EXPAND, FILL); + + l = manage (new Label (_("+ button"))); + l->set_name ("OptionsLabel"); + + t->attach (*l, 3, 4, 2, 3, FILL | EXPAND, FILL); + t->attach (_insert_note_button_spin, 4, 5, 2, 3, FILL | EXPAND, FILL); + + _insert_note_button_spin.set_name ("OptionsEntry"); + _insert_note_button_adjustment.set_value (Keyboard::insert_note_button()); + _insert_note_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_button_changed)); + + set_popdown_strings (_snap_modifier_combo, dumb); _snap_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen)); @@ -341,8 +373,8 @@ public: l->set_name ("OptionsLabel"); l->set_alignment (0, 0.5); - t->attach (*l, 0, 1, 2, 3, FILL | EXPAND, FILL); - t->attach (_snap_modifier_combo, 1, 2, 2, 3, FILL | EXPAND, FILL); + t->attach (*l, 0, 1, 3, 4, FILL | EXPAND, FILL); + t->attach (_snap_modifier_combo, 1, 2, 3, 4, FILL | EXPAND, FILL); vector strs; @@ -358,8 +390,8 @@ public: l->set_name ("OptionsLabel"); l->set_alignment (0, 0.5); - t->attach (*l, 0, 1, 3, 4, FILL | EXPAND, FILL); - t->attach (_keyboard_layout_selector, 1, 2, 3, 4, FILL | EXPAND, FILL); + t->attach (*l, 0, 1, 4, 5, FILL | EXPAND, FILL); + t->attach (_keyboard_layout_selector, 1, 2, 4, 5, FILL | EXPAND, FILL); _box->pack_start (*t, false, false); } @@ -415,6 +447,18 @@ private: } } + void insert_note_modifier_chosen () + { + string const txt = _insert_note_modifier_combo.get_active_text(); + + for (int i = 0; modifiers[i].name; ++i) { + if (txt == _(modifiers[i].name)) { + Keyboard::set_insert_note_modifier (modifiers[i].modifier); + break; + } + } + } + void snap_modifier_chosen () { string const txt = _snap_modifier_combo.get_active_text(); @@ -437,14 +481,23 @@ private: Keyboard::set_edit_button (_edit_button_spin.get_value_as_int()); } + void insert_note_button_changed () + { + Keyboard::set_insert_note_button (_insert_note_button_spin.get_value_as_int()); + } + ComboBoxText _keyboard_layout_selector; ComboBoxText _edit_modifier_combo; ComboBoxText _delete_modifier_combo; + ComboBoxText _insert_note_modifier_combo; ComboBoxText _snap_modifier_combo; Adjustment _delete_button_adjustment; SpinButton _delete_button_spin; Adjustment _edit_button_adjustment; SpinButton _edit_button_spin; + Adjustment _insert_note_button_adjustment; + SpinButton _insert_note_button_spin; + }; class FontScalingOptions : public OptionEditorBox @@ -729,8 +782,8 @@ RCOptionEditor::RCOptionEditor () procs->add (-1, _("all but one processor")); procs->add (0, _("all available processors")); - for (uint32_t i = 2; i < hwcpus; ++i) { - procs->add (1, string_compose (_("%1 processors"), i)); + for (uint32_t i = 1; i <= hwcpus; ++i) { + procs->add (i, string_compose (_("%1 processors"), i)); } add_option (_("Misc"), procs); @@ -988,6 +1041,22 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_waveforms_while_recording) )); + add_option (_("Editor"), + new BoolOption ( + "show-zoom-tools", + _("Show zoom toolbar"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_zoom_tools), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_zoom_tools) + )); + + add_option (_("Editor"), + new BoolOption ( + "color-regions-using-track-color", + _("Color regions using their track's color"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_color_regions_using_track_color), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_color_regions_using_track_color) + )); + /* AUDIO */ add_option (_("Audio"), new OptionEditorHeading (_("Buffering"))); @@ -1006,7 +1075,7 @@ RCOptionEditor::RCOptionEditor () ComboOption* mm = new ComboOption ( "monitoring-model", - _("Monitoring handled by"), + _("Record monitoring handled by"), sigc::mem_fun (*_rc_config, &RCConfiguration::get_monitoring_model), sigc::mem_fun (*_rc_config, &RCConfiguration::set_monitoring_model) ); @@ -1021,6 +1090,30 @@ RCOptionEditor::RCOptionEditor () mm->add (ExternalMonitoring, _("audio hardware")); add_option (_("Audio"), mm); + + ComboOption* pp = new ComboOption ( + "pfl-position", + _("PFL signals come from"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_pfl_position), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_pfl_position) + ); + + pp->add (PFLFromBeforeProcessors, _("before pre-fader processors")); + pp->add (PFLFromAfterProcessors, _("pre-fader but after pre-fader processors")); + + add_option (_("Audio"), pp); + + ComboOption* pa = new ComboOption ( + "afl-position", + _("AFL signals come from"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_afl_position), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_afl_position) + ); + + pa->add (AFLFromBeforeProcessors, _("post-fader but before post-fader processors")); + pa->add (AFLFromAfterProcessors, _("after post-fader processors")); + + add_option (_("Audio"), pa); add_option (_("Audio"), new BoolOption ( @@ -1151,26 +1244,29 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_mute_gain), sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_mute_gain) )); - - add_option (_("Solo / mute"), - new BoolOption ( - "solo-control-is-listen-control", - _("Solo controls are Listen controls"), - sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_control_is_listen_control), - sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_control_is_listen_control) - )); - ComboOption* lp = new ComboOption ( + _solo_control_is_listen_control = new BoolOption ( + "solo-control-is-listen-control", + _("Solo controls are Listen controls"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_control_is_listen_control), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_control_is_listen_control) + ); + + add_option (_("Solo / mute"), _solo_control_is_listen_control); + + _listen_position = new ComboOption ( "listen-position", _("Listen Position"), sigc::mem_fun (*_rc_config, &RCConfiguration::get_listen_position), sigc::mem_fun (*_rc_config, &RCConfiguration::set_listen_position) ); - lp->add (AfterFaderListen, _("after-fader listen")); - lp->add (PreFaderListen, _("pre-fader listen")); + _listen_position->add (AfterFaderListen, _("after-fader listen")); + _listen_position->add (PreFaderListen, _("pre-fader listen")); + + add_option (_("Solo / mute"), _listen_position); - add_option (_("Solo / mute"), lp); + parameter_changed ("use-monitor-bus"); add_option (_("Solo / mute"), new BoolOption ( @@ -1246,6 +1342,15 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_mtc) )); + add_option (_("MIDI control"), + new SpinOption ( + "mtc-qf-speed-tolerance", + _("Percentage either side of normal transport speed to transmit MTC"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_mtc_qf_speed_tolerance), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_mtc_qf_speed_tolerance), + 0, 20, 1, 5 + )); + add_option (_("MIDI control"), new BoolOption ( "mmc-control", @@ -1254,7 +1359,6 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_mmc_control) )); - add_option (_("MIDI control"), new BoolOption ( "send-mmc", @@ -1320,4 +1424,18 @@ RCOptionEditor::RCOptionEditor () add_option (_("Keyboard"), new KeyboardOptions); } - +void +RCOptionEditor::parameter_changed (string const & p) +{ + OptionEditor::parameter_changed (p); + + if (p == "use-monitor-bus") { + bool const s = Config->get_use_monitor_bus (); + if (!s) { + /* we can't use this if we don't have a monitor bus */ + Config->set_solo_control_is_listen_control (false); + } + _solo_control_is_listen_control->set_sensitive (s); + _listen_position->set_sensitive (s); + } +}