Your message dated Tue, 25 May 2010 16:05:22 +0000
with message-id <[email protected]>
and subject line Bug#580509: fixed in lxpanel 0.5.5-4
has caused the Debian Bug report #580509,
regarding lxpanel: Battery monitor shows 100% of capacity all the time
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
580509: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580509
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lxpanel
Version: 0.5.5-1
Severity: normal
Tags: squeeze

The problem has two parts: firstly the capacity percentage is computed wrongly
in case your ACPI directory contains file "energy_now" and secondly the
percentage is not updated so the bar size is still same as it was in the time
applet was started (the status charging/discharging is updated so the bar color
changes when you plug AC cabel in - but the bar size still remains same).

Both parts are fixed by the following patch:


diff -ur lxpanel-0.5.5-orig//src/plugins/batt/batt_sys.c 
lxpanel-0.5.5//src/plugins/batt/batt_sys.c
--- lxpanel-0.5.5-orig//src/plugins/batt/batt_sys.c     2010-02-06 
20:45:38.000000000 +0100
+++ lxpanel-0.5.5//src/plugins/batt/batt_sys.c  2010-05-06 14:02:29.000000000 
+0200
@@ -38,6 +38,13 @@
 battery* battery_new() {
     static int battery_num = 1;
     battery * b = g_new0 ( battery, 1 );
+    battery_reset(b);
+    b->battery_num = battery_num;
+    battery_num++;
+    return b;
+}
+
+void battery_reset( battery * b) {
     b->type_battery = TRUE;
     b->capacity_unit = "mAh";
     b->last_capacity_unit = -1;
@@ -49,12 +56,8 @@
     b->remaining_capacity = -1;
     b->present_rate = -1;
     b->state = NULL;
-    b->battery_num = battery_num;
-    battery_num++;
-    return b;
 }
 
-
 static gchar* parse_info_file(char *filename)
 {
     char *buf = NULL;
@@ -136,6 +139,8 @@
     };
     const gchar *sys_file;
 
+    battery_reset(b);
+
     while ( (sys_file = sys_list[i]) != NULL ) {
     
        gchar *file_content;
@@ -150,7 +155,7 @@
                    b->state = "available";
            }
            else if ( strcmp("energy_now", sys_file ) == 0 ) {
-               b->remaining_capacity = get_unit_value((gchar*) file_content) / 
1000;
+               b->remaining_energy = get_unit_value((gchar*) file_content) / 
1000;
                if (!b->state)
                    b->state = "available";
            }


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-3-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

/sys/class/power_supply/BAT0 directory (filename: file content):

/sys/class/power_supply/BAT0/alarm: 1400000
/sys/class/power_supply/BAT0/current_now: 20365000
/sys/class/power_supply/BAT0/device: 
/sys/class/power_supply/BAT0/energy_full: 27910000
/sys/class/power_supply/BAT0/energy_full_design: 28800000
/sys/class/power_supply/BAT0/energy_now: 19710000
/sys/class/power_supply/BAT0/manufacturer: SANYO
/sys/class/power_supply/BAT0/model_name: 42T5247
/sys/class/power_supply/BAT0/power: 
/sys/class/power_supply/BAT0/power_now: 20365000
/sys/class/power_supply/BAT0/present: 1
/sys/class/power_supply/BAT0/serial_number:  1586
/sys/class/power_supply/BAT0/status: Charging
/sys/class/power_supply/BAT0/subsystem: 
/sys/class/power_supply/BAT0/technology: Li-ion
/sys/class/power_supply/BAT0/type: Battery
/sys/class/power_supply/BAT0/voltage_min_design: 14400000
/sys/class/power_supply/BAT0/voltage_now: 16584000

