From 2633a70018f576b916f021fa8b35c3fa9d80e5a6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 16 Jan 2011 20:12:55 +0000 Subject: [PATCH] GUI: Fix language popup in the game options. r49786 introduced a regression which made the game options menu set the game language to "zh-cn" in case "" was selected. Also in case no language key was present in the game's config domain no text was shown at all, now it shows "" in that case again. svn-id: r55267 --- gui/launcher.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 0d331a598cb..de13966dbf2 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -188,8 +188,8 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // Language popup _langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", _("Language:"), _("Language of the game. This will not turn your Spanish game version into English")); _langPopUp = new PopUpWidget(tab, "GameOptions_Game.LangPopup", _("Language of the game. This will not turn your Spanish game version into English")); - _langPopUp->appendEntry(_(""), 0); - _langPopUp->appendEntry("", 0); + _langPopUp->appendEntry(_(""), Common::UNK_LANG); + _langPopUp->appendEntry("", Common::UNK_LANG); const Common::LanguageDescription *l = Common::g_languages; for (; l->code; ++l) { if (checkGameGUIOptionLanguage(l->id, _guioptionsString)) @@ -372,6 +372,8 @@ void EditGameDialog::open() { if (ConfMan.hasKey("language", _domain)) { _langPopUp->setSelectedTag(lang); + } else { + _langPopUp->setSelectedTag(Common::UNK_LANG); } if (_langPopUp->numEntries() <= 3) { // If only one language is avaliable