After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 123548 - Wrong symbol shown when on AC power
Wrong symbol shown when on AC power
Status: VERIFIED FIXED
Product: gnome-applets
Classification: Other
Component: battery
2.4.x
Other All
: High normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-09-30 12:27 UTC by Kai Thomsen
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the above bug. (835 bytes, patch)
2003-09-30 12:30 UTC, Kai Thomsen
none Details | Review
New version of the patch. (1.42 KB, patch)
2004-01-13 02:44 UTC, Kai Thomsen
none Details | Review

Description Kai Thomsen 2003-09-30 12:27:15 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.
Comment 1 Kai Thomsen 2003-09-30 12:30:34 UTC
Created attachment 20382 [details] [review]
Patch to fix the above bug.
Comment 2 Kai Thomsen 2003-09-30 12:36:51 UTC
Sorry, I forgot to mention that the bug occurs on a machine using 
ACPI.
Comment 3 Kevin Vandersloot 2003-12-14 22:38:56 UTC
Kai: Could you explain a little your patch? Could you also add a
ChangeLog entry.
Comment 4 Kjartan Maraas 2004-01-12 16:06:47 UTC
Please respond to Kevin's request for more information about thep patch.
Comment 5 Kai Thomsen 2004-01-13 02:43:12 UTC
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.
Comment 6 Kai Thomsen 2004-01-13 02:44:56 UTC
Created attachment 23296 [details] [review]
New version of the patch.
Comment 7 Dennis Smit 2004-02-04 23:16:23 UTC
So basicly it's fixed in CVS and this can be discared, atleast
for 2.5 ?
Comment 8 Kai Thomsen 2004-02-05 20:04:34 UTC
Yes, that's right. Also, 2.4.2 doesn't need this patch anymore.
Comment 9 Dennis Smit 2004-02-05 20:23:20 UTC
Aah great to hear, please close this bug :)