mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-09 10:11:23 +00:00
GUI: Error message for theme incompatible with current language
Add an error message when switching to a theme that does not support the current language (i.e. it does not have fonts for the charset used by that language). svn-id: r52965
This commit is contained in:
parent
8d858738d9
commit
be1d196da5
@ -1281,9 +1281,20 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
|
|||||||
Common::String theme = browser.getSelected();
|
Common::String theme = browser.getSelected();
|
||||||
// FIXME: Actually, any changes (including the theme change) should
|
// FIXME: Actually, any changes (including the theme change) should
|
||||||
// only become active *after* the options dialog has closed.
|
// only become active *after* the options dialog has closed.
|
||||||
|
Common::String charset = TransMan.getCurrentCharset();
|
||||||
if (g_gui.loadNewTheme(theme)) {
|
if (g_gui.loadNewTheme(theme)) {
|
||||||
_curTheme->setLabel(g_gui.theme()->getThemeName());
|
_curTheme->setLabel(g_gui.theme()->getThemeName());
|
||||||
ConfMan.set("gui_theme", theme);
|
ConfMan.set("gui_theme", theme);
|
||||||
|
// If the charset has changed, it means the font were not found for the
|
||||||
|
// new theme. Since for the moment we do not support change of translation
|
||||||
|
// language without restarting, we let the user know about this.
|
||||||
|
if (charset != TransMan.getCurrentCharset()) {
|
||||||
|
MessageDialog error(
|
||||||
|
"The theme you selected does not support your current language. You need to close "
|
||||||
|
"ScummVM and when you start it again it will be using this new theme and english language."
|
||||||
|
);
|
||||||
|
error.runModal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
draw();
|
draw();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user