diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs index 57ec0def7..63160c7de 100644 --- a/Greenshot/Forms/MainForm.cs +++ b/Greenshot/Forms/MainForm.cs @@ -1150,7 +1150,7 @@ namespace Greenshot { return; } // The right button will automatically be handled with the context menu, here we only check the left. - if (conf.DoubleClickAction == ClickActions.NOTHING) { + if (conf.DoubleClickAction == ClickActions.DO_NOTHING) { // As there isn't a double-click we can start the Left click NotifyIconClick(conf.LeftClickAction); // ready with the test @@ -1212,7 +1212,10 @@ namespace Greenshot { CaptureHelper.CaptureFile(conf.OutputFileAsFullpath, DestinationHelper.GetDestination(EditorDestination.DESIGNATION)); } break; - case ClickActions.CONTEXT_MENU: + case ClickActions.OPEN_SETTINGS: + ShowSetting(); + break; + case ClickActions.SHOW_CONTEXT_MENU: MethodInfo oMethodInfo = typeof(NotifyIcon).GetMethod("ShowContextMenu", BindingFlags.Instance | BindingFlags.NonPublic); oMethodInfo.Invoke(notifyIcon, null); break; diff --git a/GreenshotPlugin/Core/CoreConfiguration.cs b/GreenshotPlugin/Core/CoreConfiguration.cs index b0f54957f..200e46d01 100644 --- a/GreenshotPlugin/Core/CoreConfiguration.cs +++ b/GreenshotPlugin/Core/CoreConfiguration.cs @@ -44,10 +44,11 @@ namespace GreenshotPlugin.Core { } public enum ClickActions { - NOTHING, + DO_NOTHING, OPEN_LAST_IN_EXPLORER, OPEN_LAST_IN_EDITOR, - CONTEXT_MENU + OPEN_SETTINGS, + SHOW_CONTEXT_MENU } /// @@ -212,8 +213,8 @@ namespace GreenshotPlugin.Core { [IniProperty("WindowCornerCutShape", Description = "The cutshape which is used to remove the window corners, is mirrorred for all corners", DefaultValue = "5,3,2,1,1")] public List WindowCornerCutShape; - - [IniProperty("LeftClickAction", Description = "Specify what action is made if the tray icon is left clicked, if a double-click action is specified this action is initiated after a delay (configurable via the windows double-click speed)", DefaultValue = "CONTEXT_MENU")] + + [IniProperty("LeftClickAction", Description = "Specify what action is made if the tray icon is left clicked, if a double-click action is specified this action is initiated after a delay (configurable via the windows double-click speed)", DefaultValue = "SHOW_CONTEXT_MENU")] public ClickActions LeftClickAction; [IniProperty("DoubleClickAction", Description = "Specify what action is made if the tray icon is double clicked", DefaultValue = "OPEN_LAST_IN_EXPLORER")] diff --git a/GreenshotPlugin/IniFile/IniValue.cs b/GreenshotPlugin/IniFile/IniValue.cs index 990d3d9a6..6887dc08e 100644 --- a/GreenshotPlugin/IniFile/IniValue.cs +++ b/GreenshotPlugin/IniFile/IniValue.cs @@ -288,9 +288,12 @@ namespace Greenshot.IniFile { newValue = null; if (!defaultUsed) { try { + LOG.WarnFormat("Problem '{0}' while converting {1} to type {2} trying fallback...", ex1.Message, propertyValue, valueType.FullName); newValue = ConvertStringToValueType(valueType, defaultValue, attributes.Separator); + this.ContainingIniSection.IsDirty = true; + LOG.InfoFormat("Used default value {0} for property {1}", defaultValue, propertyName); } catch (Exception ex2) { - LOG.Warn("Problem converting " + propertyValue + " to type " + valueType.FullName, ex2); + LOG.Warn("Problem converting fallback value " + defaultValue + " to type " + valueType.FullName, ex2); } } else { LOG.Warn("Problem converting " + propertyValue + " to type " + valueType.FullName, ex1);