Versions of packages lxpanel depends on:
ii  libasound2              1.0.22-2         shared library for ALSA applicatio
ii  libatk1.0-0             1.30.0-1         The ATK accessibility toolkit
ii  libc6                   2.10.2-6         Embedded GNU C Library: Shared lib
ii  libcairo2               1.8.10-4         The Cairo 2D vector graphics libra
ii  libfontconfig1          2.8.0-2          generic font configuration library
ii  libfreetype6            2.3.11-1         FreeType 2 font engine, shared lib
ii  libglib2.0-0            2.24.0-1         The GLib library of C routines
ii  libgtk2.0-0             2.20.0-3         The GTK+ graphical user interface 
ii  libmenu-cache0          0.2.6-1          an implementation of the freedeskt
ii  libpango1.0-0           1.28.0-1         Layout and rendering of internatio
ii  libx11-6                2:1.3.3-3        X11 client-side library
ii  lxmenu-data             0.1.1-1          freedesktop.org menu specification
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages lxpanel recommends:
ii  manpages-dev                  3.24-1     Manual pages about using GNU/Linux

Versions of packages lxpanel suggests:
ii  iceweasel [www-browser]       3.5.9-2    Web browser based on Firefox
ii  lxsession [lxsession-lite]    0.4.1-2    a lightweight X11 session manager
ii  menu                          2.1.43     generates programs menu for all me
ii  w3m [www-browser]             0.5.2-4    WWW browsable pager with excellent

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: lxpanel
Source-Version: 0.5.5-4

We believe that the bug you reported is fixed in the latest version of
lxpanel, which is due to be installed in the Debian FTP archive:

lxpanel_0.5.5-4.debian.tar.gz
  to main/l/lxpanel/lxpanel_0.5.5-4.debian.tar.gz
lxpanel_0.5.5-4.dsc
  to main/l/lxpanel/lxpanel_0.5.5-4.dsc
lxpanel_0.5.5-4_i386.deb
  to main/l/lxpanel/lxpanel_0.5.5-4_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrew Lee (李健秋) <[email protected]> (supplier of updated lxpanel package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 25 May 2010 23:24:29 +0800
Source: lxpanel
Binary: lxpanel
Architecture: source i386
Version: 0.5.5-4
Distribution: unstable
Urgency: high
Maintainer: Debian LXDE Packaging Team 
<[email protected]>
Changed-By: Andrew Lee (李健秋) <[email protected]>
Description: 
 lxpanel    - a lightweight desktop panel for X
Closes: 493256 563186 580509
Changes: 
 lxpanel (0.5.5-4) unstable; urgency=high
 .
   * Added some backport patches to close bugs on BTS and fix a potential
     buffer overflow problem.
     - sort_dirmenu.patch - sort directory menu (Closes:#493256)
     - batt_status.patch - battery status display (Closes:#580509)
     - kbled.patch - keyboard LDE status (Closes:#563186)
     - panel_draw_label_text.patch - potential buffer overflow
   * Use DH7
   * Apply libtool-fix.patch fix FTBFS with binutils-gold. (Close:#555575)
   * Set urgency=high for buffer overflow fix
Checksums-Sha1: 
 850b556d53e12a0a64d07cee790a3ce88bea339d 1483 lxpanel_0.5.5-4.dsc
 a2cea84b3fe38b30dad058752f3441cd240f8572 22123 lxpanel_0.5.5-4.debian.tar.gz
 c88f6515e5ae69eed765127b43531e6042c9c17c 475202 lxpanel_0.5.5-4_i386.deb
Checksums-Sha256: 
 6aff4d6e622ff5093c14412b8bddb12ed16fbb52f87f1d84cee069aa9c6b1473 1483 
lxpanel_0.5.5-4.dsc
 3cf9735292189a5563620c2cc36324bb23c7f5c1f0ffc66fb8370dd149b4538c 22123 
lxpanel_0.5.5-4.debian.tar.gz
 dd3feb24e1fd4fecac585013a7cd66d46bd8293c9c5fdd234afc7230b0eebccd 475202 
lxpanel_0.5.5-4_i386.deb
Files: 
 e496af10958924a61f727e88d33c685a 1483 x11 optional lxpanel_0.5.5-4.dsc
 30432f453d0e0a5e29473b35f5e661e0 22123 x11 optional 
lxpanel_0.5.5-4.debian.tar.gz
 980112a09a6e4685c6a1b3d511037009 475202 x11 optional lxpanel_0.5.5-4_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkv78J8ACgkQnQYz4bYlCYUBtgCfczupE8x1Bx7LN+k+sIj4Y3vz
epIAnjzeCSGm9mSr/7XKQXDZN224LsHJ
=hxE7
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to