diff options
Diffstat (limited to 'tdecore/tdehardwaredevices.cpp')
-rw-r--r-- | tdecore/tdehardwaredevices.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp index e95030983..cf4ffb1ad 100644 --- a/tdecore/tdehardwaredevices.cpp +++ b/tdecore/tdehardwaredevices.cpp @@ -1149,6 +1149,9 @@ TDEGenericDeviceType::TDEGenericDeviceType readGenericDeviceTypeFromString(TQStr else if (query == "OtherUSB") { ret = TDEGenericDeviceType::OtherUSB; } + else if (query == "OtherMultimedia") { + ret = TDEGenericDeviceType::OtherMultimedia; + } else if (query == "OtherPeripheral") { ret = TDEGenericDeviceType::OtherPeripheral; } @@ -1658,7 +1661,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::GPU); } if (devicepciclass.startsWith("04")) { - if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Sound); // FIXME Technically this code is for "multimedia" + if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::OtherMultimedia); } if (devicepciclass.startsWith("05")) { if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::RAM); @@ -1956,6 +1959,12 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD sdevice->setDiskLabel(disklabel); } + if (device->type() == TDEGenericDeviceType::Network) { + // Network devices don't have devices nodes per se, but we can at least return the Linux network name... + devicenode = systempath; + devicenode.remove(0, devicenode.findRev("/")+1); + } + // Set basic device information again, as some information may have changed device->setName(devicename); device->setDeviceNode(devicenode); @@ -2458,6 +2467,9 @@ TQString TDEHardwareDevices::getFriendlyDeviceTypeStringFromType(TDEGenericDevic else if (query == TDEGenericDeviceType::OtherUSB) { ret = i18n("Other USB"); } + else if (query == TDEGenericDeviceType::OtherMultimedia) { + ret = i18n("Other Multimedia"); + } else if (query == TDEGenericDeviceType::OtherPeripheral) { ret = i18n("Other Peripheral"); } @@ -2583,6 +2595,9 @@ TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDE else if (query == TDEGenericDeviceType::OtherUSB) { ret = DesktopIcon("usb", size); } + else if (query == TDEGenericDeviceType::OtherMultimedia) { + ret = DesktopIcon("kcmsound", size); + } else if (query == TDEGenericDeviceType::OtherPeripheral) { ret = DesktopIcon("kcmpci", size); } |