From 21831b61832060855017d5b30dc277eaa333aef8 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Sat, 26 Jun 2010 15:25:47 +0000 Subject: GUI: If no language is explicitly selected and autodetection is available, select "" (which is already in use) instead of English. svn-id: r50323 --- gui/options.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gui/options.cpp') 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 -- cgit v1.2.3