summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdegenericdevice.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-24 19:48:44 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-24 19:48:44 -0500
commitedb0581f3426731bb8247d61f3676d6ce00506f1 (patch)
tree1ecd2014355bcbba2085a42a5e81054042da377c /tdecore/tdehw/tdegenericdevice.cpp
parent8e37bb9724a476c7f34bd80545a21a91dd63b5b2 (diff)
downloadtdelibs-edb0581f3426731bb8247d61f3676d6ce00506f1.tar.gz
tdelibs-edb0581f3426731bb8247d61f3676d6ce00506f1.zip
Fix human readable display of ACPI buttons
Diffstat (limited to 'tdecore/tdehw/tdegenericdevice.cpp')
-rw-r--r--tdecore/tdehw/tdegenericdevice.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/tdecore/tdehw/tdegenericdevice.cpp b/tdecore/tdehw/tdegenericdevice.cpp
index 5f51a8b61..4e67ed6d6 100644
--- a/tdecore/tdehw/tdegenericdevice.cpp
+++ b/tdecore/tdehw/tdegenericdevice.cpp
@@ -273,8 +273,17 @@ TQString TDEGenericDevice::friendlyName() {
m_friendlyName = name();
}
else if (type() == TDEGenericDeviceType::Event) {
- // Use parent node name
- if (m_parentDevice) {
+ if (m_systemPath.contains("PNP0C0D")) {
+ m_friendlyName = i18n("ACPI Lid Switch");
+ }
+ else if (m_systemPath.contains("PNP0C0E") || m_systemPath.contains("/LNXSLPBN")) {
+ m_friendlyName = i18n("ACPI Sleep Button");
+ }
+ else if (m_systemPath.contains("PNP0C0C") || m_systemPath.contains("/LNXPWRBN")) {
+ m_friendlyName = i18n("ACPI Power Button");
+ }
+ else if (m_parentDevice) {
+ // Use parent node name
return m_parentDevice->friendlyName();
}
else {
@@ -282,8 +291,17 @@ TQString TDEGenericDevice::friendlyName() {
}
}
else if (type() == TDEGenericDeviceType::Input) {
- // Use parent node name
- if (m_parentDevice) {
+ if (m_systemPath.contains("PNP0C0D")) {
+ m_friendlyName = i18n("ACPI Lid Switch");
+ }
+ else if (m_systemPath.contains("PNP0C0E") || m_systemPath.contains("/LNXSLPBN")) {
+ m_friendlyName = i18n("ACPI Sleep Button");
+ }
+ else if (m_systemPath.contains("PNP0C0C") || m_systemPath.contains("/LNXPWRBN")) {
+ m_friendlyName = i18n("ACPI Power Button");
+ }
+ else if (m_parentDevice) {
+ // Use parent node name
return m_parentDevice->friendlyName();
}
else {