forked from len0rd/rockbox
skin_engine: Splash an error when a font fails to load
...Otherwise we fail silently with the theme only partially applied. Change-Id: I1010efaee965db86bb8d2859b04364f63bfbcc0f
This commit is contained in:
parent
5ed0db6e90
commit
93ecb97693
2 changed files with 20 additions and 1 deletions
|
|
@ -49,9 +49,12 @@
|
|||
#include "audio.h"
|
||||
#define lang_is_rtl() (false)
|
||||
#define DEBUGF printf
|
||||
#define splashf(...)
|
||||
#endif /*WPSEDITOR*/
|
||||
#else
|
||||
#include "debug.h"
|
||||
#include "splash.h"
|
||||
#include "lang.h"
|
||||
#include "language.h"
|
||||
#endif /*__PCTOOL__*/
|
||||
|
||||
|
|
@ -2102,6 +2105,7 @@ static bool skin_load_fonts(struct wps_data *data)
|
|||
{
|
||||
if (success)
|
||||
{
|
||||
splashf(HZ, str(LANG_FONT_LOAD_ERROR), "(no name)");
|
||||
DEBUGF("font %d not specified\n", font_id);
|
||||
}
|
||||
success = false;
|
||||
|
|
@ -2126,6 +2130,7 @@ static bool skin_load_fonts(struct wps_data *data)
|
|||
|
||||
if (font->id < 0)
|
||||
{
|
||||
splashf(HZ, str(LANG_FONT_LOAD_ERROR), font->name);
|
||||
DEBUGF("Unable to load font %d: '%s'\n", font_id, font->name);
|
||||
font->name = NULL; /* to stop trying to load it again if we fail */
|
||||
success = false;
|
||||
|
|
|
|||
|
|
@ -16567,3 +16567,17 @@
|
|||
*: "Lineout"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_FONT_LOAD_ERROR
|
||||
desc: Displayed when font loading fails
|
||||
user: core
|
||||
<source>
|
||||
*: "Unable to load font: (%s)"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Unable to load font: (%s)"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "tracks saved"
|
||||
</voice>
|
||||
</phrase>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue