[MPlayer-cvslog] r37146 - trunk/gui/skin/skin.c

ib subversion at mplayerhq.hu
Wed Apr 9 15:30:50 CEST 2014


Author: ib
Date: Wed Apr  9 15:30:50 2014
New Revision: 37146

Log:
Relocate code added in r37121.

Modified:
   trunk/gui/skin/skin.c

Modified: trunk/gui/skin/skin.c
==============================================================================
--- trunk/gui/skin/skin.c	Wed Apr  9 14:46:06 2014	(r37145)
+++ trunk/gui/skin/skin.c	Wed Apr  9 15:30:50 2014	(r37146)
@@ -626,11 +626,6 @@ static int parse_potmeter(guiItem *item,
     h   = cutInt(in, ',', 9);
     cutStr(in, buf, ',', 10);
 
-    if (d < 0 || d > 100) {
-        skin_error(MSGTR_GUI_MSG_SkinErrorDefault, d);
-        return 1;
-    }
-
     message = appFindMessage(buf);
 
     if (message == -1) {
@@ -641,6 +636,11 @@ static int parse_potmeter(guiItem *item,
     else
         skin_legacy("evSetURL", buf);
 
+    if (d < 0 || d > 100) {
+        skin_error(MSGTR_GUI_MSG_SkinErrorDefault, d);
+        return 1;
+    }
+
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    %s image: %s %d,%d %dx%d\n", currItem, phfname, x, y, w, h);
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin]     button image: %s %dx%d\n", bfname, bwidth, bheight);
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin]     numphases: %d, default: %d%%\n", num, d);
@@ -791,11 +791,6 @@ static int item_pimage(char *in)
     h   = cutInt(in, ',', 6);
     cutStr(in, buf, ',', 7);
 
-    if (d < 0 || d > 100) {
-        skin_error(MSGTR_GUI_MSG_SkinErrorDefault, d);
-        return 1;
-    }
-
     message = appFindMessage(buf);
 
     if (message == -1) {
@@ -806,6 +801,11 @@ static int item_pimage(char *in)
     else
         skin_legacy("evSetURL", buf);
 
+    if (d < 0 || d > 100) {
+        skin_error(MSGTR_GUI_MSG_SkinErrorDefault, d);
+        return 1;
+    }
+
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    %s image: %s %d,%d %dx%d\n", currItem, phfname, x, y, w, h);
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin]     numphases: %d, default: %d%%\n", num, d);
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin]     message: %s (#%d)\n", buf, message);


More information about the MPlayer-cvslog mailing list