Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,29 @@ public List<Result> LoadContextMenus(Result selectedResult)
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue8c8")
});

contextMenus.Add(new Result
{
Title = Context.API.GetTranslation("plugin_explorer_copyname"),
SubTitle = Context.API.GetTranslation("plugin_explorer_copyname_subtitle"),
Action = _ =>
{
try
{
Context.API.CopyToClipboard(Path.GetFileName(record.FullPath));
return true;
}
catch (Exception e)
{
var message = "Fail to set text in clipboard";
LogException(message, e);
Context.API.ShowMsg(message);
return false;
}
},
IcoPath = Constants.CopyImagePath,
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue8c8")
});

contextMenus.Add(new Result
{
Title = Context.API.GetTranslation("plugin_explorer_copyfilefolder"),
Expand Down
2 changes: 2 additions & 0 deletions Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
<!-- Context menu items -->
<system:String x:Key="plugin_explorer_copypath">Copy path</system:String>
<system:String x:Key="plugin_explorer_copypath_subtitle">Copy path of current item to clipboard</system:String>
<system:String x:Key="plugin_explorer_copyname">Copy name</system:String>
<system:String x:Key="plugin_explorer_copyname_subtitle">Copy name of current item to clipboard</system:String>
<system:String x:Key="plugin_explorer_copyfilefolder">Copy</system:String>
<system:String x:Key="plugin_explorer_copyfile_subtitle">Copy current file to clipboard</system:String>
<system:String x:Key="plugin_explorer_copyfolder_subtitle">Copy current folder to clipboard</system:String>
Expand Down
1 change: 0 additions & 1 deletion Plugins/Flow.Launcher.Plugin.Explorer/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using Flow.Launcher.Plugin.Explorer.Exceptions;

Expand Down
Loading