diff options
Diffstat (limited to 'src/tdepowersave.cpp')
-rw-r--r-- | src/tdepowersave.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/tdepowersave.cpp b/src/tdepowersave.cpp index c32701d..b0369d2 100644 --- a/src/tdepowersave.cpp +++ b/src/tdepowersave.cpp @@ -1790,14 +1790,6 @@ void tdepowersave::setSchemeSettings(){ } } - // call setPowerSave() depending on AC state - if (settings->callSetPowerSaveOnAC) { - if (hwinfo->getAcAdapter()) - hwinfo->setPowerSave(false); - else - hwinfo->setPowerSave(true); - } - // --> set autosuspend settings if(settings->autoSuspend) { setAutoSuspend(false); @@ -2176,10 +2168,12 @@ void tdepowersave::handleActionCall ( action action, int value , bool checkAC, b break; } } else if (batWarnCall) { - if (!hwinfo->isPolicyPowerIfaceOwned()) { + // FIXME + // Is there a way to check if is active power manager on currently active session? + if (true) { switch (action) { case GO_SHUTDOWN: - // to be shure if we really need the shutdown + // to be sure if we really need the shutdown if ((checkAC && !hwinfo->getAcAdapter()) || !checkAC ) { DCOPRef shutdown = DCOPRef( "ksmserver", "ksmserver" ); shutdown.send("logout", 0, 2, 2); @@ -2509,7 +2503,7 @@ TQString tdepowersave::currentScheme (){ if(hwinfo->isOnline()) { return settings->currentScheme; } else { - return "ERROR: D-Bus and/or HAL not running"; + return "ERROR: D-Bus not running"; } kdDebugFuncOut(trace); @@ -2540,7 +2534,7 @@ TQString tdepowersave::currentCPUFreqPolicy() { } return _cpuFreq; } else { - return "ERROR: HAL or/and DBus not running"; + return "ERROR: DBus not running"; } kdDebugFuncOut(trace); @@ -2630,7 +2624,7 @@ TQStringList tdepowersave::allowed_sleepingStates(){ } } else { - sleepList.append("ERROR: D-Bus and/or HAL not running"); + sleepList.append("ERROR: D-Bus not running"); } kdDebugFuncOut(trace); @@ -2651,7 +2645,7 @@ TQStringList tdepowersave::listSchemes(){ } } else { - _schemeList.append("ERROR: D-Bus and/or HAL not running"); + _schemeList.append("ERROR: D-Bus not running"); } kdDebugFuncOut(trace); |