[Scummvm-cvs-logs] SF.net SVN: scummvm:[52965] scummvm
criezy at users.sourceforge.net
criezy at users.sourceforge.net
Fri Oct 1 21:16:10 CEST 2010
Revision: 52965
http://scummvm.svn.sourceforge.net/scummvm/?rev=52965&view=rev
Author: criezy
Date: 2010-10-01 19:16:09 +0000 (Fri, 01 Oct 2010)
Log Message:
-----------
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).
Modified Paths:
--------------
scummvm/branches/branch-1-2-0/gui/options.cpp
scummvm/trunk/gui/options.cpp
Modified: scummvm/branches/branch-1-2-0/gui/options.cpp
===================================================================
--- scummvm/branches/branch-1-2-0/gui/options.cpp 2010-10-01 18:20:41 UTC (rev 52964)
+++ scummvm/branches/branch-1-2-0/gui/options.cpp 2010-10-01 19:16:09 UTC (rev 52965)
@@ -1281,9 +1281,20 @@
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();
}
Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp 2010-10-01 18:20:41 UTC (rev 52964)
+++ scummvm/trunk/gui/options.cpp 2010-10-01 19:16:09 UTC (rev 52965)
@@ -1281,9 +1281,20 @@
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();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list