summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-04-15 16:29:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-04-15 16:29:21 +0000
commitfe254d5058973b6a4e321d4a2a208176a70b595e (patch)
tree6bca227e0c0244e487d0df551a5d26cab5079fa9
parenta33006bd3c2d5b533a3af66a7d94ec633c4b5810 (diff)
downloadkpowersave-fe254d5058973b6a4e321d4a2a208176a70b595e.tar.gz
kpowersave-fe254d5058973b6a4e321d4a2a208176a70b595e.zip
Third time's the charm...hopefully these popup problems are now fully repaired
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpowersave@1115215 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--src/config/kpowersaverc_default2
-rw-r--r--src/kpowersave.cpp14
2 files changed, 7 insertions, 9 deletions
diff --git a/src/config/kpowersaverc_default b/src/config/kpowersaverc_default
index 641d8bb..61e6e05 100644
--- a/src/config/kpowersaverc_default
+++ b/src/config/kpowersaverc_default
@@ -12,7 +12,7 @@ AutoSuspendCountdown=true
AutoSuspendCountdownTimeOut=30
Autostart=true
AutostartNeverAsk=false
-unmountExternalOnSuspend=true
+unmountExternalOnSuspend=false
callSetPowerSaveOnAC=true
lockMethod=automatic
timeToFakeKeyAfterLock=2500
diff --git a/src/kpowersave.cpp b/src/kpowersave.cpp
index dcd60bf..18b50f2 100644
--- a/src/kpowersave.cpp
+++ b/src/kpowersave.cpp
@@ -2270,7 +2270,8 @@ void kpowersave::handleResumeSignal() {
}
// handle result of the resume/suspend
- if ((resume_result == 0) || (resume_result == INT_MAX)) {
+ // 1 is a valid return code; don't error out when it is received!
+ if ((resume_result == 0) || (resume_result == 1) || (resume_result == INT_MAX)) {
if ( resume_result == INT_MAX )
kdWarning() << "Unknown if we successful resumed, look like a D-Bus timeout since "
<< "elapsed time between suspend and resume is higher than 6 hours" << endl;
@@ -2283,14 +2284,11 @@ void kpowersave::handleResumeSignal() {
this, i18n("Warning"), 15000);
}
} else {
- // 1 is a valid return code; don't error out when it is received!
- if (resume_result != 1) {
- kdError() << "Unknown error while suspend. Errorcode: " << resume_result << endl;
- QString msg;
+ kdError() << "Unknown error while suspend. Errorcode: " << resume_result << endl;
+ QString msg;
- msg = i18n("An unknown error occurred while %1. The errorcode is: '%2'").
- arg(getSuspendString(calledSuspend)).arg(resume_result);
- }
+ msg = i18n("An unknown error occurred while %1. The errorcode is: '%2'").
+ arg(getSuspendString(calledSuspend)).arg(resume_result);
#if defined(DISTRO_IS_SUSE) || defined(DISTRO_IS_SLES_SLED) || defined(DISTRO_IS_PARDUS)
// okay we know this system use pm-utils and log is under /var/log/pm-suspend.log