File tree Expand file tree Collapse file tree 2 files changed +16
-15
lines changed
Plugins/Flow.Launcher.Plugin.Explorer Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -365,27 +365,28 @@ private void ShowUnselectedMessage()
365
365
}
366
366
367
367
[ RelayCommand ]
368
- private void AddLink ( object commandParameter )
368
+ private void AddQuickAccessLink ( object commandParameter )
369
369
{
370
- var container = commandParameter switch
371
- {
372
- "QuickAccessLink" => Settings . QuickAccessLinks ,
373
- "IndexSearchExcludedPaths" => Settings . IndexSearchExcludedSubdirectoryPaths ,
374
- _ => throw new ArgumentOutOfRangeException ( nameof ( commandParameter ) )
375
- } ;
376
-
377
- ArgumentNullException . ThrowIfNull ( container ) ;
378
-
370
+ var quickAccessLinkSettings = new QuickAccessLinkSettings ( ) ;
371
+ quickAccessLinkSettings . ShowDialog ( ) ;
372
+ }
373
+
374
+
375
+ [ RelayCommand ]
376
+ private void AddIndexSearchExcludePaths ( object commandParameter )
377
+ {
378
+ var container = Settings . IndexSearchExcludedSubdirectoryPaths ;
379
+
379
380
var folderBrowserDialog = new FolderBrowserDialog ( ) ;
380
-
381
+
381
382
if ( folderBrowserDialog . ShowDialog ( ) != DialogResult . OK )
382
383
return ;
383
-
384
+
384
385
var newAccessLink = new AccessLink
385
386
{
386
387
Path = folderBrowserDialog . SelectedPath
387
388
} ;
388
-
389
+
389
390
container . Add ( newAccessLink ) ;
390
391
}
391
392
Original file line number Diff line number Diff line change 762
762
<Button
763
763
MinWidth =" 100"
764
764
Margin =" {StaticResource SettingPanelItemLeftMargin}"
765
- Command =" {Binding AddLinkCommand }"
765
+ Command =" {Binding AddQuickAccessLinkCommand }"
766
766
CommandParameter =" QuickAccessLink"
767
767
Content =" {DynamicResource plugin_explorer_add}" />
768
768
</StackPanel >
822
822
<Button
823
823
MinWidth =" 100"
824
824
Margin =" {StaticResource SettingPanelItemLeftMargin}"
825
- Command =" {Binding AddLinkCommand }"
825
+ Command =" {Binding AddIndexSearchExcludePathsCommand }"
826
826
CommandParameter =" IndexSearchExcludedPaths"
827
827
Content =" {DynamicResource plugin_explorer_add}" />
828
828
</StackPanel >
You can’t perform that action at this time.
0 commit comments