summaryrefslogtreecommitdiffstats
path: root/src/configuredialog.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2016-05-07 04:03:59 +1000
committerMichele Calgaro <michele.calgaro@yahoo.it>2016-05-07 04:03:59 +1000
commita3caab905b3c008aaa0ff9627c6647615330205d (patch)
tree36800621beebc1279d89a5cc3d0daef59522058a /src/configuredialog.cpp
parent676fba0b9f08d41e68b115bc91931b5d0aa53376 (diff)
downloadtdepowersave-a3caab905b3c008aaa0ff9627c6647615330205d.tar.gz
tdepowersave-a3caab905b3c008aaa0ff9627c6647615330205d.zip
Added support for hybrid suspend (aka suspend to RAM + suspend to disk).
This relates to bug 2601. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/configuredialog.cpp')
-rw-r--r--src/configuredialog.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/configuredialog.cpp b/src/configuredialog.cpp
index a6763ec..384a9c9 100644
--- a/src/configuredialog.cpp
+++ b/src/configuredialog.cpp
@@ -88,17 +88,20 @@ ConfigureDialog::ConfigureDialog( TDEConfig *_config, HardwareInfo *_hwinfo, Set
// get the correct available suspend types
SuspendStates suspend = hwinfo->getSuspendSupport();
+ if ( suspend.freeze && (suspend.freeze_allowed || suspend.freeze_allowed == -1)) {
+ actions.append("Freeze");
+ }
+ if ( suspend.standby && (suspend.standby_allowed || suspend.standby_allowed == -1)) {
+ actions.append("Standby");
+ }
if( suspend.suspend2ram && (suspend.suspend2ram_allowed || suspend.suspend2ram_allowed == -1)) {
actions.append("Sleep");
}
if ( suspend.suspend2disk && (suspend.suspend2disk_allowed || suspend.suspend2disk_allowed == -1)) {
actions.append("Hibernate");
}
- if ( suspend.freeze && (suspend.freeze_allowed || suspend.freeze_allowed == -1)) {
- actions.append("Freeze");
- }
- if ( suspend.standby && (suspend.standby_allowed || suspend.standby_allowed == -1)) {
- actions.append("Standby");
+ if ( suspend.suspend_hybrid && (suspend.suspend_hybrid_allowed || suspend.suspend_hybrid_allowed == -1)) {
+ actions.append("Hybrid Suspend");
}
setIcons();
@@ -1800,6 +1803,9 @@ TQString ConfigureDialog::mapActionToDescription( TQString action ) {
} else if (action.startsWith("SUSPEND2DISK")) {
if (actions.contains("Hibernate"))
ret = i18n("Hibernate");
+ } else if (action.startsWith("SUSPEND_HYBRID")) {
+ if (actions.contains("Hybrid Suspend"))
+ ret = i18n("Hybrid Suspend");
} else if (action.startsWith("SUSPEND2RAM")) {
if (actions.contains("Sleep"))
ret = i18n("Sleep");
@@ -1842,6 +1848,9 @@ TQString ConfigureDialog::mapDescriptionToAction( TQString description ) {
} else if (description.startsWith("Hibernate") ||
description.startsWith(i18n("Hibernate"))) {
ret = "SUSPEND2DISK";
+ } else if (description.startsWith("Hybrid Suspend") ||
+ description.startsWith(i18n("Hybrid Suspend"))) {
+ ret = "SUSPEND_HYBRID";
} else if (description.startsWith("Sleep") ||
description.startsWith(i18n("Sleep"))) {
ret = "SUSPEND2RAM";