changeset 3933:5a4ef76b1f42

beggining of better dealing with substandard winamp skins - if it doesn't break anything, why not commit this?
author Tomasz Mon <desowin@gmail.com>
date Wed, 14 Nov 2007 17:32:02 +0100
parents 77fc6e6d3ca7
children e924c9ee3958
files src/audacious/skin.c src/audacious/skin.h src/audacious/ui_skinned_button.c src/audacious/ui_skinned_button.h src/audacious/ui_skinned_equalizer_graph.c src/audacious/ui_skinned_equalizer_slider.c src/audacious/ui_skinned_horizontal_slider.c src/audacious/ui_skinned_menurow.c src/audacious/ui_skinned_monostereo.c src/audacious/ui_skinned_number.c src/audacious/ui_skinned_playlist_slider.c src/audacious/ui_skinned_playstatus.c src/audacious/ui_skinned_textbox.c src/audacious/ui_skinned_window.c
diffstat 14 files changed, 86 insertions(+), 78 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/skin.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/skin.c	Wed Nov 14 17:32:02 2007 +0100
@@ -48,6 +48,7 @@
 #include "vfs.h"
 
 #include "ui_skinned_window.h"
+#include "ui_skinned_button.h"
 #include "ui_skinned_number.h"
 #include "ui_skinned_playstatus.h"
 
@@ -1369,9 +1370,9 @@
                             numbers->current_height,
                             -1);
 
-    skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 0, 0, 0, 0, 99, 13);
-    skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 90, 0, 99, 0, 9, 13);
-    skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 20, 6, 101, 6, 5, 1);
+    skin_draw_pixmap(NULL, skin, pixmap, gc, SKIN_NUMBERS, 0, 0, 0, 0, 99, 13);
+    skin_draw_pixmap(NULL, skin, pixmap, gc, SKIN_NUMBERS, 90, 0, 99, 0, 9, 13);
+    skin_draw_pixmap(NULL, skin, pixmap, gc, SKIN_NUMBERS, 20, 6, 101, 6, 5, 1);
 
     g_object_unref(numbers->pixmap);
     g_object_unref(gc);
@@ -1711,7 +1712,7 @@
 }
 
 void
-skin_draw_pixmap(Skin * skin, GdkDrawable * drawable, GdkGC * gc,
+skin_draw_pixmap(GtkWidget *widget, Skin * skin, GdkDrawable * drawable, GdkGC * gc,
                  SkinPixmapId pixmap_id,
                  gint xsrc, gint ysrc, gint xdest, gint ydest,
                  gint width, gint height)
@@ -1739,19 +1740,26 @@
             gdk_draw_drawable(drawable, gc, skin_get_pixmap(bmp_active_skin, SKIN_MAIN)->pixmap,
                               212 + xdest, 41, xdest, ydest, width, height);
             height = pixmap->height/2;
-        } else if (pixmap_id == SKIN_PLAYPAUSE) {
-            /* it's better to hide mainwin_playstatus than display mess */
-            if (pixmap->width != 42)
-                gtk_widget_hide(mainwin_playstatus);
-        } else if (pixmap_id == SKIN_SHUFREP) {
-            /* some winamp skins have too strait SKIN_SHUFREP, so let's copy what's remain from SKIN_MAIN */
-            gdk_draw_drawable(drawable, gc, skin_get_pixmap(bmp_active_skin, SKIN_MAIN)->pixmap,
-                              164 + xdest, 89, xdest, ydest, width, height);
-            width = pixmap->width - xsrc;
         } else if (pixmap_id == SKIN_EQMAIN) {
             /* there are skins which EQMAIN doesn't include pixmap for equalizer graph */
             if (pixmap->height != 313) /* skins with EQMAIN which is 313 in height seems to display ok */
                 gtk_widget_hide(equalizerwin_graph);
+        } else if (widget) {
+            if (UI_SKINNED_IS_BUTTON(widget) &&
+                UI_SKINNED_BUTTON(widget)->fixed == SKINNED_WINDOW(mainwin)->fixed) {
+
+                /* let's copy what's under widget */
+                gdk_draw_drawable(drawable, gc, skin_get_pixmap(bmp_active_skin, SKIN_MAIN)->pixmap,
+                                  UI_SKINNED_BUTTON(widget)->x + xdest, UI_SKINNED_BUTTON(widget)->y,
+                                  xdest, ydest, width, height);
+
+                /* some winamp skins have too strait SKIN_SHUFREP */
+                if (pixmap_id == SKIN_SHUFREP)
+                    width = pixmap->width - xsrc;
+            } else
+                /* it's better to hide widget using SKIN_PLAYPAUSE than display mess */
+                if ((pixmap_id == SKIN_PLAYPAUSE && pixmap->width != 42) || pixmap_id == SKIN_POSBAR)
+                    gtk_widget_hide(widget);
         } else
             return;
     }
