[Scummvm-cvs-logs] SF.net SVN: scummvm:[52896] scummvm/trunk
criezy at users.sourceforge.net
criezy at users.sourceforge.net
Sun Sep 26 00:47:00 CEST 2010
Revision: 52896
http://scummvm.svn.sourceforge.net/scummvm/?rev=52896&view=rev
Author: criezy
Date: 2010-09-25 22:47:00 +0000 (Sat, 25 Sep 2010)
Log Message:
-----------
GUI: Partial fix to bug #3075649 Fonts not found with buit-in theme
When the locale font are not found when loading the theme, it now
fallbacks to default language (i.e. English) and default font. For this to work
I had to move the TranslationManager initialization before the Theme is
loaded. Therefore it is now initialized when the GuiManager is constructed.
Modified Paths:
--------------
scummvm/trunk/base/main.cpp
scummvm/trunk/gui/GuiManager.cpp
scummvm/trunk/gui/ThemeEngine.cpp
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp 2010-09-25 21:57:11 UTC (rev 52895)
+++ scummvm/trunk/base/main.cpp 2010-09-25 22:47:00 UTC (rev 52896)
@@ -362,9 +362,6 @@
setupGraphics(system);
- // Enable translation
- TransMan.setLanguage(ConfMan.get("gui_language").c_str());
-
// Init the event manager. As the virtual keyboard is loaded here, it must
// take place after the backend is initiated and the screen has been setup
system.getEventManager()->init();
Modified: scummvm/trunk/gui/GuiManager.cpp
===================================================================
--- scummvm/trunk/gui/GuiManager.cpp 2010-09-25 21:57:11 UTC (rev 52895)
+++ scummvm/trunk/gui/GuiManager.cpp 2010-09-25 22:47:00 UTC (rev 52896)
@@ -62,6 +62,9 @@
// Clear the cursor
memset(_cursor, 0xFF, sizeof(_cursor));
+
+ // Enable translation
+ TransMan.setLanguage(ConfMan.get("gui_language").c_str());
ConfMan.registerDefault("gui_theme", "scummmodern");
Common::String themefile(ConfMan.get("gui_theme"));
Modified: scummvm/trunk/gui/ThemeEngine.cpp
===================================================================
--- scummvm/trunk/gui/ThemeEngine.cpp 2010-09-25 21:57:11 UTC (rev 52895)
+++ scummvm/trunk/gui/ThemeEngine.cpp 2010-09-25 22:47:00 UTC (rev 52896)
@@ -579,7 +579,7 @@
if (_texts[textId]->_fontPtr)
FontMan.assignFontToName(file, _texts[textId]->_fontPtr);
- // Fallback to non-localized font
+ // Fallback to non-localized font and default translation
else {
// Try built-in fonts
_texts[textId]->_fontPtr = FontMan.getFontByName(file);
@@ -593,7 +593,8 @@
FontMan.assignFontToName(file, _texts[textId]->_fontPtr);
}
- warning("Failed to load localized font '%s'. Using non-localized font instead", file.c_str());
+ TransMan.setLanguage("C");
+ warning("Failed to load localized font '%s'. Using non-localized font and default GUI language instead", file.c_str());
}
}
}
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