summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-07-23 23:29:19 +0000
committerCarl Hetherington <carl@carlh.net>2010-07-23 23:29:19 +0000
commit6a61c1d3ff9e137c3e91ab5b475e43695adcae20 (patch)
treeb33c1811f8ca730691e60570bf9b9900571b48d0 /gtk2_ardour
parentb122b341927b507afca6c12ec82a034610bd44bb (diff)
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
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/engine_dialog.cc84
-rw-r--r--gtk2_ardour/engine_dialog.h1
-rw-r--r--gtk2_ardour/startup.cc2
3 files changed, 61 insertions, 26 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index bfb2796529..a5f5921ce2 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -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
diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h
index c806e088cc..0638da358e 100644
--- a/gtk2_ardour/engine_dialog.h
+++ b/gtk2_ardour/engine_dialog.h
@@ -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;
diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc
index 9789d6d0f7..e7d0db005e 100644
--- a/gtk2_ardour/startup.cc
+++ b/gtk2_ardour/startup.cc
@@ -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 */