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
This commit is contained in:
JKlingen 2012-10-21 08:51:28 +00:00
commit 75f848e989

View file

@ -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 {
}
}
/// <summary>
/// Show all clipboard format descriptions in the current language
/// </summary>
private void UpdateClipboardFormatDescriptions() {
foreach(ListViewItem item in listview_clipboardformats.Items) {
ClipboardFormat cf = (ClipboardFormat) item.Tag;
item.Text = Language.Translate(cf);
}
}
/// <summary>
/// Build the view with all the destinations
/// </summary>
@ -319,7 +330,7 @@ namespace Greenshot {
item.Tag = clipboardFormat;
item.Checked = coreConfiguration.ClipboardFormats.Contains(clipboardFormat);
}
if (Language.CurrentLanguage != null) {
combobox_language.SelectedValue = Language.CurrentLanguage;
}