diff options
author | Thierry Crozat | 2010-10-01 19:16:09 +0000 |
---|---|---|
committer | Thierry Crozat | 2010-10-01 19:16:09 +0000 |
commit | be1d196da5dbbabaef0bfa835b51e9c82c407645 (patch) | |
tree | a87cb2f8055714b0e53dbb35afe055a7d2d53b6d | |
parent | 8d858738d996421f6288ecce03766f65b565a464 (diff) | |
download | scummvm-rg350-be1d196da5dbbabaef0bfa835b51e9c82c407645.tar.gz scummvm-rg350-be1d196da5dbbabaef0bfa835b51e9c82c407645.tar.bz2 scummvm-rg350-be1d196da5dbbabaef0bfa835b51e9c82c407645.zip |
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
-rw-r--r-- | gui/options.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index f609413642..b02200b47e 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -1281,9 +1281,20 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3 Common::String theme = browser.getSelected(); // FIXME: Actually, any changes (including the theme change) should // only become active *after* the options dialog has closed. + Common::String charset = TransMan.getCurrentCharset(); if (g_gui.loadNewTheme(theme)) { _curTheme->setLabel(g_gui.theme()->getThemeName()); 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(); } |