File tree Expand file tree Collapse file tree 4 files changed +62
-2
lines changed
Plugins/Flow.Launcher.Plugin.Explorer Expand file tree Collapse file tree 4 files changed +62
-2
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,19 @@ public List<Result> LoadContextMenus(Result selectedResult)
282
282
283
283
if ( record . Type is ResultType . File or ResultType . Folder )
284
284
{
285
- var menuItems = ShellContextMenuDisplayHelper . GetContextMenuWithIcons ( record . FullPath ) ;
285
+ var filters = Settings
286
+ . WindowsContextMenuIgnoredItems
287
+ . Replace ( "\r " , "" )
288
+ . Split ( "\n " )
289
+ . Where ( v => ! string . IsNullOrWhiteSpace ( v ) )
290
+ . ToArray ( ) ;
291
+ var menuItems = ShellContextMenuDisplayHelper
292
+ . GetContextMenuWithIcons ( record . FullPath )
293
+ . Where ( contextMenuItem =>
294
+ filters . Length == 0 || ! filters . Any ( filter =>
295
+ contextMenuItem . Label . Contains ( filter , StringComparison . OrdinalIgnoreCase )
296
+ )
297
+ ) ;
286
298
foreach ( var menuItem in menuItems )
287
299
{
288
300
contextMenus . Add ( new Result
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ public class Settings
30
30
31
31
public bool ShowWindowsContextMenu { get ; set ; } = true ;
32
32
33
+ public string WindowsContextMenuIgnoredItems { get ; set ; } = string . Empty ;
34
+
33
35
public bool DefaultOpenFolderInFileManager { get ; set ; } = false ;
34
36
35
37
public string SearchActionKeyword { get ; set ; } = Query . GlobalPluginWildcardSign ;
@@ -62,7 +64,7 @@ public class Settings
62
64
public bool ShowModifiedDateInPreviewPanel { get ; set ; } = true ;
63
65
64
66
public string PreviewPanelDateFormat { get ; set ; } = "yyyy-MM-dd" ;
65
-
67
+
66
68
public string PreviewPanelTimeFormat { get ; set ; } = "HH:mm" ;
67
69
68
70
private EverythingSearchManager _everythingManagerInstance ;
Original file line number Diff line number Diff line change @@ -102,6 +102,30 @@ private void InitializeEngineSelection()
102
102
103
103
#endregion
104
104
105
+ #region Native Context Menu
106
+
107
+ public bool ShowWindowsContextMenu
108
+ {
109
+ get => Settings . ShowWindowsContextMenu ;
110
+ set
111
+ {
112
+ Settings . ShowWindowsContextMenu = value ;
113
+ OnPropertyChanged ( ) ;
114
+ }
115
+ }
116
+
117
+ public string WindowsContextMenuIgnoredItems
118
+ {
119
+ get => Settings . WindowsContextMenuIgnoredItems ;
120
+ set
121
+ {
122
+ Settings . WindowsContextMenuIgnoredItems = value ;
123
+ OnPropertyChanged ( ) ;
124
+ }
125
+ }
126
+
127
+ #endregion
128
+
105
129
#region Preview Panel
106
130
107
131
public bool ShowFileSizeInPreviewPanel
Original file line number Diff line number Diff line change 348
348
</StackPanel >
349
349
</StackPanel >
350
350
</TabItem >
351
+ <TabItem
352
+ Width =" Auto"
353
+ Header =" Native Context Menu"
354
+ Style =" {DynamicResource ExplorerTabItem}" >
355
+ <StackPanel Margin =" 30 20 10 10" >
356
+ <CheckBox
357
+ Margin =" 0 10 0 0"
358
+ Content =" Display native context menu (experimental)"
359
+ IsChecked =" {Binding ShowWindowsContextMenu}" />
360
+
361
+ <TextBlock
362
+ Margin =" 0 10"
363
+ Foreground =" {DynamicResource Color05B}"
364
+ Text =" Below you can specify items you want to exclude from context menu, they can be partial (e.g. 'pen wit') or complete ('Open with')" />
365
+
366
+ <TextBox
367
+ Height =" 300"
368
+ AcceptsReturn =" True"
369
+ Text =" {Binding WindowsContextMenuIgnoredItems}"
370
+ TextWrapping =" Wrap" />
371
+ </StackPanel >
372
+ </TabItem >
351
373
<TabItem
352
374
Width =" Auto"
353
375
Header =" {DynamicResource plugin_explorer_previewpanel_setting_header}"
You can’t perform that action at this time.
0 commit comments