aboutsummaryrefslogtreecommitdiff
path: root/gui/options.cpp
diff options
context:
space:
mode:
authorJordi Vilalta Prat2010-06-26 15:25:47 +0000
committerJordi Vilalta Prat2010-06-26 15:25:47 +0000
commit21831b61832060855017d5b30dc277eaa333aef8 (patch)
treee420bb36e6ae9e462b8ecf8d81287e5c29f93a0c /gui/options.cpp
parent783b71d58562c5a9a8eac23690e658931b086f1a (diff)
downloadscummvm-rg350-21831b61832060855017d5b30dc277eaa333aef8.tar.gz
scummvm-rg350-21831b61832060855017d5b30dc277eaa333aef8.tar.bz2
scummvm-rg350-21831b61832060855017d5b30dc277eaa333aef8.zip
GUI: If no language is explicitly selected and autodetection is available, select "<default>" (which is already in use) instead of English.
svn-id: r50323
Diffstat (limited to 'gui/options.cpp')
-rw-r--r--gui/options.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index cd6eb73adb..a22ceacf2d 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -967,7 +967,17 @@ GlobalOptionsDialog::GlobalOptionsDialog()
_guiLanguagePopUp->appendEntry(lang->name, lang->id);
lang++;
}
- _guiLanguagePopUp->setSelectedTag(TransMan.parseLanguage(ConfMan.get("gui_language").c_str()));
+
+ // Select the currently configured language or default/English if
+ // nothing is specified.
+ if (ConfMan.hasKey("gui_language"))
+ _guiLanguagePopUp->setSelectedTag(TransMan.parseLanguage(ConfMan.get("gui_language")));
+ else
+#ifdef USE_DETECTLANG
+ _guiLanguagePopUp->setSelectedTag(Common::kTranslationAutodetectId);
+#else // !USE_DETECTLANG
+ _guiLanguagePopUp->setSelectedTag(Common::kTranslationBuiltinId);
+#endif // USE_DETECTLANG
#endif // USE_TRANSLATION