[PT Run] Folder plugin: Improvements for the results (#16867)

* Improvements

* fix spelling

* text improvement

* fix build

* update tipp text
This commit is contained in:
Heiko
2022-03-22 12:07:09 +01:00
committed by GitHub
parent fcc1d46b63
commit 889bc1e514
7 changed files with 15 additions and 7 deletions

View File

@@ -2,6 +2,8 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Globalization;
using System.IO;
using Wox.Plugin;
namespace Microsoft.Plugin.Folder.Sources.Result
@@ -27,12 +29,14 @@ namespace Microsoft.Plugin.Folder.Sources.Result
{
return new Wox.Plugin.Result
{
Title = Properties.Resources.wox_plugin_folder_select_folder_first_result_title,
Title = string.Format(CultureInfo.InvariantCulture, Properties.Resources.wox_plugin_folder_select_folder_first_result_title, new DirectoryInfo(Search).Name),
QueryTextDisplay = Search,
SubTitle = Properties.Resources.wox_plugin_folder_select_folder_first_result_subtitle,
ToolTipData = new ToolTipData(string.Format(CultureInfo.InvariantCulture, Properties.Resources.wox_plugin_folder_select_folder_first_result_title, new DirectoryInfo(Search).Name), Properties.Resources.wox_plugin_folder_select_folder_first_result_subtitle),
IcoPath = Search,
Score = 500,
Action = c => _shellAction.ExecuteSanitized(Search, contextApi),
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Search },
};
}
}

View File

@@ -36,6 +36,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
// Using CurrentCulture since this is user facing
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Path),
ToolTipData = new ToolTipData(Title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Path)),
QueryTextDisplay = Path,
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Path },
Action = c => _shellAction.Execute(Path, contextApi),

View File

@@ -39,6 +39,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
// Using CurrentCulture since this is user facing
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_file_result_subtitle, FilePath),
ToolTipData = new ToolTipData(Title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_file_result_subtitle, FilePath)),
IcoPath = FilePath,
Action = c => ShellAction.Execute(FilePath, contextApi),
ContextData = new SearchResult { Type = ResultType.File, FullPath = FilePath },

View File

@@ -40,6 +40,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
// Using CurrentCulture since this is user facing
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Subtitle),
ToolTipData = new ToolTipData(Title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Subtitle)),
QueryTextDisplay = Path,
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Path },
Action = c => ShellAction.Execute(Path, contextApi),

View File

@@ -26,6 +26,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
// Using CurrentCulture since this is user facing
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.Microsoft_plugin_folder_truncation_warning_subtitle, PostTruncationCount, PreTruncationCount),
ToolTipData = new ToolTipData(Properties.Resources.Microsoft_plugin_folder_truncation_warning_title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.Microsoft_plugin_folder_truncation_warning_subtitle, PostTruncationCount, PreTruncationCount)),
IcoPath = WarningIconPath,
};
}