> 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].GetAllProperties(dbus_interface="org.freedesktop.Hal.Device")
> return properties["battery.rechargeable.is_discharging"]
>
>
> Luka, maybe it is possible to combine the two tests, both on the ac_adapter
> and the battery state ?
>
> --
> [Hardy] Guidance-power-manager doesn't know when laptop is mains unplugged
> https://bugs.launchpad.net/bugs/213128
> You received this bug notification because you are a direct subscriber
> of the bug.
>
Luimama, your hack works for me.
2008/4/24 Louimama <email address hidden>:
> Ok. I did a quick and dirty hack. Now that works on my machine. Of python- support/ kde-guidance- powermanager/ powermanage. py and 0].GetAllProper ties(dbus_ interface= "org.freedeskto p.Hal.Device" ) "battery. rechargeable. is_discharging" ] power-manager doesn't know when laptop is mains unplugged /bugs.launchpad .net/bugs/ 213128
> course this issue should be resolved in hal, but at least it works. Edit
> /usr/share/
> 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[
> return properties[
>
>
> Luka, maybe it is possible to combine the two tests, both on the ac_adapter
> and the battery state ?
>
> --
> [Hardy] Guidance-
> https:/
> You received this bug notification because you are a direct subscriber
> of the bug.
>
--
Luis Pabón