From 73cfc30d494f102184af5f575357d3770b1be506 Mon Sep 17 00:00:00 2001 From: RKrom Date: Tue, 24 Jan 2012 21:37:15 +0000 Subject: [PATCH] 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 --- Greenshot/Forms/LanguageDialog.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Greenshot/Forms/LanguageDialog.cs b/Greenshot/Forms/LanguageDialog.cs index bd6b713ac..c18f6dbac 100644 --- a/Greenshot/Forms/LanguageDialog.cs +++ b/Greenshot/Forms/LanguageDialog.cs @@ -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) {