From 85bcd49851eb3cfac12277ee20d36ec59d6d46b2 Mon Sep 17 00:00:00 2001 From: RKrom Date: Fri, 18 May 2012 18:11:36 +0000 Subject: [PATCH] For now keeping "check for unstable updates" and fixing exception if a wrong mapping is used. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1884 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- GreenshotPlugin/Controls/GreenshotForm.cs | 3 +++ GreenshotPlugin/Core/CoreConfiguration.cs | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/GreenshotPlugin/Controls/GreenshotForm.cs b/GreenshotPlugin/Controls/GreenshotForm.cs index a5dfc1d89..3c558320e 100644 --- a/GreenshotPlugin/Controls/GreenshotForm.cs +++ b/GreenshotPlugin/Controls/GreenshotForm.cs @@ -393,6 +393,9 @@ namespace GreenshotPlugin.Controls { if (!string.IsNullOrEmpty(configBindable.SectionName) && !string.IsNullOrEmpty(configBindable.PropertyName)) { IniSection section = IniConfig.GetIniSection(configBindable.SectionName); if (section != null) { + if (!section.Values.ContainsKey(configBindable.PropertyName)) { + continue; + } if (typeof(CheckBox).IsAssignableFrom(field.FieldType)) { CheckBox checkBox = controlObject as CheckBox; section.Values[configBindable.PropertyName].Value = checkBox.Checked; diff --git a/GreenshotPlugin/Core/CoreConfiguration.cs b/GreenshotPlugin/Core/CoreConfiguration.cs index f5a179bd1..6dfc58e2c 100644 --- a/GreenshotPlugin/Core/CoreConfiguration.cs +++ b/GreenshotPlugin/Core/CoreConfiguration.cs @@ -174,8 +174,6 @@ namespace GreenshotPlugin.Core { [IniProperty("MinimizeWorkingSetSize", Description="Optimize memory footprint, but with a performance penalty!", DefaultValue="False")] public bool MinimizeWorkingSetSize; - - // change to false for releases [IniProperty("CheckUnstable", Description = "Also check for unstable version updates", DefaultValue = "False")] public bool CheckUnstable; @@ -285,6 +283,9 @@ namespace GreenshotPlugin.Core { /// This method will be called after reading the configuration, so eventually some corrections can be made /// public override void AfterLoad() { + // Comment with releases + CheckUnstable = true; + if (OutputDestinations == null) { OutputDestinations = new List(); }