@@ -1819,14 +1827,14 @@
         y = 21;
 
     /* left corner */
-    skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, y, 0, 0, 25, 20);
+    skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 0, y, 0, 0, 25, 20);
 
     /* titlebar title */
-    skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 26, y,
+    skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 26, y,
                      (width - 100) / 2, 0, 100, 20);
 
     /* titlebar right corner  */
-    skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 153, y,
+    skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 153, y,
                      width - 25, 0, 25, 20);
 
     /* tile draw the remaining frame */
@@ -1836,20 +1844,20 @@
 
     for (i = 0; i < c / 2; i++) {
         /* left of title */
-        skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y,
+        skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 127, y,
                          25 + i * 25, 0, 25, 20);
 
         /* right of title */
-        skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y,
+        skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 127, y,
                          (width + 100) / 2 + i * 25, 0, 25, 20);
     }
 
     if (c & 1) {
         /* Odd tile count, so one remaining to draw. Here we split
          * it into two and draw half on either side of the title */
-        skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y,
+        skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 127, y,
                          ((c / 2) * 25) + 25, 0, 12, 20);
-        skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y,
+        skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 127, y,
                          (width / 2) + ((c / 2) * 25) + 50, 0, 13, 20);
     }
 }
@@ -1874,7 +1882,7 @@
     gint i, c;
 
     /* bottom left corner (menu buttons) */
-    skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, 72,
+    skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 0, 72,
                      0, height - 38, 125, 38);
 
     c = (width - 275) / 25;
@@ -1882,17 +1890,17 @@
     /* draw visualization window, if width allows */
     if (c >= 3) {
         c -= 3;
-        skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 205, 0,
+        skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 205, 0,
                          width - (150 + 75), height - 38, 75, 38);
     }
 
     /* Bottom right corner (playbuttons etc) */
-    skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT,
+    skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT,
                      126, 72, width - 150, height - 38, 150, 38);
 
     /* Tile draw the remaining undrawn portions */
     for (i = 0; i < c; i++)
-        skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 179, 0,
+        skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 179, 0,
                          125 + i * 25, height - 38, 25, 38);
 }
 
@@ -1913,11 +1921,11 @@
     /* frame sides */
     for (i = 0; i < (height - (20 + 38)) / 29; i++) {
         /* left */
-        skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, 42,
+        skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 0, 42,
                          0, 20 + i * 29, 12, 29);
 
         /* right */
-        skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 32, 42,
+        skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 32, 42,
                          width - 19, 20 + i * 29, 19, 29);
     }
 }
@@ -1951,15 +1959,15 @@
     gint i;
 
     /* left corner */
-    skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 72, 42, 0, 0, 25, 14);
+    skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 72, 42, 0, 0, 25, 14);
 
     /* bar tile */
     for (i = 0; i < (width - 75) / 25; i++)
-        skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 72, 57,
+        skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 72, 57,
                          (i * 25) + 25, 0, 25, 14);
 
     /* right corner */
-    skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 99, focus ? 42 : 57,
+    skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_PLEDIT, 99, focus ? 42 : 57,
                      width - 50, 0, 50, 14);
 }
 
@@ -1995,7 +2003,7 @@
             y_offset = 15;
     }
 
-    skin_draw_pixmap(skin, drawable, gc, SKIN_TITLEBAR, 27, y_offset,
+    skin_draw_pixmap(NULL, skin, drawable, gc, SKIN_TITLEBAR, 27, y_offset,
                      0, 0, bmp_active_skin->properties.mainwin_width, MAINWIN_TITLEBAR_HEIGHT);
 }
 
