Skip to content

Commit 2330454

Browse files
committed
Fix wording and images for context menu
1 parent 0d0aa49 commit 2330454

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

Plugins/Wox.Plugin.Folder/ContextMenuLoader.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Threading.Tasks;
66
using System.Windows;
77
using Wox.Infrastructure.Logger;
8+
using Wox.Infrastructure.Image;
89
using Wox.Plugin.SharedCommands;
910

1011
namespace Wox.Plugin.Folder
@@ -33,8 +34,8 @@ public List<Result> LoadContextMenus(Result selectedResult)
3334
var fileOrFolder = (record.Type == ResultType.File) ? "file" : "folder";
3435
contextMenus.Add(new Result
3536
{
36-
Title = "Copy Path",
37-
SubTitle = $"Copy the path of {fileOrFolder} into the clipboard",
37+
Title = "Copy path",
38+
SubTitle = $"Copy the current {fileOrFolder} path to clipboard",
3839
Action = (context) =>
3940
{
4041
try
@@ -50,13 +51,13 @@ public List<Result> LoadContextMenus(Result selectedResult)
5051
return false;
5152
}
5253
},
53-
IcoPath = icoPath
54+
IcoPath = Main.CopyImagePath
5455
});
5556

5657
contextMenus.Add(new Result
5758
{
58-
Title = "Copy",
59-
SubTitle = $"Copy the {fileOrFolder} to the clipboard",
59+
Title = $"Copy {fileOrFolder}",
60+
SubTitle = $"Copy the {fileOrFolder} to clipboard",
6061
Action = (context) =>
6162
{
6263
try
@@ -79,7 +80,8 @@ public List<Result> LoadContextMenus(Result selectedResult)
7980
if (record.Type == ResultType.File || record.Type == ResultType.Folder)
8081
contextMenus.Add(new Result
8182
{
82-
Title = "Delete",
83+
Title = $"Delete {fileOrFolder}",
84+
SubTitle = $"Delete the selected {fileOrFolder}",
8385
Action = (context) =>
8486
{
8587
try
@@ -99,7 +101,7 @@ public List<Result> LoadContextMenus(Result selectedResult)
99101

100102
return true;
101103
},
102-
IcoPath = icoPath
104+
IcoPath = Main.DeleteFileFolderImagePath
103105
});
104106

105107
if (record.Type == ResultType.File && CanRunAsDifferentUser(record.FullPath))
19.3 KB
Loading

Plugins/Wox.Plugin.Folder/Main.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ public class Main : IPlugin, ISettingProvider, IPluginI18n, ISavable, IContextMe
1414
{
1515
public const string FolderImagePath = "Images\\folder.png";
1616
public const string FileImagePath = "Images\\file.png";
17-
17+
public const string DeleteFileFolderImagePath = "Images\\deletefilefolder.png";
18+
public const string CopyImagePath = "Images\\copy.png";
1819

1920
private static List<string> _driverNames;
2021
private PluginInitContext _context;

Plugins/Wox.Plugin.Folder/Wox.Plugin.Folder.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181
<None Include="Images\copy.png">
8282
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
8383
</None>
84+
<None Include="Images\deletefilefolder.png">
85+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
86+
</None>
8487
<Content Include="Images\file.png">
8588
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
8689
</Content>

0 commit comments

Comments
 (0)