class MidiPortOptions : public OptionEditorMiniPage, public sigc::trackable
{
public:
- MidiPortOptions() {
+ MidiPortOptions() : refill_id (-1) {
setup_midi_port_view (midi_output_view, false);
setup_midi_port_view (midi_input_view, true);
midi_output_view.show ();
midi_input_view.show ();
- table.signal_show().connect (sigc::mem_fun (*this, &MidiPortOptions::on_show));
+ table.signal_map().connect (sigc::mem_fun (*this, &MidiPortOptions::on_map));
+ table.signal_unmap().connect (sigc::mem_fun (*this, &MidiPortOptions::on_unmap));
}
void parameter_changed (string const&) {}
void set_state_from_config() {}
- void on_show () {
+ void on_map () {
+
refill ();
AudioEngine::instance()->PortRegisteredOrUnregistered.connect (connections,
gui_context());
}
+ void on_unmap () {
+ connections.drop_connections ();
+ }
+
void refill () {
if (refill_midi_ports (true, midi_input_view)) {
} else {
output_label.hide ();
}
+
+ refill_id = -1;
}
private:
add (music_data);
add (control_data);
add (selection);
- add (name);
+ add (fullname);
+ add (shortname);
add (filler);
}
Gtk::TreeModelColumn<bool> music_data;
Gtk::TreeModelColumn<bool> control_data;
Gtk::TreeModelColumn<bool> selection;
- Gtk::TreeModelColumn<std::string> name;
+ Gtk::TreeModelColumn<std::string> fullname;
+ Gtk::TreeModelColumn<std::string> shortname;
Gtk::TreeModelColumn<std::string> filler;
};
Gtk::TreeView midi_output_view;
Gtk::Label input_label;
Gtk::Label output_label;
+ int refill_id;
void setup_midi_port_view (Gtk::TreeView&, bool with_selection);
bool refill_midi_ports (bool for_input, Gtk::TreeView&);
TreeViewColumn* col;
Gtk::Label* l;
- pretty_name_column = view.append_column_editable (_("Name (click to edit)"), midi_port_columns.pretty_name) - 1;
+ pretty_name_column = view.append_column_editable (_("Name (click twice to edit)"), midi_port_columns.pretty_name) - 1;
col = manage (new TreeViewColumn ("", midi_port_columns.music_data));
col->set_alignment (ALIGN_CENTER);
toggle_cell->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &MidiPortOptions::midi_selection_column_toggled), &view));
}
- view.get_selection()->set_mode (SELECTION_NONE);
- view.set_tooltip_column (4); /* port "real" name */
+ view.get_selection()->set_mode (SELECTION_SINGLE);
+ view.set_tooltip_column (5); /* port short name */
view.get_column(0)->set_resizable (true);
view.get_column(0)->set_expand (true);
}
PortManager::MidiPortInformation mpi (AudioEngine::instance()->midi_port_information (*s));
- if (mpi.pretty_name.empty()) {
- /* vanished since get_known_midi_ports() */
+ if (!mpi.exists) {
continue;
}
row[midi_port_columns.music_data] = mpi.properties & MidiPortMusic;
row[midi_port_columns.control_data] = mpi.properties & MidiPortControl;
row[midi_port_columns.selection] = mpi.properties & MidiPortSelection;
- row[midi_port_columns.name] = *s;
+ row[midi_port_columns.fullname] = *s;
+ row[midi_port_columns.shortname] = AudioEngine::instance()->short_port_name_from_port_name (*s);
}
view.set_model (model);
/* don't reset model - wait for MidiPortInfoChanged signal */
if (new_value) {
- ARDOUR::AudioEngine::instance()->add_midi_port_flags ((*iter)[midi_port_columns.name], MidiPortMusic);
+ ARDOUR::AudioEngine::instance()->add_midi_port_flags ((*iter)[midi_port_columns.fullname], MidiPortMusic);
} else {
- ARDOUR::AudioEngine::instance()->remove_midi_port_flags ((*iter)[midi_port_columns.name], MidiPortMusic);
+ ARDOUR::AudioEngine::instance()->remove_midi_port_flags ((*iter)[midi_port_columns.fullname], MidiPortMusic);
}
}
/* don't reset model - wait for MidiPortInfoChanged signal */
if (new_value) {
- ARDOUR::AudioEngine::instance()->add_midi_port_flags ((*iter)[midi_port_columns.name], MidiPortControl);
+ ARDOUR::AudioEngine::instance()->add_midi_port_flags ((*iter)[midi_port_columns.fullname], MidiPortControl);
} else {
- ARDOUR::AudioEngine::instance()->remove_midi_port_flags ((*iter)[midi_port_columns.name], MidiPortControl);
+ ARDOUR::AudioEngine::instance()->remove_midi_port_flags ((*iter)[midi_port_columns.fullname], MidiPortControl);
}
}
/* don't reset model - wait for MidiSelectionPortsChanged signal */
if (new_value) {
- ARDOUR::AudioEngine::instance()->add_midi_port_flags ((*iter)[midi_port_columns.name], MidiPortSelection);
+ ARDOUR::AudioEngine::instance()->add_midi_port_flags ((*iter)[midi_port_columns.fullname], MidiPortSelection);
} else {
- ARDOUR::AudioEngine::instance()->remove_midi_port_flags ((*iter)[midi_port_columns.name], MidiPortSelection);
+ ARDOUR::AudioEngine::instance()->remove_midi_port_flags ((*iter)[midi_port_columns.fullname], MidiPortSelection);
}
}
return;
}
- AudioEngine::instance()->set_midi_port_pretty_name ((*iter)[midi_port_columns.name], new_text);
+ AudioEngine::instance()->set_port_pretty_name ((*iter)[midi_port_columns.fullname], new_text);
}
/*============*/
add_option (_("Editor"), fadeshape);
ComboOption<RegionEquivalence> *eqv = new ComboOption<RegionEquivalence> (
- "region-equivalence",
+ "region-equivalency",
_("Regions in active edit groups are edited together"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_region_equivalence),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_region_equivalence)
eqv->add (Overlap, _("whenever they overlap in time"));
eqv->add (Enclosed, _("if either encloses the other"));
eqv->add (Exact, _("only if they have identical length, position and origin"));
+ eqv->add (LayerTime, _("only if they have identical length, position and layer"));
add_option (_("Editor"), eqv);
lm->add (Manual, _("manual layering"));
add_option (_("Editor"), lm);
+ add_option (_("Editor"), new OptionEditorHeading (_("Split/Separate")));
+
+ ComboOption<RangeSelectionAfterSplit> *rras = new ComboOption<RangeSelectionAfterSplit> (
+ "range-selection-after-separate",
+ _("After a Separate operation, in Range mode"),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::get_range_selection_after_split),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::set_range_selection_after_split));
+
+ rras->add(ClearSel, _("Clear the Range Selection"));
+ rras->add(PreserveSel, _("Preserve the Range Selection"));
+ rras->add(ForceSel, _("Force-Select the regions under the range. (this might cause a tool change)"));
+ add_option (_("Editor"), rras);
+
ComboOption<RegionSelectionAfterSplit> *rsas = new ComboOption<RegionSelectionAfterSplit> (
"region-selection-after-split",
- _("After splitting selected regions, select"),
+ _("After a Split operation, in Object mode"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_region_selection_after_split),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_region_selection_after_split));
// TODO: decide which of these modes are really useful
- rsas->add(None, _("no regions"));
- // rsas->add(NewlyCreatedLeft, _("newly-created regions before the split"));
- // rsas->add(NewlyCreatedRight, _("newly-created regions after the split"));
- rsas->add(NewlyCreatedBoth, _("newly-created regions"));
+ rsas->add(None, _("Clear the Selected Regions"));
+ rsas->add(NewlyCreatedLeft, _("Select only the newly-created regions BEFORE the split point"));
+ rsas->add(NewlyCreatedRight, _("Select only the newly-created regions AFTER the split point"));
+ rsas->add(NewlyCreatedBoth, _("Select the newly-created regions"));
// rsas->add(Existing, _("unmodified regions in the existing selection"));
// rsas->add(ExistingNewlyCreatedLeft, _("existing selection and newly-created regions before the split"));
// rsas->add(ExistingNewlyCreatedRight, _("existing selection and newly-created regions after the split"));
- rsas->add(ExistingNewlyCreatedBoth, _("existing selection and newly-created regions"));
+ rsas->add(ExistingNewlyCreatedBoth, _("Preserve the existing selection, AND select all newly-created regions"));
add_option (_("Editor"), rsas);
add_option (_("Signal Flow"), new OptionEditorHeading (_("Track and Bus Connections")));
- add_option (_("Signal Flow"),
- new BoolOption (
+ bo = new BoolOption (
"auto-connect-standard-busses",
- _("Auto-connect master/monitor busses"),
+ _("Auto-connect main output (master or monitor) bus to physical ports"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_auto_connect_standard_busses),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_auto_connect_standard_busses)
- ));
+ );
+ add_option (_("Signal Flow"), bo);
+ Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
+ _("<b>When enabled</b> the main output bus is auto-connected to the first N physical ports. "
+ "If the session has a monitor-section, the monitor-bus output is conneced the the hardware playback ports, "
+ "otherwise the master-bus output is directly used for playback."));
ComboOption<AutoConnectOption>* iac = new ComboOption<AutoConnectOption> (
"input-auto-connect",
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_sound_midi_notes)
));
- ComboOption<std::string>* audition_synth = new ComboOption<std::string> (
- "midi-audition-synth-uri",
- _("MIDI Audition Synth (LV2)"),
- sigc::mem_fun (*_rc_config, &RCConfiguration::get_midi_audition_synth_uri),
- sigc::mem_fun (*_rc_config, &RCConfiguration::set_midi_audition_synth_uri)
- );
-
- audition_synth->add(X_(""), _("None"));
- PluginInfoList all_plugs;
- PluginManager& manager (PluginManager::instance());
-#ifdef LV2_SUPPORT
- all_plugs.insert (all_plugs.end(), manager.lv2_plugin_info().begin(), manager.lv2_plugin_info().end());
-
- for (PluginInfoList::const_iterator i = all_plugs.begin(); i != all_plugs.end(); ++i) {
- if (manager.get_status (*i) == PluginManager::Hidden) continue;
- if (!(*i)->is_instrument()) continue;
- if ((*i)->type != ARDOUR::LV2) continue;
- if ((*i)->name.length() > 46) {
- audition_synth->add((*i)->unique_id, (*i)->name.substr (0, 44) + "...");
- } else {
- audition_synth->add((*i)->unique_id, (*i)->name);
- }
- }
-#endif
-
- add_option (_("MIDI"), audition_synth);
-
/* Click */
add_option (_("Metronome"), new OptionEditorHeading (_("Metronome")));
add_option (_("Sync/LTC"), _ltc_volume_slider);
-
add_option (_("Sync/MIDI"), new OptionEditorHeading (_("MIDI Beat Clock (Mclk) Generator")));
add_option (_("Sync/MIDI"),
//trigger some parameter-changed messages which affect widget-visibility or -sensitivity
parameter_changed ("send-ltc");
parameter_changed ("sync-source");
- parameter_changed ("use-monitor-bus");
parameter_changed ("open-gui-after-adding-plugin");
XMLNode* node = ARDOUR_UI::instance()->preferences_settings();
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);
+ Config->set_solo_control_is_listen_control (false); // XXX
}
_solo_control_is_listen_control->set_sensitive (s);
_listen_position->set_sensitive (s);