--- a/src/audacious/skin.h	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/skin.h	Wed Nov 14 17:32:02 2007 +0100
@@ -29,7 +29,7 @@
 
 #include <glib.h>
 #include <gdk/gdk.h>
-
+#include <gtk/gtk.h>
 
 #define BMP_DEFAULT_SKIN_PATH \
   DATA_DIR G_DIR_SEPARATOR_S "Skins" G_DIR_SEPARATOR_S "Default"
@@ -219,7 +219,7 @@
 
 void skin_get_viscolor(Skin * skin, guchar vis_color[24][3]);
 gint skin_get_id(void);
-void skin_draw_pixmap(Skin * skin, GdkDrawable * drawable, GdkGC * gc,
+void skin_draw_pixmap(GtkWidget * widget, Skin * skin, GdkDrawable * drawable, GdkGC * gc,
                       SkinPixmapId pixmap_id,
                       gint xsrc, gint ysrc, gint xdest, gint ydest,
                       gint width, gint height);
--- a/src/audacious/ui_skinned_button.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_button.c	Wed Nov 14 17:32:02 2007 +0100
@@ -40,7 +40,6 @@
     gint             h;
     SkinPixmapId     skin_index1;
     SkinPixmapId     skin_index2;
-    GtkWidget        *fixed;
     gboolean         double_size;
     gint             move_x, move_y;
 
@@ -307,7 +306,7 @@
 
     switch (button->type) {
         case TYPE_PUSH:
-            skin_draw_pixmap(bmp_active_skin, obj, gc,
+            skin_draw_pixmap(widget, bmp_active_skin, obj, gc,
                              button->pressed ? priv->skin_index2 : priv->skin_index1,
                              button->pressed ? priv->px : priv->nx,
                              button->pressed ? priv->py : priv->ny,
@@ -315,13 +314,13 @@
             break;
         case TYPE_TOGGLE:
             if (button->inside)
-                skin_draw_pixmap(bmp_active_skin, obj, gc,
+                skin_draw_pixmap(widget, bmp_active_skin, obj, gc,
                                  button->pressed ? priv->skin_index2 : priv->skin_index1,
                                  button->pressed ? priv->ppx : priv->pnx,
                                  button->pressed ? priv->ppy : priv->pny,
                                  0, 0, priv->w, priv->h);
             else
-                skin_draw_pixmap(bmp_active_skin, obj, gc,
+                skin_draw_pixmap(widget, bmp_active_skin, obj, gc,
                                  button->pressed ? priv->skin_index2 : priv->skin_index1,
                                  button->pressed ? priv->px : priv->nx,
                                  button->pressed ? priv->py : priv->ny,
@@ -372,10 +371,10 @@
     sbutton->type = TYPE_PUSH;
     priv->skin_index1 = si;
     priv->skin_index2 = si;
-    priv->fixed = fixed;
+    sbutton->fixed = fixed;
     priv->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(priv->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
+    gtk_fixed_put(GTK_FIXED(sbutton->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
 }
 
 void ui_skinned_toggle_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, gint pnx, gint pny, gint ppx, gint ppy, SkinPixmapId si) {
@@ -397,10 +396,10 @@
     sbutton->type = TYPE_TOGGLE;
     priv->skin_index1 = si;
     priv->skin_index2 = si;
-    priv->fixed = fixed;
+    sbutton->fixed = fixed;
     priv->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(priv->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
+    gtk_fixed_put(GTK_FIXED(sbutton->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
 }
 
 void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h) {
@@ -412,10 +411,10 @@
     sbutton->x = x;
     sbutton->y = y;
     sbutton->type = TYPE_SMALL;
-    priv->fixed = fixed;
+    sbutton->fixed = fixed;
     priv->double_size = FALSE;
 
-    gtk_fixed_put(GTK_FIXED(priv->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
+    gtk_fixed_put(GTK_FIXED(sbutton->fixed),GTK_WIDGET(button), sbutton->x, sbutton->y);
 }
 
 static void button_pressed(UiSkinnedButton *button) {
@@ -516,7 +515,7 @@
 static void ui_skinned_button_redraw(UiSkinnedButton *button) {
     UiSkinnedButtonPrivate *priv = UI_SKINNED_BUTTON_GET_PRIVATE (button);
     if (priv->move_x || priv->move_y)
-        gtk_fixed_move(GTK_FIXED(priv->fixed), GTK_WIDGET(button), button->x+priv->move_x, button->y+priv->move_y);
+        gtk_fixed_move(GTK_FIXED(button->fixed), GTK_WIDGET(button), button->x+priv->move_x, button->y+priv->move_y);
 
     gtk_widget_queue_draw(GTK_WIDGET(button));
 }
--- a/src/audacious/ui_skinned_button.h	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_button.h	Wed Nov 14 17:32:02 2007 +0100
@@ -42,6 +42,7 @@
     GtkWidget widget;
 
     GdkWindow *event_window;
+    GtkWidget *fixed;
     gboolean button_down;
     gboolean pressed;
     gboolean hover;
--- a/src/audacious/ui_skinned_equalizer_graph.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_equalizer_graph.c	Wed Nov 14 17:32:02 2007 +0100
@@ -246,9 +246,9 @@
      */
     void (*__init_spline) (gfloat *, gfloat *, gint, gfloat *) = init_spline;
 
-    skin_draw_pixmap(bmp_active_skin, obj, gc, equalizer_graph->skin_index, 0, 294, 0, 0,
+    skin_draw_pixmap(widget, bmp_active_skin, obj, gc, equalizer_graph->skin_index, 0, 294, 0, 0,
                      equalizer_graph->width, equalizer_graph->height);
-    skin_draw_pixmap(bmp_active_skin, obj, gc, equalizer_graph->skin_index, 0, 314,
+    skin_draw_pixmap(widget, bmp_active_skin, obj, gc, equalizer_graph->skin_index, 0, 314,
                      0, 9 + ((cfg.equalizer_preamp * 9) / 20),
                      equalizer_graph->width, 1);
 
--- a/src/audacious/ui_skinned_equalizer_slider.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_equalizer_slider.c	Wed Nov 14 17:32:02 2007 +0100
@@ -216,14 +216,14 @@
     gint frame;
     frame = 27 - ((priv->position * 27) / 50);
     if (frame < 14)
-        skin_draw_pixmap(bmp_active_skin, obj, gc, priv->skin_index, (frame * 15) + 13, 164, 0, 0, priv->width, priv->height);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, priv->skin_index, (frame * 15) + 13, 164, 0, 0, priv->width, priv->height);
     else
-        skin_draw_pixmap(bmp_active_skin, obj, gc, priv->skin_index, ((frame - 14) * 15) + 13, 229, 0, 0, priv->width, priv->height);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, priv->skin_index, ((frame - 14) * 15) + 13, 229, 0, 0, priv->width, priv->height);
 
     if (priv->pressed)
-        skin_draw_pixmap(bmp_active_skin, obj, gc, priv->skin_index, 0, 176, 1, priv->position, 11, 11);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, priv->skin_index, 0, 176, 1, priv->position, 11, 11);
     else
-        skin_draw_pixmap(bmp_active_skin, obj, gc, priv->skin_index, 0, 164, 1, priv->position, 11, 11);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, priv->skin_index, 0, 164, 1, priv->position, 11, 11);
 
     GdkPixmap *image = NULL;
 
--- a/src/audacious/ui_skinned_horizontal_slider.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_horizontal_slider.c	Wed Nov 14 17:32:02 2007 +0100
@@ -249,18 +249,18 @@
     obj = gdk_pixmap_new(NULL, priv->width, priv->height, gdk_rgb_get_visual()->depth);
     gc = gdk_gc_new(obj);
 
-    skin_draw_pixmap(bmp_active_skin, obj, gc,
+    skin_draw_pixmap(widget, bmp_active_skin, obj, gc,
                      priv->skin_index, priv->frame_offset,
                      priv->frame * priv->frame_height,
                      0, 0, priv->width, priv->height);
     if (hs->pressed)
-        skin_draw_pixmap(bmp_active_skin, obj, gc,
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc,
                          priv->skin_index, hs->knob_px,
                          hs->knob_py, priv->position,
                          ((priv->height - priv->knob_height) / 2),
                          priv->knob_width, priv->knob_height);
     else
-        skin_draw_pixmap(bmp_active_skin, obj, gc,
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc,
                          priv->skin_index, hs->knob_nx,
                          hs->knob_ny, priv->position,
                          ((priv->height - priv->knob_height) / 2),
--- a/src/audacious/ui_skinned_menurow.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_menurow.c	Wed Nov 14 17:32:02 2007 +0100
@@ -219,23 +219,23 @@
 
     if (menurow->selected == MENUROW_NONE) {
         if (cfg.always_show_cb || menurow->pushed)
-            skin_draw_pixmap(bmp_active_skin, obj, gc, menurow->skin_index,
+            skin_draw_pixmap(widget, bmp_active_skin, obj, gc, menurow->skin_index,
                              menurow->nx, menurow->ny, 0, 0, 8, 43);
         else
-            skin_draw_pixmap(bmp_active_skin, obj, gc, menurow->skin_index,
+            skin_draw_pixmap(widget, bmp_active_skin, obj, gc, menurow->skin_index,
                              menurow->nx + 8, menurow->ny, 0, 0, 8, 43);
     }
     else {
-        skin_draw_pixmap(bmp_active_skin, obj, gc, menurow->skin_index,
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, menurow->skin_index,
                          menurow->sx + ((menurow->selected - 1) * 8),
                          menurow->sy, 0, 0, 8, 43);
     }
     if (cfg.always_show_cb || menurow->pushed) {
         if (menurow->always_selected)
-            skin_draw_pixmap(bmp_active_skin, obj, gc, menurow->skin_index,
+            skin_draw_pixmap(widget, bmp_active_skin, obj, gc, menurow->skin_index,
                              menurow->sx + 8, menurow->sy + 10, 0, 10, 8, 8);
         if (menurow->doublesize_selected)
-            skin_draw_pixmap(bmp_active_skin, obj, gc, menurow->skin_index,
+            skin_draw_pixmap(widget, bmp_active_skin, obj, gc, menurow->skin_index,
                              menurow->sx + 24, menurow->sy + 26, 0, 26, 8, 8);
     }
 
--- a/src/audacious/ui_skinned_monostereo.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_monostereo.c	Wed Nov 14 17:32:02 2007 +0100
@@ -187,17 +187,17 @@
 
     switch (monostereo->num_channels) {
     case 1:
-        skin_draw_pixmap(bmp_active_skin, obj, gc, monostereo->skin_index, 29, 0, 0, 0, 27, 12);
-        skin_draw_pixmap(bmp_active_skin, obj, gc, monostereo->skin_index, 0, 12, 27, 0, 29, 12);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, monostereo->skin_index, 29, 0, 0, 0, 27, 12);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, monostereo->skin_index, 0, 12, 27, 0, 29, 12);
         break;
     case 2:
-        skin_draw_pixmap(bmp_active_skin, obj, gc, monostereo->skin_index, 29, 12, 0, 0, 27, 12);
-        skin_draw_pixmap(bmp_active_skin, obj, gc, monostereo->skin_index, 0, 0, 27, 0, 29, 12);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, monostereo->skin_index, 29, 12, 0, 0, 27, 12);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, monostereo->skin_index, 0, 0, 27, 0, 29, 12);
         break;
     default:
     case 0:
-        skin_draw_pixmap(bmp_active_skin, obj, gc, monostereo->skin_index, 29, 12, 0, 0, 27, 12);
-        skin_draw_pixmap(bmp_active_skin, obj, gc, monostereo->skin_index, 0, 12, 27, 0, 29, 12);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, monostereo->skin_index, 29, 12, 0, 0, 27, 12);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, monostereo->skin_index, 0, 12, 27, 0, 29, 12);
         break;
     }
 
--- a/src/audacious/ui_skinned_number.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_number.c	Wed Nov 14 17:32:02 2007 +0100
@@ -193,7 +193,7 @@
     if (number->num > 11 || number->num < 0)
         number->num = 10;
 
-    skin_draw_pixmap(bmp_active_skin, obj, gc,
+    skin_draw_pixmap(widget, bmp_active_skin, obj, gc,
                      number->skin_index, number->num * 9, 0,
                      0, 0, number->width, number->height);
 
--- a/src/audacious/ui_skinned_playlist_slider.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_playlist_slider.c	Wed Nov 14 17:32:02 2007 +0100
@@ -251,7 +251,7 @@
     }
 
     /* drawing knob */
-    skin_draw_pixmap(bmp_active_skin, obj, gc, priv->skin_index, ps->pressed ? 61 : 52, 53, 0, y, priv->width, 18);
+    skin_draw_pixmap(widget, bmp_active_skin, obj, gc, priv->skin_index, ps->pressed ? 61 : 52, 53, 0, y, priv->width, 18);
 
     gdk_draw_drawable(widget->window, gc, obj, 0, 0, 0, 0, priv->width, priv->height);
     g_object_unref(obj);
--- a/src/audacious/ui_skinned_playstatus.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_playstatus.c	Wed Nov 14 17:32:02 2007 +0100
@@ -190,20 +190,20 @@
     if (playstatus->status == STATUS_STOP && playstatus->buffering == TRUE)
         playstatus->buffering = FALSE;
     if (playstatus->status == STATUS_PLAY && playstatus->buffering == TRUE)
-        skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 39, 0, 0, 0, 3, playstatus->height);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 39, 0, 0, 0, 3, playstatus->height);
     else if (playstatus->status == STATUS_PLAY)
-        skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 36, 0, 0, 0, 3, playstatus->height);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 36, 0, 0, 0, 3, playstatus->height);
     else
-        skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 27, 0, 0, 0, 2, playstatus->height);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 27, 0, 0, 0, 2, playstatus->height);
     switch (playstatus->status) {
     case STATUS_STOP:
-        skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 18, 0, 2, 0, 9, playstatus->height);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 18, 0, 2, 0, 9, playstatus->height);
         break;
     case STATUS_PAUSE:
-        skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 9, 0, 2, 0, 9, playstatus->height);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 9, 0, 2, 0, 9, playstatus->height);
         break;
     case STATUS_PLAY:
-        skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 1, 0, 3, 0, 8, playstatus->height);
+        skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 1, 0, 3, 0, 8, playstatus->height);
         break;
     }
 
