[gpm] [Patch] Play a sound loop when the laptop battery/ups reaches a critical level



Hey Richard,

Regarding the bug report here:-
https://bugzilla.redhat.com/show_bug.cgi?id=470090

I decided it would be worth fixing. 

The patches in the archive are as follows:-

0001-Do-not-set-a-charge-warning-if-the-device-is-on-AC.patch -
This is sort of the preliminary fix before the real one, in this case it
resets any warning if we are on ac so that if you get a situation where
the power supply is plain weird by fluctuating on and off, g-p-m stays
on track.

0002-Play-a-sound-loop-if-the-charge-of-a-laptop-battery-.patch -
This is the one that fixes the bug report mentioned. It implements a new
function that starts a sound loop, it only acknowledges one action
parameter because that should be the only case where it would need to be
used. The sound loop is stopped before the critical action is done and
if DkpClient(soon UPClient?) tells us we're on ac.

0003-If-a-battery-charge-is-low-but-not-critical-don-t-pl.patch -
This is just a user experience tweak so that we don't play a sound for a
low charge event that's actually meant for a critical charge event.

0004-Fix-a-problem-where-the-critical-action-is-not-done-.patch -
It would seem that the critical action is not done if we're using a UPS,
this patch fixes it.

So after applying the patches, you should get a sweetly annoying alarm
when the charge of a certain device reaches the critical level. ;)

Hope the patches are acceptable. :)

Cheers,
Pramod

Attachment: implement-a-sound-loop.tar.bz2
Description: application/bzip-compressed-tar



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]