summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehardwaredevices.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-05-14 14:43:39 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-05-14 14:43:39 -0500
commitfffcd810f84ca3ad146a43b97aed02067adcf4f6 (patch)
tree87ec5edf9cfdaecb67a31ab7aa270e24139723c6 /tdecore/tdehardwaredevices.cpp
parent049525ee6a9c51485354f02531a2dfd63829cabd (diff)
downloadtdelibs-fffcd810f84ca3ad146a43b97aed02067adcf4f6.tar.gz
tdelibs-fffcd810f84ca3ad146a43b97aed02067adcf4f6.zip
Add cryptography devices to tdehwlib
Diffstat (limited to 'tdecore/tdehardwaredevices.cpp')
-rw-r--r--tdecore/tdehardwaredevices.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index 0b866d1b5..38b68d198 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -2469,6 +2469,9 @@ TDEGenericDeviceType::TDEGenericDeviceType readGenericDeviceTypeFromString(TQStr
else if (query == "Platform") {
ret = TDEGenericDeviceType::Platform;
}
+ else if (query == "Cryptography") {
+ ret = TDEGenericDeviceType::Cryptography;
+ }
else if (query == "Event") {
ret = TDEGenericDeviceType::Event;
}
@@ -3041,6 +3044,11 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
|| (devicesubsystem == "ata")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Platform);
}
+ if (devicesubsystem == "misc") {
+ if (devicedriver.startsWith("tpm_")) {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Cryptography);
+ }
+ }
if (devicesubsystem == "leds") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::OtherACPI);
}
@@ -4940,6 +4948,9 @@ TQString TDEHardwareDevices::getFriendlyDeviceTypeStringFromType(TDEGenericDevic
else if (query == TDEGenericDeviceType::Platform) {
ret = i18n("Platform");
}
+ else if (query == TDEGenericDeviceType::Cryptography) {
+ ret = i18n("Cryptography");
+ }
else if (query == TDEGenericDeviceType::Event) {
ret = i18n("Platform Event");
}
@@ -5086,6 +5097,9 @@ TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDE
else if (query == TDEGenericDeviceType::Platform) {
ret = DesktopIcon("kcmsystem", size);
}
+ else if (query == TDEGenericDeviceType::Cryptography) {
+ ret = DesktopIcon("password", size);
+ }
else if (query == TDEGenericDeviceType::Event) {
ret = DesktopIcon("kcmsystem", size);
}