From 75f848e989ae04f9e615cfcc09c4409d34d3b84b Mon Sep 17 00:00:00 2001 From: JKlingen Date: Sun, 21 Oct 2012 08:51:28 +0000 Subject: [PATCH] Fixed translation issue in expert settings, clipboard format options not being updated right away after switching UI language, see bug #3576073 git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2178 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Forms/SettingsForm.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Greenshot/Forms/SettingsForm.cs b/Greenshot/Forms/SettingsForm.cs index 12c05b088..29f0519c0 100644 --- a/Greenshot/Forms/SettingsForm.cs +++ b/Greenshot/Forms/SettingsForm.cs @@ -231,6 +231,7 @@ namespace Greenshot { // Delaying the SelectedIndexChanged events untill all is initiated this.combobox_language.SelectedIndexChanged += new System.EventHandler(this.Combobox_languageSelectedIndexChanged); UpdateDestinationDescriptions(); + UpdateClipboardFormatDescriptions(); } // Check the settings and somehow visibly mark when something is incorrect @@ -264,6 +265,16 @@ namespace Greenshot { } } + /// + /// Show all clipboard format descriptions in the current language + /// + private void UpdateClipboardFormatDescriptions() { + foreach(ListViewItem item in listview_clipboardformats.Items) { + ClipboardFormat cf = (ClipboardFormat) item.Tag; + item.Text = Language.Translate(cf); + } + } + /// /// Build the view with all the destinations /// @@ -319,7 +330,7 @@ namespace Greenshot { item.Tag = clipboardFormat; item.Checked = coreConfiguration.ClipboardFormats.Contains(clipboardFormat); } - + if (Language.CurrentLanguage != null) { combobox_language.SelectedValue = Language.CurrentLanguage; }