Changed the default for the auto reduce colors to false, as this caused a lot of issues with other applications. For this I added an entry to the configuration called "LastSaveWithVersion", this can be used when upgrading to fix / change certain settings.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2591 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-04-26 09:58:05 +00:00
parent fc5240971b
commit 829d788eff

View file

@ -25,6 +25,7 @@ using System.IO;
using System.Windows.Forms;
using Greenshot.IniFile;
using Greenshot.Plugin;
using System.Reflection;
namespace GreenshotPlugin.Core {
public enum ClipboardFormat {
@ -110,7 +111,7 @@ namespace GreenshotPlugin.Core {
public OutputFormat OutputFileFormat = OutputFormat.png;
[IniProperty("OutputFileReduceColors", Description="If set to true, than the colors of the output file are reduced to 256 (8-bit) colors", DefaultValue="false")]
public bool OutputFileReduceColors;
[IniProperty("OutputFileAutoReduceColors", Description = "If set to true the amount of colors is counted and if smaller than 256 the color reduction is automatically used.", DefaultValue = "true")]
[IniProperty("OutputFileAutoReduceColors", Description = "If set to true the amount of colors is counted and if smaller than 256 the color reduction is automatically used.", DefaultValue = "false")]
public bool OutputFileAutoReduceColors;
[IniProperty("OutputFileCopyPathToClipboard", Description="When saving a screenshot, copy the path to the clipboard?", DefaultValue="true")]
@ -242,6 +243,9 @@ namespace GreenshotPlugin.Core {
[IniProperty("OptimizePNGCommandArguments", Description = "Arguments for the optional command to execute on a PNG, {0} is replaced by the temp-filename from Greenshot. Note: Temp-file is deleted afterwards by Greenshot.", DefaultValue = "\"{0}\"")]
public string OptimizePNGCommandArguments;
[IniProperty("LastSaveWithVersion", Description = "Version of Greenshot which created this .ini")]
public string LastSaveWithVersion;
// Specifies what THIS build is
public BuildStates BuildState = BuildStates.RELEASE_CANDIDATE;
@ -339,6 +343,13 @@ namespace GreenshotPlugin.Core {
// Comment with releases
// CheckForUnstable = true;
if (string.IsNullOrEmpty(LastSaveWithVersion)) {
// Store version, this can be used later to fix settings after an update
LastSaveWithVersion = Assembly.GetEntryAssembly().GetName().Version.ToString();
// Disable the AutoReduceColors as it causes issues with Mozzila applications and some others
OutputFileAutoReduceColors = false;
}
if (OutputDestinations == null) {
OutputDestinations = new List<string>();
}