diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2016-05-07 04:03:59 +1000 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2016-05-07 04:03:59 +1000 |
commit | a3caab905b3c008aaa0ff9627c6647615330205d (patch) | |
tree | 36800621beebc1279d89a5cc3d0daef59522058a /src/settings.cpp | |
parent | 676fba0b9f08d41e68b115bc91931b5d0aa53376 (diff) | |
download | tdepowersave-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/settings.cpp')
-rw-r--r-- | src/settings.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 4fc92a1..d7b549a 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -297,12 +297,14 @@ bool Settings::load_general_settings(){ } sleepButtonAction = mapActionToType(tdeconfig->readEntry("ActionOnSleepButton","")); - if ((sleepButtonAction != GO_SUSPEND2RAM) && (sleepButtonAction != GO_SUSPEND2DISK) && (sleepButtonAction != GO_FREEZE)) { + if ((sleepButtonAction != GO_SUSPEND2RAM) && (sleepButtonAction != GO_SUSPEND2DISK) && + (sleepButtonAction != GO_FREEZE) && (sleepButtonAction != GO_SUSPEND_HYBRID)) { sleepButtonAction = NONE; } s2diskButtonAction = mapActionToType(tdeconfig->readEntry("ActionOnS2DiskButton","")); - if ((s2diskButtonAction != GO_SUSPEND2RAM) && (s2diskButtonAction != GO_SUSPEND2DISK) && (s2diskButtonAction != GO_FREEZE)) { + if ((s2diskButtonAction != GO_SUSPEND2RAM) && (s2diskButtonAction != GO_SUSPEND2DISK) && + (s2diskButtonAction != GO_FREEZE) && (s2diskButtonAction != GO_SUSPEND_HYBRID)) { s2diskButtonAction = NONE; } @@ -327,6 +329,8 @@ action Settings::mapActionToType (TQString _action) { return LOGOUT_DIALOG; } else if (_action.startsWith("SUSPEND2DISK")) { return GO_SUSPEND2DISK; + } else if (_action.startsWith("SUSPEND_HYBRID")) { + return GO_SUSPEND_HYBRID; } else if (_action.startsWith("SUSPEND2RAM")) { return GO_SUSPEND2RAM; } else if (_action.startsWith("FREEZE")) { |