use human readable port-names in Mackie config.
authorRobin Gareus <robin@gareus.org>
Wed, 25 Nov 2015 23:30:35 +0000 (00:30 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 25 Nov 2015 23:30:52 +0000 (00:30 +0100)
libs/surfaces/mackie/gui.cc

index ac03e41e4e86a9ccc5ecbe3a26a9fa493b46dee1..709836d3fe57b4cded2b1ef4d954d321364b27fe 100644 (file)
@@ -869,7 +869,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;