HIG-ify engine dialogue and add midi driver option. Fixes #3349.
git-svn-id: svn://localhost/ardour2/branches/3.0@7479 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -126,8 +126,8 @@ EngineControl::EngineControl ()
|
||||
driver_changed ();
|
||||
|
||||
strings.clear ();
|
||||
strings.push_back (_("Playback/Recording on 1 Device"));
|
||||
strings.push_back (_("Playback/Recording on 2 Devices"));
|
||||
strings.push_back (_("Playback/recording on 1 device"));
|
||||
strings.push_back (_("Playback/recording on 2 devices"));
|
||||
strings.push_back (_("Playback only"));
|
||||
strings.push_back (_("Recording only"));
|
||||
set_popdown_strings (audio_mode_combo, strings);
|
||||
@@ -136,38 +136,50 @@ EngineControl::EngineControl ()
|
||||
audio_mode_combo.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::audio_mode_changed));
|
||||
audio_mode_changed ();
|
||||
|
||||
strings.clear ();
|
||||
strings.push_back (_("None"));
|
||||
strings.push_back (_("seq"));
|
||||
strings.push_back (_("raw"));
|
||||
set_popdown_strings (midi_driver_combo, strings);
|
||||
midi_driver_combo.set_active_text (strings.front ());
|
||||
|
||||
row = 0;
|
||||
|
||||
label = manage (new Label (_("Driver")));
|
||||
label = manage (new Label (_("Driver:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
basic_packer.attach (driver_combo, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
row++;
|
||||
|
||||
label = manage (new Label (_("Interface")));
|
||||
label = manage (new Label (_("Interface:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
basic_packer.attach (interface_combo, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
row++;
|
||||
|
||||
label = manage (new Label (_("Sample Rate")));
|
||||
label = manage (new Label (_("Sample rate:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
basic_packer.attach (sample_rate_combo, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
row++;
|
||||
|
||||
label = manage (new Label (_("Buffer size")));
|
||||
label = manage (new Label (_("Buffer size:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
basic_packer.attach (period_size_combo, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
row++;
|
||||
|
||||
#ifndef __APPLE__
|
||||
label = manage (new Label (_("Number of buffers")));
|
||||
label = manage (new Label (_("Number of buffers:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
basic_packer.attach (periods_spinner, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
periods_spinner.set_value (2);
|
||||
row++;
|
||||
#endif
|
||||
|
||||
label = manage (new Label (_("Approximate latency")));
|
||||
label->set_alignment (0.0, 0.5);
|
||||
label = manage (new Label (_("Approximate latency:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
basic_packer.attach (latency_label, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
row++;
|
||||
@@ -180,7 +192,8 @@ EngineControl::EngineControl ()
|
||||
/* no audio mode with CoreAudio, its duplex or nuthin' */
|
||||
|
||||
#ifndef __APPLE__
|
||||
label = manage (new Label (_("Audio Mode")));
|
||||
label = manage (new Label (_("Audio mode:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
basic_packer.attach (audio_mode_combo, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
row++;
|
||||
@@ -266,15 +279,21 @@ EngineControl::EngineControl ()
|
||||
++row;
|
||||
|
||||
#endif /* PROVIDE_TOO_MANY_OPTIONS */
|
||||
label = manage (new Label (_("Number of ports")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
label = manage (new Label (_("Number of ports:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
options_packer.attach (ports_spinner, 1, 2, row, row + 1, FILL|EXPAND, AttachOptions(0));
|
||||
options_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
++row;
|
||||
|
||||
label = manage (new Label (_("MIDI driver:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
options_packer.attach (midi_driver_combo, 1, 2, row, row + 1, FILL|EXPAND, AttachOptions(0));
|
||||
options_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
++row;
|
||||
|
||||
#ifndef __APPLE__
|
||||
label = manage (new Label (_("Dither")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
label = manage (new Label (_("Dither:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
options_packer.attach (dither_mode_combo, 1, 2, row, row + 1, FILL|EXPAND, AttachOptions(0));
|
||||
options_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
|
||||
++row;
|
||||
@@ -304,36 +323,42 @@ EngineControl::EngineControl ()
|
||||
row = 0;
|
||||
|
||||
#ifndef __APPLE__
|
||||
label = manage (new Label (_("Input device")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
label = manage (new Label (_("Input device:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
device_packer.attach (input_device_combo, 1, 2, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
++row;
|
||||
label = manage (new Label (_("Output device")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
label = manage (new Label (_("Output device:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
device_packer.attach (output_device_combo, 1, 2, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
++row;
|
||||
#endif
|
||||
label = manage (new Label (_("Input channels")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
label = manage (new Label (_("Input channels:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
device_packer.attach (input_channels, 1, 2, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
++row;
|
||||
label = manage (new Label (_("Output channels")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
label = manage (new Label (_("Output channels:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
device_packer.attach (output_channels, 1, 2, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
++row;
|
||||
label = manage (new Label (_("Hardware input latency (samples)")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
label = manage (new Label (_("Hardware input latency:")));
|
||||
label->set_alignment (0, 0.5);
|
||||
device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
device_packer.attach (input_latency, 1, 2, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
label = manage (new Label (_("samples")));
|
||||
label->set_alignment (0, 0.5);
|
||||
device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
++row;
|
||||
label = manage (new Label (_("Hardware output latency (samples)")));
|
||||
label = manage (new Label (_("Hardware output latency:")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
device_packer.attach (output_latency, 1, 2, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
label = manage (new Label (_("samples")));
|
||||
label->set_alignment (0, 0.5);
|
||||
device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||
++row;
|
||||
|
||||
basic_hbox.pack_start (basic_packer, false, false);
|
||||
@@ -532,6 +557,14 @@ EngineControl::build_command_line (vector<string>& cmd)
|
||||
cmd.push_back ("-s");
|
||||
}
|
||||
|
||||
str = midi_driver_combo.get_active_text ();
|
||||
|
||||
if (str == _("seq")) {
|
||||
cmd.push_back ("-X seq");
|
||||
} else if (str == _("raw")) {
|
||||
cmd.push_back ("-X raw");
|
||||
}
|
||||
|
||||
} else if (using_coreaudio) {
|
||||
|
||||
#ifdef __APPLE__
|
||||
@@ -896,6 +929,7 @@ EngineControl::redisplay_latency ()
|
||||
snprintf (buf, sizeof(buf), "%.1fmsec", (periods * period_size) / (rate/1000.0));
|
||||
|
||||
latency_label.set_text (buf);
|
||||
latency_label.set_alignment (0, 0.5);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -66,6 +66,7 @@ class EngineControl : public Gtk::VBox {
|
||||
Gtk::ComboBoxText audio_mode_combo;
|
||||
Gtk::ComboBoxText input_device_combo;
|
||||
Gtk::ComboBoxText output_device_combo;
|
||||
Gtk::ComboBoxText midi_driver_combo;
|
||||
|
||||
Gtk::Table basic_packer;
|
||||
Gtk::Table options_packer;
|
||||
|
||||
@@ -229,7 +229,7 @@ ArdourStartup::setup_audio_page ()
|
||||
|
||||
audio_page_index = append_page (*engine_dialog);
|
||||
set_page_type (*engine_dialog, ASSISTANT_PAGE_CONTENT);
|
||||
set_page_title (*engine_dialog, _("Audio Setup"));
|
||||
set_page_title (*engine_dialog, _("Audio / MIDI Setup"));
|
||||
|
||||
/* the default parameters should work, so the page is potentially complete */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user