--- a/src/audacious/ui_skinned_textbox.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_textbox.c	Wed Nov 14 17:32:02 2007 +0100
@@ -707,7 +707,7 @@
         else
             textbox_handle_special_char(tmp, &x, &y);
 
-        skin_draw_pixmap(bmp_active_skin,
+        skin_draw_pixmap(GTK_WIDGET(textbox), bmp_active_skin,
                          priv->pixmap, gc, priv->skin_index,
                          x, y, i * bmp_active_skin->properties.textbox_bitmap_font_width, 0,
                          bmp_active_skin->properties.textbox_bitmap_font_width, 
--- a/src/audacious/ui_skinned_window.c	Tue Nov 13 17:20:18 2007 +0100
+++ b/src/audacious/ui_skinned_window.c	Wed Nov 14 17:32:02 2007 +0100
@@ -166,21 +166,21 @@
 
     switch (window->type) {
         case WINDOW_MAIN:
-            skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_MAIN, 0, 0, 0, 0, width, height);
+            skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_MAIN, 0, 0, 0, 0, width, height);
             skin_draw_mainwin_titlebar(bmp_active_skin, obj, gc, cfg.player_shaded, focus || !cfg.dim_titlebar);
             break;
         case WINDOW_EQ:
-            skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_EQMAIN, 0, 0, 0, 0, width, height);
+            skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_EQMAIN, 0, 0, 0, 0, width, height);
             if (focus || !cfg.dim_titlebar) {
                 if (!cfg.equalizer_shaded)
-                    skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_EQMAIN, 0, 134, 0, 0, width, 14);
+                    skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_EQMAIN, 0, 134, 0, 0, width, 14);
                 else
-                    skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_EQ_EX, 0, 0, 0, 0, width, 14);
+                    skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_EQ_EX, 0, 0, 0, 0, width, 14);
             } else {
                 if (!cfg.equalizer_shaded)
-                    skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_EQMAIN, 0, 149, 0, 0, width, 14);
+                    skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_EQMAIN, 0, 149, 0, 0, width, 14);
                 else
-                    skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_EQ_EX, 0, 15, 0, 0, width, 14);
+                    skin_draw_pixmap(widget, bmp_active_skin, obj, gc, SKIN_EQ_EX, 0, 15, 0, 0, width, 14);
             }
             break;
         case WINDOW_PLAYLIST: