summaryrefslogtreecommitdiff
path: root/libs/surfaces/mackie/gui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-04-12 16:41:07 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-04-12 16:41:07 +0000
commit0c4fe26b4111e5c7955380d9a7ab55c4c775d6d0 (patch)
tree873e07f1ef5fe386bbebf1cdb259793ca2d62913 /libs/surfaces/mackie/gui.cc
parent62620122a96af73c9714c4de492c43382c5f0297 (diff)
MCP: switch devices on the fly; name MIDI ports appropriately; fix active state; move sysex parsing into Surface
git-svn-id: svn://localhost/ardour2/branches/3.0@11942 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/gui.cc')
-rw-r--r--libs/surfaces/mackie/gui.cc31
1 files changed, 5 insertions, 26 deletions
diff --git a/libs/surfaces/mackie/gui.cc b/libs/surfaces/mackie/gui.cc
index 7f49b3e392..76715a4751 100644
--- a/libs/surfaces/mackie/gui.cc
+++ b/libs/surfaces/mackie/gui.cc
@@ -39,11 +39,9 @@ public:
private:
void surface_combo_changed ();
- void extenders_changed ();
MackieControlProtocol& _cp;
Gtk::ComboBoxText _surface_combo;
- Gtk::SpinButton _extenders;
};
void*
@@ -78,46 +76,27 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
table->attach (_surface_combo, 1, 2, 0, 1);
vector<string> surfaces;
-
+
for (std::map<std::string,DeviceInfo>::iterator i = DeviceInfo::device_info.begin(); i != DeviceInfo::device_info.end(); ++i) {
+ std::cerr << "Dveice known: " << i->first << endl;
surfaces.push_back (i->first);
}
Gtkmm2ext::set_popdown_strings (_surface_combo, surfaces);
_surface_combo.set_active_text (p.device_info().name());
- _extenders.set_range (0, 8);
- _extenders.set_increments (1, 4);
-
- Gtk::Label* l = manage (new Gtk::Label (_("Extenders:")));
- l->set_alignment (0, 0.5);
- table->attach (*l, 0, 1, 1, 2);
- table->attach (_extenders, 1, 2, 1, 2);
-
pack_start (*table);
- Gtk::Label* cop_out = manage (new Gtk::Label (_("<i>You must restart Ardour for changes\nto these settings to take effect.</i>")));
- cop_out->set_use_markup (true);
- pack_start (*cop_out);
-
set_spacing (4);
+ set_border_width (12);
show_all ();
_surface_combo.signal_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::surface_combo_changed));
- _extenders.signal_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::extenders_changed));
}
void
MackieControlProtocolGUI::surface_combo_changed ()
{
- if (_surface_combo.get_active_text() == _("Mackie Control")) {
- ARDOUR::Config->set_mackie_emulation (X_("mcu"));
- } else {
- ARDOUR::Config->set_mackie_emulation (X_("bcf"));
- }
+ _cp.set_device (_surface_combo.get_active_text());
}
-void
-MackieControlProtocolGUI::extenders_changed ()
-{
- ARDOUR::Config->set_mackie_extenders (_extenders.get_value_as_int ());
-}
+