From 7bf586896d3721f59906473294fbde0ffddf4786 Mon Sep 17 00:00:00 2001 From: RKrom Date: Mon, 29 Oct 2012 12:35:16 +0000 Subject: [PATCH] Fixed configuration issue, somehow the default value was not comma separated. Also added a fix for old values. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2219 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- GreenshotPlugin/Core/CoreConfiguration.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/GreenshotPlugin/Core/CoreConfiguration.cs b/GreenshotPlugin/Core/CoreConfiguration.cs index d2f3e2ee0..59a44a6e4 100644 --- a/GreenshotPlugin/Core/CoreConfiguration.cs +++ b/GreenshotPlugin/Core/CoreConfiguration.cs @@ -166,9 +166,9 @@ namespace GreenshotPlugin.Core { [IniProperty("ThumnailPreview", Description="Enable/disable thumbnail previews", DefaultValue="True")] public bool ThumnailPreview; - [IniProperty("NoGDICaptureForProduct", Description="List of products for which GDI capturing doesn't work.", DefaultValue="IntelliJ IDEA")] + [IniProperty("NoGDICaptureForProduct", Description="List of products for which GDI capturing doesn't work.", DefaultValue="IntelliJ,IDEA")] public List NoGDICaptureForProduct; - [IniProperty("NoDWMCaptureForProduct", Description="List of products for which DWM capturing doesn't work.", DefaultValue="Citrix ICA Client")] + [IniProperty("NoDWMCaptureForProduct", Description="List of products for which DWM capturing doesn't work.", DefaultValue="Citrix,ICA,Client")] public List NoDWMCaptureForProduct; [IniProperty("OptimizeForRDP", Description="Make some optimizations for usage with remote desktop", DefaultValue="False")] @@ -320,11 +320,25 @@ namespace GreenshotPlugin.Core { // Make sure the lists are lowercase, to speedup the check if (NoGDICaptureForProduct != null) { - for(int i=0; i< NoGDICaptureForProduct.Count; i++) { + // Fix error in configuration + if (NoGDICaptureForProduct.Count == 1) { + if ("intellij idea".Equals(NoGDICaptureForProduct[0])) { + NoGDICaptureForProduct[0] = "intellij,idea"; + this.IsDirty = true; + } + } + for (int i = 0; i < NoGDICaptureForProduct.Count; i++) { NoGDICaptureForProduct[i] = NoGDICaptureForProduct[i].ToLower(); } } if (NoDWMCaptureForProduct != null) { + // Fix error in configuration + if (NoDWMCaptureForProduct.Count == 1) { + if ("citrix ica client".Equals(NoDWMCaptureForProduct[0])) { + NoDWMCaptureForProduct[0] = "citrix,ica,client"; + this.IsDirty = true; + } + } for(int i=0; i< NoDWMCaptureForProduct.Count; i++) { NoDWMCaptureForProduct[i] = NoDWMCaptureForProduct[i].ToLower(); }