changeset 3942:80d5be1d31a1

remove some duplicate code
author Tomasz Mon <desowin@gmail.com>
date Thu, 15 Nov 2007 14:23:08 +0100
parents 84235bd5f620
children 6980f1c10de1
files src/audacious/skin.c
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/skin.c	Thu Nov 15 14:12:57 2007 +0100
+++ b/src/audacious/skin.c	Thu Nov 15 14:23:08 2007 +0100
@@ -1726,12 +1726,7 @@
 
     /* FIXME: instead of copying stuff from SKIN_MAIN, we should use transparency or resize widget */
     if (xsrc+width > pixmap->width || ysrc+height > pixmap->height) {
-        if (pixmap_id == SKIN_MONOSTEREO) {
-            /* XMMS skins seems to have SKIN_MONOSTEREO with size 58x20 instead of 58x24 */
-            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_EQMAIN) {
+        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);
@@ -1765,7 +1760,7 @@
                     }
                     /* let's copy what's under widget */
                     gdk_draw_drawable(drawable, gc, skin_get_pixmap(bmp_active_skin, SKIN_MAIN)->pixmap,
-                                      x + xdest, y, xdest, ydest, width, height);
+                                      x, y, xdest, ydest, width, height);
 
                     /* some winamp skins have too strait SKIN_SHUFREP */
                     if (pixmap_id == SKIN_SHUFREP)
@@ -1773,6 +1768,10 @@
 
                     if (pixmap_id == SKIN_VOLUME)
                         width = pixmap->width;
+
+                    /* XMMS skins seems to have SKIN_MONOSTEREO with size 58x20 instead of 58x24 */
+                    if (pixmap_id == SKIN_MONOSTEREO)
+                        height = pixmap->height/2;
                 }
             } else if (gtk_widget_get_parent(widget) == SKINNED_WINDOW(equalizerwin)->fixed) {
                    /* TODO */