changeset 2186:7be793a34b48 trunk

[svn] - add ability to colourtheme the UI
author nenolod
date Wed, 20 Dec 2006 07:09:22 -0800
parents c108a98794b1
children 3a5a895ce665
files ChangeLog audacious/main.c audacious/main.h audacious/widgets/skin.c
diffstat 4 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 <nenolod@nenolod.net>
+  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 <nenolod@nenolod.net>
   revision [3373]
   - break out string-related functions from util.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);
--- 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;
--- 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;
 }