changeset 3890:0c0306a20e60

if SKIN_PLAYPAUSE isn't 42px wide, don't display mainwin_playstatus at all
author Tomasz Mon <desowin@gmail.com>
date Fri, 02 Nov 2007 12:42:58 +0100
parents 8f8d7ac51b08
children 3b530b2dcf2c
files src/audacious/skin.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/skin.c	Fri Nov 02 11:59:42 2007 +0100
+++ b/src/audacious/skin.c	Fri Nov 02 12:42:58 2007 +0100
@@ -1605,7 +1605,8 @@
     error = skin_load_nolock(skin, path, FALSE);
     skin_unlock(skin);
 
-    SkinPixmap *pixmap = skin_get_pixmap(skin, SKIN_NUMBERS);
+    SkinPixmap *pixmap = NULL;
+    pixmap = skin_get_pixmap(skin, SKIN_NUMBERS);
     if (pixmap) {
         ui_skinned_number_set_size(mainwin_minus_num, 9, pixmap->height);
         ui_skinned_number_set_size(mainwin_10min_num, 9, pixmap->height);
@@ -1613,6 +1614,7 @@
         ui_skinned_number_set_size(mainwin_10sec_num, 9, pixmap->height);
         ui_skinned_number_set_size(mainwin_sec_num, 9, pixmap->height);
     }
+
     return error;
 }
 
@@ -1723,6 +1725,10 @@
             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
             return;
     }