Created attachment 3166 patch to implement above enhancements Hi, Just hacked this together over the past day, I'm new to C, diff, gtk, etc so I hope the code isn't too ugly. :) What got me started was that the bar did not get colours applied on the Dust theme on Ubuntu, so I set about mucking around with styles as hinted at by an obscure mailing list post somewhere.. turns out this was unnecessary (all that needed to be done was to set the background with STATE_SELECTED as well), but I've left it that way as it avoids what looks like a new rcstyle object being created by modify_bg() every poll with the current approach. After that I bit the bullet and moved the color data to the options struct, and made an option in the configuration dialog for the user to set the colors, based largely on code from the netload plugin. I've also added another color entry for the AC state. It compiles and runs with no errors, but like I sad I'm new to all this so as for best programming practices... well, I'll need your feedback to judge that. :) The patch is based on the Ubuntu sources, but the only change they make to battery.c is some separate acpi stuff, which I've removed from the diff. It seems to apply against trunk and 0.5.1 fine. Hope this is at least useful for someone, Jarrad
Nice, thank you. I haven't had time to look into your patch yet, but it does sound useful. The release of xfce 4.8 is getting close, so I am focusing on this right now, but once that's behind, I'll give your patch a try.
Thanks, i've applied it in http://git.xfce.org/panel-plugins/xfce4-battery-plugin/commit/?id=4baa0b34bbdca852ed608cfd0d8042985f1e777d