! 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 !
[Path] Use GtkProgressBar to show baetery status.
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Matias De lellis 2014-08-03 02:21:53 CEST
Created attachment 5588 
Patch to show battery status using a progress bar.

Hi,
A patch to show battery status using a progress bar.

The main code is based on code of scalemenuitem.c/.h in the same plugin.
Comment 1 Matias De lellis 2014-08-03 02:24:17 CEST
Created attachment 5589 
Screenshot to show the change
Comment 2 Eric Koegel editbugs 2014-08-12 19:21:50 CEST
Oh, nice idea! I think Simon was looking for something like this. Since we're working on a short list of things to fix before a stable release, we'll probably look into this right after.
Comment 3 Simon Steinbeiss editbugs 2014-08-14 10:12:29 CEST
Hey Matias, yup, I indeed expressed interest in this idea before :)

However, I would prefer if the progressbar would replace the current statusbar that is integrated in the icons. So a vertical progressbar overlaying the right edge of the device icons would be ideal. That way we could get rid of all the device load-status icons and instead just use normal device icons without any indicator of their load status (because the load status would be drawn by the progressbar). So e.g. instead of all the xfpm-keyboard-000, xfpm-keyboard-020 etc we could simply use "input-keyboard" which is present in pretty much all icon themes.

I dunno how hard it is in Gtk2 to pack two widgets on top of each other, in this case a GtkImage/Pixbuf and a GtkProgressbar on top of it. Hopefully it doesn't involve too much hackery...
Comment 4 Simon Steinbeiss editbugs 2014-08-18 01:27:35 CEST
I've meanwhile implemented the version that I envisioned: http://git.xfce.org/users/ochosi/xfce4-power-manager/log/?h=progressbar
Comment 5 Matias De lellis 2014-08-18 16:16:24 CEST
Hi,
The code looks good (That's right, there's no way to do this with pure gtk+-2, therefore, it's okay do it with cairo !-), and I think will help with the incomplete icon themes. But could have to test to everyone icons, and in different sizes. I love the idea, but I think it's hard to look good with all the icon themes.

Unfortunately, still could not repair my computer, so I can not help anything these days.
Comment 6 Simon Steinbeiss editbugs 2014-08-18 16:56:35 CEST
Hey, the icon size is hardcoded to 32px in that menu, so I think we don't have to test different sizes.
Also, my code would adjust to different icon-sizes dynamically, because it bases the progressbar-size on the icon size.

Anyway, I merged my branch, so this bug is FIXED :)
Comment 7 Matias De lellis 2014-08-18 17:16:33 CEST
Okey,
As soon as possible, will test it, but I trust in you!. ;)

Regards.

Bug #11066

Reported by:
Matias De lellis
Reported on: 2014-08-03
Last modified on: 2014-08-18

People

Assignee:
Ali Abdallah
CC List:
2 users

Version

Version:
Unspecified

Attachments

Patch to show battery status using a progress bar. (19.30 KB, patch)
2014-08-03 02:21 CEST , Matias De lellis
no flags
Screenshot to show the change (22.29 KB, image/png)
2014-08-03 02:24 CEST , Matias De lellis
no flags

Additional information