mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
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
This commit is contained in:
parent
0fb9c79d8d
commit
ecb5201332
2 changed files with 50 additions and 6 deletions
|
|
@ -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 <vector>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
@ -199,9 +218,9 @@ EngineControl::EngineControl ()
|
||||||
row++;
|
row++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
interface_combo.set_size_request (125, -1);
|
interface_combo.set_size_request (250, -1);
|
||||||
input_device_combo.set_size_request (125, -1);
|
input_device_combo.set_size_request (250, -1);
|
||||||
output_device_combo.set_size_request (125, -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);
|
device_packer.attach (input_latency, 1, 2, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||||
label = manage (new Label (_("samples")));
|
label = manage (new Label (_("samples")));
|
||||||
label->set_alignment (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 (*label, 2, 3, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||||
++row;
|
++row;
|
||||||
label = manage (new Label (_("Hardware output latency:")));
|
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 (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||||
device_packer.attach (output_latency, 1, 2, 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 = manage (new Label (_("samples")));
|
||||||
label->set_alignment (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 (*label, 2, 3, row, row+1, FILL|EXPAND, (AttachOptions) 0);
|
||||||
++row;
|
++row;
|
||||||
|
|
||||||
basic_hbox.pack_start (basic_packer, false, false);
|
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());
|
child->add_property ("val", output_device_combo.get_active_text());
|
||||||
root->add_child_nocopy (*child);
|
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;
|
return *root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1317,6 +1340,8 @@ EngineControl::set_state (const XMLNode& root)
|
||||||
input_device_combo.set_active_text(strval);
|
input_device_combo.set_active_text(strval);
|
||||||
} else if (child->name() == "outputdevice") {
|
} else if (child->name() == "outputdevice") {
|
||||||
output_device_combo.set_active_text(strval);
|
output_device_combo.set_active_text(strval);
|
||||||
|
} else if (child->name() == "mididriver") {
|
||||||
|
midi_driver_combo.set_active_text(strval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __gtk2_ardour_engine_dialog_h__
|
#ifndef __gtk2_ardour_engine_dialog_h__
|
||||||
#define __gtk2_ardour_engine_dialog_h__
|
#define __gtk2_ardour_engine_dialog_h__
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue