changeset 37050:3555aa94b881

Relocate code added in r37121.
author ib
date Wed, 09 Apr 2014 13:30:50 +0000
parents e2c10942873b
children 1468239c0fe3
files gui/skin/skin.c
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/gui/skin/skin.c	Wed Apr 09 12:46:06 2014 +0000
+++ b/gui/skin/skin.c	Wed Apr 09 13:30:50 2014 +0000
@@ -626,11 +626,6 @@
     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 @@
     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 @@
     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 @@
     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);