Some small changes for a dirty flag in the configuration

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@812 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2010-08-18 05:39:36 +00:00
commit 5ce61bc8e6

View file

@ -39,7 +39,6 @@ using Greenshot.Forms;
using Greenshot.Helpers; using Greenshot.Helpers;
using Greenshot.Plugin; using Greenshot.Plugin;
using Greenshot.UnmanagedHelpers; using Greenshot.UnmanagedHelpers;
using GreenshotCore.Configuration;
namespace Greenshot { namespace Greenshot {
/// <summary> /// <summary>
@ -84,12 +83,14 @@ namespace Greenshot {
// Read configuration // Read configuration
coreConfiguration = IniConfig.GetInstance().GetSection<CoreConfiguration>(); coreConfiguration = IniConfig.GetInstance().GetSection<CoreConfiguration>();
IniConfig.GetInstance().Save(); if (coreConfiguration.IsDirty) {
IniConfig.GetInstance().Save();
}
LOG.Info("Firstlaunch: " + coreConfiguration.IsFirstLaunch); LOG.Info("Firstlaunch: " + coreConfiguration.IsFirstLaunch);
LOG.Info("Destinations:"); LOG.Info("Destinations:");
if (coreConfiguration.OutputDestinations != null) { if (coreConfiguration.OutputDestinations != null) {
foreach(Destinations destination in coreConfiguration.OutputDestinations) { foreach(Destinations destination in coreConfiguration.OutputDestinations) {
LOG.Info(destination); LOG.Info("\t" + destination);
} }
} }