From: Uwe Hermann Date: Tue, 24 Jul 2018 19:35:26 +0000 (+0200) Subject: HardwareDevice: Make serial number display a bit clearer. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ab89256886a313bef5172191d3f8864415913012;p=pulseview.git HardwareDevice: Make serial number display a bit clearer. --- diff --git a/pv/devices/hardwaredevice.cpp b/pv/devices/hardwaredevice.cpp index ff52f817..50cab7b0 100644 --- a/pv/devices/hardwaredevice.cpp +++ b/pv/devices/hardwaredevice.cpp @@ -55,7 +55,9 @@ HardwareDevice::~HardwareDevice() string HardwareDevice::full_name() const { vector parts = {device_->vendor(), device_->model(), - device_->version(), device_->serial_number()}; + device_->version()}; + if (device_->serial_number().length() > 0) + parts.push_back("[S/N: " + device_->serial_number() + "]"); if (device_->connection_id().length() > 0) parts.push_back("(" + device_->connection_id() + ")"); return join(parts, " "); @@ -88,7 +90,7 @@ string HardwareDevice::display_name( if (multiple_dev) { parts.push_back(device_->version()); - parts.push_back(device_->serial_number()); + parts.push_back("[S/N: " + device_->serial_number() + "]"); if ((device_->serial_number().length() == 0) && (device_->connection_id().length() > 0))