Comment 7 for bug 104794

Revision history for this message
Robert Gerlach (khnz) wrote :

My patch is completely wrong, rate is uninitialized there. Instead of rate we can check for ac powered.
Sorry

--- powermanage.py 2007-04-10 19:28:13.000000000 +0200
+++ /usr/share/python-support/kde-guidance/powermanage.py 2007-04-10 19:28:30.000000000 +0200
@@ -184,7 +184,7 @@
             if properties["battery.rechargeable.is_charging"]:
                 state = "charging"
             elif properties["battery.rechargeable.is_discharging"]:
- if rate:
+ if self.onBattery():
                     state = "discharging"
                 else:
                     state = "charged"