[Goodies-dev] [Bug 6757] New: [Patch] Fix colors on some GTK themes, add AC color state, allow user-configurable colors.
bugzilla-daemon at xfce.org
bugzilla-daemon at xfce.org
Mon Nov 1 04:10:06 CET 2010
http://bugzilla.xfce.org/show_bug.cgi?id=6757
Summary: [Patch] Fix colors on some GTK themes, add AC color
state, allow user-configurable colors.
Classification: Panel Plugins
Product: Xfce4-battery-plugin
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: Medium
Component: General
AssignedTo: goodies-dev at xfce.org
ReportedBy: akdor1154 at gmail.com
Created attachment 3166
--> http://bugzilla.xfce.org/attachment.cgi?id=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
--
Configure bugmail: http://bugzilla.xfce.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Goodies-dev
mailing list