aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorThierry Crozat2010-10-01 21:41:40 +0000
committerThierry Crozat2010-10-01 21:41:40 +0000
commit1177692701ccfef3eee94ab092a606c0da631566 (patch)
treeae638aa71677d99c9e7f6cec8a86136b1e841eae /common
parent5541af78b1b3ec506fcdd03c96104c4b10168742 (diff)
downloadscummvm-rg350-1177692701ccfef3eee94ab092a606c0da631566.tar.gz
scummvm-rg350-1177692701ccfef3eee94ab092a606c0da631566.tar.bz2
scummvm-rg350-1177692701ccfef3eee94ab092a606c0da631566.zip
GUI: Fix bug #3075649 (Fonts not found with built-in theme)
When switching to a theme that do not have the fonts needed to properly display the current language, it now revert to the previously used theme and display an error message telling the user to change the language first if he wants to use the theme he selected. svn-id: r52969
Diffstat (limited to 'common')
-rw-r--r--common/translation.cpp10
-rw-r--r--common/translation.h5
2 files changed, 15 insertions, 0 deletions
diff --git a/common/translation.cpp b/common/translation.cpp
index 1328ed62d2..b81deb6058 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -213,6 +213,12 @@ const char *TranslationManager::getCurrentCharset() {
return _currentCharset.c_str();
}
+const char *TranslationManager::getCurrentLanguage() {
+ if (_currentLang == -1)
+ return "C";
+ return _langs[_currentLang].c_str();
+}
+
String TranslationManager::getTranslation(const String &message) {
return getTranslation(message.c_str());
}
@@ -471,6 +477,10 @@ const TLangArray TranslationManager::getSupportedLanguageNames() const {
const char *TranslationManager::getCurrentCharset() {
return "ASCII";
}
+
+const char *TranslationManager::getCurrentLanguage() {
+ return "C";
+}
#endif // USE_TRANSLATION
diff --git a/common/translation.h b/common/translation.h
index 57c4cc2ac8..d6db5d5077 100644
--- a/common/translation.h
+++ b/common/translation.h
@@ -151,6 +151,11 @@ public:
*/
const char *getCurrentCharset();
+ /**
+ * Returns currently selected translation language
+ */
+ const char *getCurrentLanguage();
+
private:
#ifdef USE_TRANSLATION
/**