properly namespace hacked OSC callbacks, add some notes.
[ardour.git] / libs / surfaces / mackie / gui.cc
index ddbb9278082fbdf8dc705409f5d21e3e7b8f30d2..61ca6504cb844ed5db005c89f73b7f24e0837e1f 100644 (file)
@@ -190,9 +190,9 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        table.attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
        touch_sensitivity_scale.property_digits() = 0;
        touch_sensitivity_scale.property_draw_value() = false;
-       table.attach (touch_sensitivity_scale, 1, 2, 5, 6, AttachOptions(FILL|EXPAND), AttachOptions (0));
+       table.attach (touch_sensitivity_scale, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
        row++;
-       table.attach (recalibrate_fader_button, row, row+1, 6, 7, AttachOptions(FILL|EXPAND), AttachOptions (0));
+       table.attach (recalibrate_fader_button, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
        row++;
 
 
@@ -202,8 +202,6 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
 
        vector<string> profiles;
 
-       profiles.push_back ("default");
-
        for (std::map<std::string,DeviceProfile>::iterator i = DeviceProfile::device_profiles.begin(); i != DeviceProfile::device_profiles.end(); ++i) {
                profiles.push_back (i->first);
        }
@@ -797,7 +795,6 @@ MackieControlProtocolGUI::action_changed (const Glib::ustring &sPath, const Glib
 void
 MackieControlProtocolGUI::surface_combo_changed ()
 {
-       _cp.not_session_load();
        _cp.set_device (_surface_combo.get_active_text(), false);
 }
 
@@ -870,7 +867,11 @@ MackieControlProtocolGUI::build_midi_port_list (vector<string> const & ports, bo
        for (vector<string>::const_iterator p = ports.begin(); p != ports.end(); ++p) {
                row = *store->append ();
                row[midi_port_columns.full_name] = *p;
-               row[midi_port_columns.short_name] = (*p).substr ((*p).find (':') + 1);
+               std::string pn = ARDOUR::AudioEngine::instance()->get_pretty_name_by_name (*p);
+               if (pn.empty ()) {
+                       pn = (*p).substr ((*p).find (':') + 1);
+               }
+               row[midi_port_columns.short_name] = pn;
        }
 
        return store;