LanguageDialog closes and selects the language itself if only one language is available.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1609 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-01-24 21:37:15 +00:00
commit 73cfc30d49

View file

@ -71,6 +71,15 @@ namespace Greenshot.Forms {
} else {
this.comboBoxLanguage.SelectedValue = Thread.CurrentThread.CurrentUICulture.Name;
}
// Close again when there is only one language, this shows the form briefly!
// But the use-case is not so interesting, only happens once, to invest a lot of time here.
if (language.SupportedLanguages.Count == 1) {
this.comboBoxLanguage.SelectedValue = language.SupportedLanguages[0].Ietf;
language.SetLanguage(SelectedLanguage);
properOkPressed = true;
this.Close();
}
}
void BtnOKClick(object sender, EventArgs e) {