Skip to content

Commit 9ecd6b9

Browse files
committed
add CopyText keys to open containing/target folders in programs plugin results
1 parent a34136f commit 9ecd6b9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ public List<Result> ContextMenus(IPublicAPI api)
488488
},
489489
IcoPath = "Images/folder.png",
490490
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe838"),
491+
CopyText = Location,
491492
}
492493
};
493494

Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ public List<Result> ContextMenus(IPublicAPI api)
267267
},
268268
IcoPath = "Images/folder.png",
269269
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe838"),
270+
CopyText = ParentDirectory,
270271
},
271272
};
272273
if (Extension(FullPath) == ShortcutExtension)
@@ -278,16 +279,18 @@ public List<Result> ContextMenus(IPublicAPI api)
278279

279280
private Result OpenTargetFolderContextMenuResult(IPublicAPI api)
280281
{
282+
var ParentDirectory = Path.GetDirectoryName(ExecutablePath);
281283
return new Result
282284
{
283285
Title = api.GetTranslation("flowlauncher_plugin_program_open_target_folder"),
284286
Action = _ =>
285287
{
286-
api.OpenDirectory(Path.GetDirectoryName(ExecutablePath), ExecutablePath);
288+
api.OpenDirectory(ParentDirectory, ExecutablePath);
287289
return true;
288290
},
289291
IcoPath = "Images/folder.png",
290292
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\xe8de"),
293+
CopyText = ParentDirectory,
291294
};
292295
}
293296

0 commit comments

Comments
 (0)