File tree Expand file tree Collapse file tree 1 file changed +18
-12
lines changed
Plugins/Flow.Launcher.Plugin.Program/Programs Expand file tree Collapse file tree 1 file changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -267,22 +267,28 @@ public List<Result> ContextMenus(IPublicAPI api)
267
267
IcoPath = "Images/folder.png" ,
268
268
Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\xe838 " ) ,
269
269
} ,
270
- new Result
271
- {
272
- Title = api . GetTranslation ( "flowlauncher_plugin_program_open_target_folder" ) ,
273
- Action = _ =>
274
- {
275
- Main . Context . API . OpenDirectory ( Path . GetDirectoryName ( ExecutablePath ) , ExecutablePath ) ;
276
-
277
- return true ;
278
- } ,
279
- IcoPath = "Images/folder.png" ,
280
- Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\xe8de " ) ,
281
- } ,
282
270
} ;
271
+ if ( Extension ( FullPath ) == ShortcutExtension )
272
+ {
273
+ contextMenus . Add ( OpenTargetFolderContextMenuResult ( api ) ) ;
274
+ }
283
275
return contextMenus ;
284
276
}
285
277
278
+ private Result OpenTargetFolderContextMenuResult ( IPublicAPI api )
279
+ {
280
+ return new Result
281
+ {
282
+ Title = api . GetTranslation ( "flowlauncher_plugin_program_open_target_folder" ) ,
283
+ Action = _ =>
284
+ {
285
+ api . OpenDirectory ( Path . GetDirectoryName ( ExecutablePath ) , ExecutablePath ) ;
286
+ return true ;
287
+ } ,
288
+ IcoPath = "Images/folder.png" ,
289
+ Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\xe8de " ) ,
290
+ } ;
291
+ }
286
292
287
293
public override string ToString ( )
288
294
{
You can’t perform that action at this time.
0 commit comments