mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 05:06:36 +02:00
Fix wording and images for context menu
This commit is contained in:
@@ -5,6 +5,7 @@ using System.IO;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using Wox.Infrastructure.Logger;
|
using Wox.Infrastructure.Logger;
|
||||||
|
using Wox.Infrastructure.Image;
|
||||||
using Wox.Plugin.SharedCommands;
|
using Wox.Plugin.SharedCommands;
|
||||||
|
|
||||||
namespace Wox.Plugin.Folder
|
namespace Wox.Plugin.Folder
|
||||||
@@ -33,8 +34,8 @@ namespace Wox.Plugin.Folder
|
|||||||
var fileOrFolder = (record.Type == ResultType.File) ? "file" : "folder";
|
var fileOrFolder = (record.Type == ResultType.File) ? "file" : "folder";
|
||||||
contextMenus.Add(new Result
|
contextMenus.Add(new Result
|
||||||
{
|
{
|
||||||
Title = "Copy Path",
|
Title = "Copy path",
|
||||||
SubTitle = $"Copy the path of {fileOrFolder} into the clipboard",
|
SubTitle = $"Copy the current {fileOrFolder} path to clipboard",
|
||||||
Action = (context) =>
|
Action = (context) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -50,13 +51,13 @@ namespace Wox.Plugin.Folder
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
IcoPath = icoPath
|
IcoPath = Main.CopyImagePath
|
||||||
});
|
});
|
||||||
|
|
||||||
contextMenus.Add(new Result
|
contextMenus.Add(new Result
|
||||||
{
|
{
|
||||||
Title = "Copy",
|
Title = $"Copy {fileOrFolder}",
|
||||||
SubTitle = $"Copy the {fileOrFolder} to the clipboard",
|
SubTitle = $"Copy the {fileOrFolder} to clipboard",
|
||||||
Action = (context) =>
|
Action = (context) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -79,7 +80,8 @@ namespace Wox.Plugin.Folder
|
|||||||
if (record.Type == ResultType.File || record.Type == ResultType.Folder)
|
if (record.Type == ResultType.File || record.Type == ResultType.Folder)
|
||||||
contextMenus.Add(new Result
|
contextMenus.Add(new Result
|
||||||
{
|
{
|
||||||
Title = "Delete",
|
Title = $"Delete {fileOrFolder}",
|
||||||
|
SubTitle = $"Delete the selected {fileOrFolder}",
|
||||||
Action = (context) =>
|
Action = (context) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -99,7 +101,7 @@ namespace Wox.Plugin.Folder
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
IcoPath = icoPath
|
IcoPath = Main.DeleteFileFolderImagePath
|
||||||
});
|
});
|
||||||
|
|
||||||
if (record.Type == ResultType.File && CanRunAsDifferentUser(record.FullPath))
|
if (record.Type == ResultType.File && CanRunAsDifferentUser(record.FullPath))
|
||||||
|
|||||||
BIN
Plugins/Wox.Plugin.Folder/Images/deletefilefolder.png
Normal file
BIN
Plugins/Wox.Plugin.Folder/Images/deletefilefolder.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -14,7 +14,8 @@ namespace Wox.Plugin.Folder
|
|||||||
{
|
{
|
||||||
public const string FolderImagePath = "Images\\folder.png";
|
public const string FolderImagePath = "Images\\folder.png";
|
||||||
public const string FileImagePath = "Images\\file.png";
|
public const string FileImagePath = "Images\\file.png";
|
||||||
|
public const string DeleteFileFolderImagePath = "Images\\deletefilefolder.png";
|
||||||
|
public const string CopyImagePath = "Images\\copy.png";
|
||||||
|
|
||||||
private static List<string> _driverNames;
|
private static List<string> _driverNames;
|
||||||
private PluginInitContext _context;
|
private PluginInitContext _context;
|
||||||
|
|||||||
@@ -81,6 +81,9 @@
|
|||||||
<None Include="Images\copy.png">
|
<None Include="Images\copy.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="Images\deletefilefolder.png">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<Content Include="Images\file.png">
|
<Content Include="Images\file.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|||||||
Reference in New Issue
Block a user