Mercurial > mplayer.hg
changeset 33077:706f36627399
Add a check for unknown items.
Issue error message in case of an unknown skin item.
author | ib |
---|---|
date | Thu, 31 Mar 2011 09:09:54 +0000 |
parents | 27999e9c1b3f |
children | c84938655cf4 |
files | gui/skin/skin.c help/help_mp-de.h help/help_mp-en.h |
diffstat | 3 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/skin/skin.c Thu Mar 31 09:03:53 2011 +0000 +++ b/gui/skin/skin.c Thu Mar 31 09:09:54 2011 +0000 @@ -914,6 +914,11 @@ break; } } + + if (i == FF_ARRAY_ELEMS(skinItem)) { + skin_error(MSGTR_SKIN_UNKNOWN_ITEM, item); + return -2; + } } if (linenumber == 0) {
--- a/help/help_mp-de.h Thu Mar 31 09:03:53 2011 +0000 +++ b/help/help_mp-de.h Thu Mar 31 09:09:54 2011 +0000 @@ -775,6 +775,7 @@ #define MSGTR_SKIN_ERROR_SECTION "Für '%s' wurde kein Abschnitt angegeben.\n" #define MSGTR_SKIN_ERROR_WINDOW "Für '%s' wurde kein Fenster angegeben.\n" #define MSGTR_SKIN_ERROR_ITEM "Dieses Element wird in '%s' nicht unterstützt.\n" +#define MSGTR_SKIN_UNKNOWN_ITEM "Unbekanntes Element '%s'\n" #define MSGTR_SKIN_UNKNOWN_NAME "Unbekannter Name '%s'\n" #define MSGTR_SKIN_SkinFileNotFound "Skin-Datei %s nicht gefunden.\n" #define MSGTR_SKIN_SkinFileNotReadable "Skin-Datei %s nicht lesbar.\n"
--- a/help/help_mp-en.h Thu Mar 31 09:03:53 2011 +0000 +++ b/help/help_mp-en.h Thu Mar 31 09:09:54 2011 +0000 @@ -578,6 +578,7 @@ #define MSGTR_SKIN_ERROR_SECTION "No section specified for '%s'.\n" #define MSGTR_SKIN_ERROR_WINDOW "No window specified for '%s'.\n" #define MSGTR_SKIN_ERROR_ITEM "This item is not supported by '%s'.\n" +#define MSGTR_SKIN_UNKNOWN_ITEM "Unknown item '%s'\n" #define MSGTR_SKIN_UNKNOWN_NAME "Unknown name '%s'\n" #define MSGTR_SKIN_SkinFileNotFound "Skin file %s not found.\n" #define MSGTR_SKIN_SkinFileNotReadable "Skin file %s not readable.\n"