summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdehardwaredevices.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2016-07-23 18:28:25 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2016-07-23 18:28:25 -0500
commitd15fe834b1c98aa86c2f24602552ec58a9e16f93 (patch)
tree48706f9586ee4a076fcc40d57661e8c4d2c5d9f3 /tdecore/tdehw/tdehardwaredevices.cpp
parent7faae2b255108c5ffdda4b36cb8e612d03deeb8f (diff)
downloadtdelibs-d15fe834b1c98aa86c2f24602552ec58a9e16f93.tar.gz
tdelibs-d15fe834b1c98aa86c2f24602552ec58a9e16f93.zip
Add nvmem device type
Diffstat (limited to 'tdecore/tdehw/tdehardwaredevices.cpp')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index e9c7daff1..ff5484a59 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -1336,6 +1336,9 @@ TDEGenericDeviceType::TDEGenericDeviceType readGenericDeviceTypeFromString(TQStr
else if (query == "Network") {
ret = TDEGenericDeviceType::Network;
}
+ else if (query == "NonvolatileMemory") {
+ ret = TDEGenericDeviceType::NonvolatileMemory;
+ }
else if (query == "Printer") {
ret = TDEGenericDeviceType::Printer;
}
@@ -2218,6 +2221,9 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
}
}
+ if (devicesubsystem == "nvmem") {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::NonvolatileMemory);
+ }
if (devicesubsystem == "serio") {
if (devicedriver.contains("atkbd")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Keyboard);
@@ -4170,6 +4176,9 @@ TQString TDEHardwareDevices::getFriendlyDeviceTypeStringFromType(TDEGenericDevic
else if (query == TDEGenericDeviceType::Network) {
ret = i18n("Network");
}
+ else if (query == TDEGenericDeviceType::NonvolatileMemory) {
+ ret = i18n("Nonvolatile Memory");
+ }
else if (query == TDEGenericDeviceType::Printer) {
ret = i18n("Printer");
}
@@ -4340,6 +4349,9 @@ TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDE
else if (query == TDEGenericDeviceType::Network) {
ret = DesktopIcon("kcmpci", size);
}
+ else if (query == TDEGenericDeviceType::NonvolatileMemory) {
+ ret = DesktopIcon("memory", size);
+ }
else if (query == TDEGenericDeviceType::Printer) {
ret = DesktopIcon("printer", size);
}