diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-06 19:26:01 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-06 19:26:01 -0500 |
commit | 026722768be80478715b102b56005f04823304b5 (patch) | |
tree | e35f1209f53c618cb037063996706122b47bc6d4 /tdecore | |
parent | 63c292c62f959fd5e9349e3e9413eae01ec6efef (diff) | |
download | tdelibs-026722768be80478715b102b56005f04823304b5.tar.gz tdelibs-026722768be80478715b102b56005f04823304b5.zip |
Fix generic multimedia device listing
Diffstat (limited to 'tdecore')
-rw-r--r-- | tdecore/tdehardwaredevices.cpp | 17 | ||||
-rw-r--r-- | tdecore/tdehardwaredevices.h | 1 |
2 files changed, 17 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); } diff --git a/tdecore/tdehardwaredevices.h b/tdecore/tdehardwaredevices.h index bf474da3e..37889f269 100644 --- a/tdecore/tdehardwaredevices.h +++ b/tdecore/tdehardwaredevices.h @@ -77,6 +77,7 @@ enum TDEGenericDeviceType { PNP, OtherACPI, OtherUSB, + OtherMultimedia, OtherPeripheral, OtherSensor, OtherVirtual, |