summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdegenericdevice.cpp
diff options
context:
space:
mode:
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 {