summaryrefslogtreecommitdiff
path: root/gtk2_ardour/engine_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-07-26 01:54:51 +0000
committerCarl Hetherington <carl@carlh.net>2010-07-26 01:54:51 +0000
commitecb52013324b1e20736280e06da3600cd6dc5a0f (patch)
tree3e9884c3ce010d25ab9b282e68d1c2d1ae954a31 /gtk2_ardour/engine_dialog.cc
parent0fb9c79d8d95d0248b2b0d34663a79eda316dde3 (diff)
Save and restore MIDI driver option state, and tidy up a couple of things. Fixes #3349.
git-svn-id: svn://localhost/ardour2/branches/3.0@7497 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/engine_dialog.cc')
-rw-r--r--gtk2_ardour/engine_dialog.cc37
1 files changed, 31 insertions, 6 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index a5f5921ce2..6b069653fe 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -1,3 +1,22 @@
+/*
+ Copyright (C) 2010 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
#include <vector>
#include <cmath>
#include <fstream>
@@ -199,9 +218,9 @@ EngineControl::EngineControl ()
row++;
#endif
- interface_combo.set_size_request (125, -1);
- input_device_combo.set_size_request (125, -1);
- output_device_combo.set_size_request (125, -1);
+ interface_combo.set_size_request (250, -1);
+ input_device_combo.set_size_request (250, -1);
+ output_device_combo.set_size_request (250, -1);
/*
@@ -350,15 +369,15 @@ EngineControl::EngineControl ()
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);
+ device_packer.attach (*label, 2, 3, row, row+1, FILL|EXPAND, (AttachOptions) 0);
++row;
label = manage (new Label (_("Hardware output latency:")));
- label->set_alignment (1.0, 0.5);
+ label->set_alignment (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);
+ device_packer.attach (*label, 2, 3, row, row+1, FILL|EXPAND, (AttachOptions) 0);
++row;
basic_hbox.pack_start (basic_packer, false, false);
@@ -1174,6 +1193,10 @@ EngineControl::get_state ()
child->add_property ("val", output_device_combo.get_active_text());
root->add_child_nocopy (*child);
+ child = new XMLNode ("mididriver");
+ child->add_property ("val", midi_driver_combo.get_active_text());
+ root->add_child_nocopy (*child);
+
return *root;
}
@@ -1317,6 +1340,8 @@ EngineControl::set_state (const XMLNode& root)
input_device_combo.set_active_text(strval);
} else if (child->name() == "outputdevice") {
output_device_combo.set_active_text(strval);
+ } else if (child->name() == "mididriver") {
+ midi_driver_combo.set_active_text(strval);
}
}
}