[MPlayer-cvslog] r33156 - in trunk: gui/skin/skin.c help/help_mp-bg.h help/help_mp-cs.h help/help_mp-de.h help/help_mp-dk.h help/help_mp-el.h help/help_mp-en.h help/help_mp-es.h help/help_mp-fr.h help/help_mp-hu.h ...

ib subversion at mplayerhq.hu
Wed Mar 30 14:07:54 CEST 2011


Author: ib
Date: Wed Mar 30 14:07:54 2011
New Revision: 33156

Log:
Rename error message and add missing checks.

MSGTR_SKIN_BITMAP_UnknownMessage has nothing to do with bitmaps.
The return codes have been changed (resp. added) to indicate the error.

Modified:
   trunk/gui/skin/skin.c

Changes in other areas also in this revision:
Modified:
   trunk/help/help_mp-bg.h
   trunk/help/help_mp-cs.h
   trunk/help/help_mp-de.h
   trunk/help/help_mp-dk.h
   trunk/help/help_mp-el.h
   trunk/help/help_mp-en.h
   trunk/help/help_mp-es.h
   trunk/help/help_mp-fr.h
   trunk/help/help_mp-hu.h
   trunk/help/help_mp-it.h
   trunk/help/help_mp-ja.h
   trunk/help/help_mp-ko.h
   trunk/help/help_mp-mk.h
   trunk/help/help_mp-nb.h
   trunk/help/help_mp-nl.h
   trunk/help/help_mp-pl.h
   trunk/help/help_mp-pt_BR.h
   trunk/help/help_mp-ru.h
   trunk/help/help_mp-sk.h
   trunk/help/help_mp-sv.h
   trunk/help/help_mp-tr.h
   trunk/help/help_mp-uk.h
   trunk/help/help_mp-zh_CN.h
   trunk/help/help_mp-zh_TW.h

Modified: trunk/gui/skin/skin.c
==============================================================================
--- trunk/gui/skin/skin.c	Wed Mar 30 13:32:12 2011	(r33155)
+++ trunk/gui/skin/skin.c	Wed Mar 30 14:07:54 2011	(r33156)
@@ -380,8 +380,8 @@ static int cmd_button(char *in)
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    button image: %s %d,%d\n", fname, x, y);
 
     if ((currWinItems[*currWinItemIdx].message = appFindMessage(msg)) == -1) {
-        skin_error(MSGTR_SKIN_BITMAP_UnknownMessage, msg);
-        return 0;
+        skin_error(MSGTR_SKIN_UnknownMessage, msg);
+        return 1;
     }
 
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]     message: %s (#%d)\n", msg, currWinItems[*currWinItemIdx].message);
@@ -477,8 +477,10 @@ static int cmd_menu(char *in)
 
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    item #%d: %d,%d %dx%d\n", skin->IndexOfMenuItems, x, y, sx, sy);
 
-    if ((skin->menuItems[skin->IndexOfMenuItems].message = message) == -1)
-        skin_error(MSGTR_SKIN_BITMAP_UnknownMessage, tmp);
+    if ((skin->menuItems[skin->IndexOfMenuItems].message = message) == -1) {
+        skin_error(MSGTR_SKIN_UnknownMessage, tmp);
+        return 1;
+    }
 
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]     message: %s (#%d)\n", tmp, skin->menuItems[skin->IndexOfMenuItems].message);
 
@@ -518,6 +520,11 @@ static int cmd_hpotmeter(char *in)
 
     message = appFindMessage(tmp);
 
+    if (message == -1) {
+        skin_error(MSGTR_SKIN_UnknownMessage, tmp);
+        return 1;
+    }
+
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    h/v potmeter image: %s %d,%d %dx%d\n", phfname, x, y, sx, sy);
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]     button image: %s %dx%d\n", pfname, pwidth, pheight);
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]     numphases: %d, default: %d%%\n", ph, d);
@@ -606,6 +613,11 @@ static int cmd_potmeter(char *in)
 
     message = appFindMessage(tmp);
 
+    if (message == -1) {
+        skin_error(MSGTR_SKIN_UnknownMessage, tmp);
+        return 1;
+    }
+
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    potmeter image: %s %d,%d %dx%d\n", phfname, x, y, sx, sy);
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]     numphases: %d, default: %d%%\n", ph, d);
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]     message: %s (#%d)\n", tmp, message);


More information about the MPlayer-cvslog mailing list