[Pkg-xfce-devel] Bug#629265: Bug#629265: Bug#629265: Bug#629265: Bug#629265: Broken empty battery icon on system tray

Yves-Alexis Perez corsac at debian.org
Sun Jun 5 19:31:12 UTC 2011


On dim., 2011-06-05 at 21:32 +0300, Kim Holviala wrote:
> On 2011-06-05 20:30, Yves-Alexis Perez wrote:
> 
> >> I traced the code a bit and found function xfpm_battery_refresh_icon()
> >> which looks a bit fishy. It's the function that converts battery
> >> percentage to an icon name.
> >
> > So you have a tentative fix ready? I can try testing it, I should have a
> > mostly empty battery and I think force_discharge with laptop plugged
> > should be safe.
> 
> Yup, got a working patch. The bug was just shoddy coding - two if loops 
> with missing final elses and an uninitalizd string icon_name.
> 
> Attached simple patch fixes the if clauses and makes sure the string 
> variable is always defined before returning.

Hmhm, I'm not too sure. I'll have to report that upstream and ask for
advice, but I think it might be better to keep the case and add a new
one for XFPM_DEVICE_STATE_EMPTY, then a fallback.

Regards,
-- 
Yves-Alexis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-devel/attachments/20110605/fd9d1cfe/attachment.pgp>


More information about the Pkg-xfce-devel mailing list