summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehardwaredevices.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-04-06 19:26:01 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-04-06 19:26:01 -0500
commit026722768be80478715b102b56005f04823304b5 (patch)
treee35f1209f53c618cb037063996706122b47bc6d4 /tdecore/tdehardwaredevices.cpp
parent63c292c62f959fd5e9349e3e9413eae01ec6efef (diff)
downloadtdelibs-026722768be80478715b102b56005f04823304b5.tar.gz
tdelibs-026722768be80478715b102b56005f04823304b5.zip
Fix generic multimedia device listing
Diffstat (limited to 'tdecore/tdehardwaredevices.cpp')
-rw-r--r--tdecore/tdehardwaredevices.cpp17
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);
}