! 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 !
ellipsize battery name


Description Yves-Alexis Perez editbugs 2014-10-05 15:35:28 CEST

a Debian user reported that the power manager settings window was too large on his box (see http://bugs.debian.org/763713). This is because his battery name/model is not recognized by the kernel or upower, and thus a 62 characters name is constructed.

As this name is displayed completely in the last tab, the window is forced to be resized. The user provides a patch which I'm unsure is really the best way to fix this (you can find it in the bug report).
Comment 1 Harald Judt 2014-10-28 17:40:46 CET
Using a generic name like "battery" instead of imposing a width-limit might be a better way, because for the majority of users the current design works fine. Additionally, that long ugly name will also be shown in the panel plugin. Not really useful except for spelling exercises. However, we'd need more info about the battery. Please provide the output of:

upower --enumerate
upower -i /org/freedesktop/UPower/devices/battery_BAT0
Comment 2 Harald Judt 2014-10-28 19:05:20 CET
Created attachment 5712 

Here is a preliminary patch that should work. It would still be useful to have the output of the commands, maybe there is more information available to use for generating a distinguishable name.
Comment 3 Chris Bainbridge 2014-10-29 15:07:03 CET
$ upower --enumerate
$ upower -i /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               SMPNz4515WGF95571123456789ABCDE
  model:                bq20z4515WGF95571123456789ABCDE
  power supply:         yes
  updated:              Wed 29 Oct 2014 14:02:51 GMT (1 seconds ago)
  has history:          yes
  has statistics:       yes
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    warning-level:       none
    energy:              65.26 Wh
    energy-empty:        0 Wh
    energy-full:         65.52 Wh
    energy-full-design:  66 Wh
    energy-rate:         0.0180207 W
    voltage:             12.493 V
    percentage:          100%
    capacity:            99.2727%
    icon-name:          'battery-full-charged-symbolic'

Thanks for looking in to this. I have no idea why the battery is not recognised, this is a 2012 Macbook Pro and so is a common laptop, but perhaps this particular one is unusual somehow.
Comment 4 Harald Judt 2014-10-30 13:01:08 CET
Patch pushed to git: http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=ac0335d18eb041a870d573130e3c1858de2dd048

The battery should now be shown as "Battery" in both the panel plugin and the settings dialog devices tab.

Bug #11217

Reported by:
Yves-Alexis Perez
Reported on: 2014-10-05
Last modified on: 2014-10-30


Ali Abdallah
CC List:
2 users




Additional information