# HG changeset patch # User nenolod # Date 1166627362 28800 # Node ID 7be793a34b489cc94e2ad0e400ac0df43a9aae69 # Parent c108a98794b14f12ae991c14e97b3ac66e79b553 [svn] - add ability to colourtheme the UI diff -r c108a98794b1 -r 7be793a34b48 ChangeLog --- a/ChangeLog Wed Dec 20 06:59:23 2006 -0800 +++ b/ChangeLog Wed Dec 20 07:09:22 2006 -0800 @@ -1,3 +1,13 @@ +2006-12-20 14:59:23 +0000 William Pitcock + revision [3375] + - add pixbuf_effects.c, containing various routines to alter images used by the skinengine + + trunk/audacious/Makefile | 3 - + trunk/audacious/pixbuf_effects.c | 87 +++++++++++++++++++++++++++++++++++++++ + trunk/audacious/util.h | 1 + 3 files changed, 90 insertions(+), 1 deletion(-) + + 2006-12-20 14:45:56 +0000 William Pitcock revision [3373] - break out string-related functions from util.c diff -r c108a98794b1 -r 7be793a34b48 audacious/main.c --- a/audacious/main.c Wed Dec 20 06:59:23 2006 -0800 +++ b/audacious/main.c Wed Dec 20 07:09:22 2006 -0800 @@ -208,6 +208,7 @@ FALSE, /* use filename.jpg for coverart */ FALSE, /* use XMMS-style file selection */ TRUE, /* use extension probing */ + 255, 255, 255, /* colorize r, g, b */ }; typedef struct bmp_cfg_boolent_t { @@ -342,6 +343,9 @@ {"recurse_for_cover_depth", &cfg.recurse_for_cover_depth, TRUE}, {"filepopup_pixelsize", &cfg.filepopup_pixelsize, TRUE}, {"filepopup_delay", &cfg.filepopup_delay, TRUE}, + {"colorize_r", &cfg.colorize_r, TRUE}, + {"colorize_g", &cfg.colorize_g, TRUE}, + {"colorize_b", &cfg.colorize_b, TRUE}, }; static gint ncfgient = G_N_ELEMENTS(bmp_numents); diff -r c108a98794b1 -r 7be793a34b48 audacious/main.h --- a/audacious/main.h Wed Dec 20 06:59:23 2006 -0800 +++ b/audacious/main.h Wed Dec 20 07:09:22 2006 -0800 @@ -128,6 +128,7 @@ gboolean use_file_cover; gboolean use_xmms_style_fileselector; gboolean use_extension_probing; + gint colorize_r; gint colorize_g; gint colorize_b; }; typedef struct _BmpConfig BmpConfig; diff -r c108a98794b1 -r 7be793a34b48 audacious/widgets/skin.c --- a/audacious/widgets/skin.c Wed Dec 20 06:59:23 2006 -0800 +++ b/audacious/widgets/skin.c Wed Dec 20 07:09:22 2006 -0800 @@ -299,7 +299,7 @@ static GdkPixmap * pixmap_new_from_file(const gchar * filename) { - GdkPixbuf *pixbuf; + GdkPixbuf *pixbuf, *pixbuf2; GdkPixmap *pixmap; gint width, height; @@ -323,9 +323,12 @@ return NULL; } - gdk_draw_pixbuf(pixmap, mainwin_gc, pixbuf, 0, 0, 0, 0, width, height, + pixbuf2 = audacious_create_colorized_pixbuf(pixbuf, cfg.colorize_r, cfg.colorize_g, cfg.colorize_b); + g_object_unref(pixbuf); + + gdk_draw_pixbuf(pixmap, mainwin_gc, pixbuf2, 0, 0, 0, 0, width, height, GDK_RGB_DITHER_MAX, 0, 0); - g_object_unref(pixbuf); + g_object_unref(pixbuf2); return pixmap; }