GNOME Bugzilla – Bug 123548
Wrong symbol shown when on AC power
Last modified: 2009-08-15 18:40:50 UTC
When using a laptop running on AC power without any batteries inserted, the Battery Charge Monitor applet displays an exclamation mark ("!") sign, which indicates a low battery power warning. It does not detect AC power (which would be represented by a plug symbol). The patch attached below should fix this.
Created attachment 20382 [details] [review] Patch to fix the above bug.
Sorry, I forgot to mention that the bug occurs on a machine using ACPI.
Kai: Could you explain a little your patch? Could you also add a ChangeLog entry.
Please respond to Kevin's request for more information about thep patch.
I'm sorry. After seeing his request, I wanted to check whether the issue was already fixed in CVS HEAD (it is, in fact), and forgot to answer. :/ Anyway, the patch allows checking of the AC adapter's state when no batteries are present (max_capacity == 0) on an ACPI system, and protects against division by zero in the battery percentage calculation. As it seems more appropriate to return "N/A" instead of "0%" when there's no battery, I've remade the patch.
Created attachment 23296 [details] [review] New version of the patch.
So basicly it's fixed in CVS and this can be discared, atleast for 2.5 ?
Yes, that's right. Also, 2.4.2 doesn't need this patch anymore.
Aah great to hear, please close this bug :)