! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
GTK critical error fixup on specific laptops
Status:
RESOLVED: FIXED
Product:
Xfce4-battery-plugin
Component:
General

Comments

Description Mathy Vanvoorden 2005-09-18 22:14:11 CEST
On my Dell Latitude D600, I get this critical error when I'm on AC:

Gtk-CRITICAL **: gtk_progress_set_percentage: assertion `percentage >= 0 &&
percentage <= 1.0' failed 

This is because my laptop reports the battery percentage to be 110% when on AC.
Attached is a proposed patch to fix this up.

Reproducible: Always
Steps to Reproduce:
1. Add battery applet on an AC powered Dell D600


Actual Results:  
GTK critical error

Expected Results:  
Don't give errors ;)
Comment 1 Mathy Vanvoorden 2005-09-18 22:15:54 CEST
Created attachment 315 
Patch to fix problem.

Made it for 0.2.0, but works against 0.3.0 too (didn't notice the newer version
before I made changes)
Comment 2 Nick Schermer editbugs 2006-08-03 20:17:58 CEST
This should be fixed in trunk, using:
    charge = CLAMP (charge, 0, 100);

Bug #1157

Reported by:
Mathy Vanvoorden
Reported on: 2005-09-18
Last modified on: 2010-12-24

People

Assignee:
Xfce-Goodies Maintainers
CC List:
1 user

Version

Version:
0.5.1 or older
Target Milestone:
0.5.1 or older

Attachments

Patch to fix problem. (454 bytes, patch)
2005-09-18 22:15 CEST , Mathy Vanvoorden
no flags

Additional information