summaryrefslogtreecommitdiffstats
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
parent049525ee6a9c51485354f02531a2dfd63829cabd (diff)
downloadtdelibs-fffcd810f84ca3ad146a43b97aed02067adcf4f6.tar.gz
tdelibs-fffcd810f84ca3ad146a43b97aed02067adcf4f6.zip
Add cryptography devices to tdehwlib
-rw-r--r--tdecore/tdehardwaredevices.cpp14
-rw-r--r--tdecore/tdehardwaredevices.h1
2 files changed, 15 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);
}
diff --git a/tdecore/tdehardwaredevices.h b/tdecore/tdehardwaredevices.h
index 8eb21d92d..9986dda89 100644
--- a/tdecore/tdehardwaredevices.h
+++ b/tdecore/tdehardwaredevices.h
@@ -78,6 +78,7 @@ enum TDEGenericDeviceType {
ThermalControl,
Bridge,
Platform,
+ Cryptography,
Event,
Input,
PNP,