From 92bbd83b33b8b845c149f1239a850c7a1654c415 Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Thu, 23 Apr 2020 15:10:15 -0700 Subject: [PATCH] Replacing submenu text with full path as 'Ctrl-Enter' doesn't do anything. Also reducing the String of CreateOpenCurrentResult to fit in one line. --- .../launcher/Plugins/Wox.Plugin.Folder/Main.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/modules/launcher/Plugins/Wox.Plugin.Folder/Main.cs b/src/modules/launcher/Plugins/Wox.Plugin.Folder/Main.cs index 0f78fce971..d6d7f34bfd 100644 --- a/src/modules/launcher/Plugins/Wox.Plugin.Folder/Main.cs +++ b/src/modules/launcher/Plugins/Wox.Plugin.Folder/Main.cs @@ -17,8 +17,6 @@ namespace Wox.Plugin.Folder public const string DeleteFileFolderImagePath = "Images\\deletefilefolder.png"; public const string CopyImagePath = "Images\\copy.png"; - private string DefaultFolderSubtitleString = "Ctrl + Enter to open the directory"; - private const string _fileExplorerProgramName = "explorer"; private static List _driverNames; private PluginInitContext _context; @@ -129,7 +127,7 @@ namespace Wox.Plugin.Folder var userFolderLinks = _settings.FolderLinks.Where( x => x.Nickname.StartsWith(search, StringComparison.OrdinalIgnoreCase)); var results = userFolderLinks.Select(item => - CreateFolderResult(item.Nickname, DefaultFolderSubtitleString, item.Path, query)).ToList(); + CreateFolderResult(item.Nickname, item.Path, item.Path, query)).ToList(); return results; } @@ -202,8 +200,6 @@ namespace Wox.Plugin.Folder var folderList = new List(); var fileList = new List(); - var folderSubtitleString = DefaultFolderSubtitleString; - try { // search folder and add results @@ -216,8 +212,7 @@ namespace Wox.Plugin.Folder if(fileSystemInfo is DirectoryInfo) { - if (searchOption == SearchOption.AllDirectories) - folderSubtitleString = fileSystemInfo.FullName; + var folderSubtitleString = fileSystemInfo.FullName; folderList.Add(CreateFolderResult(fileSystemInfo.Name, folderSubtitleString, fileSystemInfo.FullName, query)); } @@ -280,8 +275,8 @@ namespace Wox.Plugin.Folder return new Result { Title = firstResult, - SubTitle = $"Use > to search files and subfolders within {folderName}, " + - $"* to search for file extensions in {folderName} or both >* to combine the search", + SubTitle = $"Use > to search within {folderName}, " + + $"* to search for file extensions in {folderName} or both >* to combine the search.", IcoPath = search, Score = 500, Action = c =>