summaryrefslogtreecommitdiffstats
path: root/src/tdepowersave.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-02-08 18:21:28 +0100
committerSlávek Banko <slavek.banko@axis.cz>2014-02-08 18:21:28 +0100
commitc68a1bac04c5cfdb0cdcbd91dc54995bfa05e292 (patch)
tree5a6bc1d0a5eba85862a2008df71bc6d273a13397 /src/tdepowersave.cpp
parent5c45c1a222eb91ea429f8c5245e32e43e7505582 (diff)
downloadtdepowersave-c68a1bac04c5cfdb0cdcbd91dc54995bfa05e292.tar.gz
tdepowersave-c68a1bac04c5cfdb0cdcbd91dc54995bfa05e292.zip
Switch from dbus-tqt do dbus-1-tqt
Add systemd session and inhibit support Cleanup unused methods This partially resolves Bug 1597
Diffstat (limited to 'src/tdepowersave.cpp')
-rw-r--r--src/tdepowersave.cpp22
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);