mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Only show target folder context menu for .lnk files
This commit is contained in:
parent
ec7ecfacd0
commit
f73e3d57d6
1 changed files with 18 additions and 12 deletions
|
|
@ -267,22 +267,28 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
IcoPath = "Images/folder.png",
|
||||
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe838"),
|
||||
},
|
||||
new Result
|
||||
{
|
||||
Title = api.GetTranslation("flowlauncher_plugin_program_open_target_folder"),
|
||||
Action = _ =>
|
||||
{
|
||||
Main.Context.API.OpenDirectory(Path.GetDirectoryName(ExecutablePath), ExecutablePath);
|
||||
|
||||
return true;
|
||||
},
|
||||
IcoPath = "Images/folder.png",
|
||||
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe8de"),
|
||||
},
|
||||
};
|
||||
if (Extension(FullPath) == ShortcutExtension)
|
||||
{
|
||||
contextMenus.Add(OpenTargetFolderContextMenuResult(api));
|
||||
}
|
||||
return contextMenus;
|
||||
}
|
||||
|
||||
private Result OpenTargetFolderContextMenuResult(IPublicAPI api)
|
||||
{
|
||||
return new Result
|
||||
{
|
||||
Title = api.GetTranslation("flowlauncher_plugin_program_open_target_folder"),
|
||||
Action = _ =>
|
||||
{
|
||||
api.OpenDirectory(Path.GetDirectoryName(ExecutablePath), ExecutablePath);
|
||||
return true;
|
||||
},
|
||||
IcoPath = "Images/folder.png",
|
||||
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe8de"),
|
||||
};
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue