Ok. I did a quick and dirty hack. Now that works on my machine. Of course this issue should be resolved in hal, but at least it works. Edit /usr/share/python-support/kde-guidance-powermanager/powermanage.py and change the function onBattery to look that way
def onBattery(self):
""" Find out if we're on AC or on battery using HAL. """
if not self.hasAC:
print "No AC adapter found - assume that we are on batteries."
return False
Ok. I did a quick and dirty hack. Now that works on my machine. Of course this issue should be resolved in hal, but at least it works. Edit /usr/share/ python- support/ kde-guidance- powermanager/ powermanage. py and change the function onBattery to look that way
def onBattery(self):
""" Find out if we're on AC or on battery using HAL. """
if not self.hasAC:
print "No AC adapter found - assume that we are on batteries."
return False
properties = self.batteries[ 0].GetAllProper ties(dbus_ interface= "org.freedeskto p.Hal.Device" ) "battery. rechargeable. is_discharging" ]
return properties[
Luka, maybe it is possible to combine the two tests, both on the ac_adapter and the battery state ?