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 327963 - Battery low warning repeated many times a minute.
Battery low warning repeated many times a minute.
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
SVN TRUNK
Other Linux
: Normal major
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on: 326743
Blocks:
 
 
Reported: 2006-01-21 11:50 UTC by Richard Hughes
Modified: 2006-01-25 19:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initial patch (5.13 KB, patch)
2006-01-25 09:37 UTC, Richard Hughes
needs-work Details | Review

Description Richard Hughes 2006-01-21 11:50:27 UTC
We should only notify the user at 20, 10, 5 and 2 minutes.

This is a blocker for the next release I think, as I get many notifications a second when my battery is low.
Comment 1 Jaap A. Haitsma 2006-01-21 15:05:16 UTC
We should fix this when fixing bug 326743

Should be pretty simple to fix in gpm-manager we just need a private variable recording the prev_remaining_time and then check if 

remaining_time <= notification_time < prev_remaining_time
Comment 2 Richard Hughes 2006-01-25 09:37:04 UTC
Created attachment 58070 [details] [review]
initial patch

Using the time we last notified doesn't work right for me, and is quite confusing to debug. It also doesn't work for the per-percentage case. I've attached this patch, and I've tested it over a couple of charge/discharge cycles and it seems to work as expected, no more duplicate notifications.
It look okay to you guys?
Comment 3 Richard Hughes 2006-01-25 19:59:53 UTC
I've committed this now, as it fixes the bug.
We can argue about the text or other changes later if required.