From 724160d2f008e302788da50d1d36973ff972aa2f Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Tue, 29 Nov 2022 18:29:18 +0800 Subject: [PATCH 1/2] Hide openwith editor when editor path is null or empty --- Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index 8e9017bf6..519a45db9 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -39,7 +39,7 @@ namespace Flow.Launcher.Plugin.Explorer var contextMenus = new List(); if (selectedResult.ContextData is SearchResult record) { - if (record.Type == ResultType.File) + if (record.Type == ResultType.File && !string.IsNullOrEmpty(Settings.EditorPath)) contextMenus.Add(CreateOpenWithEditorResult(record)); if (record.Type == ResultType.Folder && record.WindowsIndexed) From ed0b3608abd6439ba0af1d3b578195a10c932006 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Tue, 29 Nov 2022 18:46:37 +0800 Subject: [PATCH 2/2] Hide open windows index context menu when result is not from it --- Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index 519a45db9..bd1aa654a 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -49,7 +49,10 @@ namespace Flow.Launcher.Plugin.Explorer } contextMenus.Add(CreateOpenContainingFolderResult(record)); - contextMenus.Add(CreateOpenWindowsIndexingOptions()); + if (record.WindowsIndexed) + { + contextMenus.Add(CreateOpenWindowsIndexingOptions()); + } if (record.ShowIndexState) contextMenus.Add(new Result