diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs index a62ccf73d..1f39e2ba5 100644 --- a/Greenshot/Forms/MainForm.cs +++ b/Greenshot/Forms/MainForm.cs @@ -1119,10 +1119,13 @@ namespace Greenshot { CaptureHelper.CaptureFile(conf.OutputFileAsFullpath, DestinationHelper.GetDestination(EditorDestination.DESIGNATION)); } break; - default: + case LeftClickActions.CONTEXT_MENU: MethodInfo oMethodInfo = typeof(NotifyIcon).GetMethod("ShowContextMenu", BindingFlags.Instance | BindingFlags.NonPublic); oMethodInfo.Invoke(notifyIcon, null); break; + default: + // Do nothing + break; } } } diff --git a/GreenshotPlugin/Core/CoreConfiguration.cs b/GreenshotPlugin/Core/CoreConfiguration.cs index 03cbc7119..8eeaa3167 100644 --- a/GreenshotPlugin/Core/CoreConfiguration.cs +++ b/GreenshotPlugin/Core/CoreConfiguration.cs @@ -42,6 +42,13 @@ namespace GreenshotPlugin.Core { RELEASE_CANDIDATE, RELEASE } + + public enum LeftClickActions { + NOTHING, + OPEN_LAST_IN_EXPLORER, + OPEN_LAST_IN_EDITOR, + CONTEXT_MENU + } /// /// Description of CoreConfiguration. @@ -205,6 +212,9 @@ 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", DefaultValue = "CONTEXT_MENU")] + public LeftClickActions LeftClickAction; // Specifies what THIS build is public BuildStates BuildState = BuildStates.UNSTABLE;