From acba2dd1a39d0f73421dad0c202a463820fb787f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Sat, 22 May 2021 17:23:25 +0800 Subject: [PATCH 01/19] Add specific keyword for path explore in explorer plugin --- .editorconfig | 4 ++ Flow.Launcher.Test/Flow.Launcher.Test.csproj | 4 ++ Flow.Launcher.sln | 1 + .../Languages/en.xaml | 3 +- Plugins/Flow.Launcher.Plugin.Explorer/Main.cs | 4 +- .../Search/EnvironmentVariables.cs | 6 +-- .../Search/SearchManager.cs | 41 ++++++++++++++----- .../Flow.Launcher.Plugin.Explorer/Settings.cs | 2 + .../ViewModels/SettingsViewModel.cs | 31 ++++++++++---- .../Views/ActionKeywordSetting.xaml.cs | 14 +++---- .../Views/ExplorerSettings.xaml | 2 +- .../Views/ExplorerSettings.xaml.cs | 41 +++++++++++-------- 12 files changed, 106 insertions(+), 47 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..d69b8462e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] + +# IDE0011: 添加大括号 +csharp_prefer_braces = when_multiline diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index 1d0dce5e7..5906e6093 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -38,6 +38,10 @@ + + + + diff --git a/Flow.Launcher.sln b/Flow.Launcher.sln index 21c3b47dc..46c4488a1 100644 --- a/Flow.Launcher.sln +++ b/Flow.Launcher.sln @@ -45,6 +45,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.Url", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FFD651C7-0546-441F-BC8C-D4EE8FD01EA7}" ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig .gitattributes = .gitattributes .gitignore = .gitignore appveyor.yml = appveyor.yml diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml index 9ba0da3f6..3a1a1fb05 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml @@ -19,7 +19,8 @@ Quick Access Links Index Search Excluded Paths Indexing Options - Search Activation: + Index Search Activation: + Path Explore Activation: File Content Search: diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs index 8204e755c..92b7c95a0 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs @@ -28,7 +28,7 @@ namespace Flow.Launcher.Plugin.Explorer return new ExplorerSettings(viewModel); } - public async Task InitAsync(PluginInitContext context) + public Task InitAsync(PluginInitContext context) { Context = context; @@ -47,6 +47,8 @@ namespace Flow.Launcher.Plugin.Explorer contextMenu = new ContextMenu(Context, Settings, viewModel); searchManager = new SearchManager(Settings, Context); ResultManager.Init(Context); + + return Task.CompletedTask; } public List LoadContextMenus(Result selectedResult) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/EnvironmentVariables.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/EnvironmentVariables.cs index 1e9815cb9..595ac3610 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/EnvironmentVariables.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/EnvironmentVariables.cs @@ -10,10 +10,10 @@ namespace Flow.Launcher.Plugin.Explorer.Search { internal static bool IsEnvironmentVariableSearch(string search) { - return LoadEnvironmentStringPaths().Count > 0 - && search.StartsWith("%") + return search.StartsWith("%") && search != "%%" - && !search.Contains("\\"); + && !search.Contains("\\") && + LoadEnvironmentStringPaths().Count > 0; } internal static Dictionary LoadEnvironmentStringPaths() diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index e9b4b0fc1..1cb82b75f 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -39,21 +39,47 @@ namespace Flow.Launcher.Plugin.Explorer.Search internal async Task> SearchAsync(Query query, CancellationToken token) { - var results = new HashSet(PathEqualityComparator.Instance); - var querySearch = query.Search; if (IsFileContentSearch(query.ActionKeyword)) return await WindowsIndexFileContentSearchAsync(query, querySearch, token).ConfigureAwait(false); + var result = new HashSet(PathEqualityComparator.Instance); + + if (ActionKeywordMatch(query, settings.PathSearchActionKeyword)) + { + result.UnionWith(await PathSearchAsync(query, token).ConfigureAwait(false)); + } + + if (ActionKeywordMatch(query, settings.SearchActionKeyword) && + querySearch.Length > 0 && + !querySearch.IsLocationPathString()) + { + result.UnionWith(await WindowsIndexFilesAndFoldersSearchAsync(query, querySearch, token).ConfigureAwait(false)); + } + + return result.ToList(); + } + + private bool ActionKeywordMatch(Query query, string actionKeyword) + { + return query.ActionKeyword == actionKeyword || + query.ActionKeyword.Length == 0 && actionKeyword == Query.GlobalPluginWildcardSign; + } + + public async Task> PathSearchAsync(Query query, CancellationToken token = default) + { + var querySearch = query.Search; + // This allows the user to type the assigned action keyword and only see the list of quick folder links if (string.IsNullOrEmpty(query.Search)) return QuickAccess.AccessLinkListAll(query, settings.QuickAccessLinks); + var results = new HashSet(PathEqualityComparator.Instance); + var quickaccessLinks = QuickAccess.AccessLinkListMatched(query, settings.QuickAccessLinks); - if (quickaccessLinks.Count > 0) - results.UnionWith(quickaccessLinks); + results.UnionWith(quickaccessLinks); var isEnvironmentVariable = EnvironmentVariables.IsEnvironmentVariableSearch(querySearch); @@ -63,13 +89,6 @@ namespace Flow.Launcher.Plugin.Explorer.Search // Query is a location path with a full environment variable, eg. %appdata%\somefolder\ var isEnvironmentVariablePath = querySearch[1..].Contains("%\\"); - if (!querySearch.IsLocationPathString() && !isEnvironmentVariablePath) - { - results.UnionWith(await WindowsIndexFilesAndFoldersSearchAsync(query, querySearch, token).ConfigureAwait(false)); - - return results.ToList(); - } - var locationPath = querySearch; if (isEnvironmentVariablePath) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs index a8eac986d..e078bca67 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs @@ -20,5 +20,7 @@ namespace Flow.Launcher.Plugin.Explorer public string SearchActionKeyword { get; set; } = Query.GlobalPluginWildcardSign; public string FileContentSearchActionKeyword { get; set; } = Constants.DefaultContentSearchActionKeyword; + + public string PathSearchActionKeyword { get; set; } = Query.GlobalPluginWildcardSign; } } \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs index 92932bf4c..9d4019b9a 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs @@ -41,19 +41,36 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels Process.Start(psi); } - internal void UpdateActionKeyword(string newActionKeyword, string oldActionKeyword) + internal void UpdateActionKeyword(ActionKeywordProperty modifiedActionKeyword, string newActionKeyword, string oldActionKeyword) { - PluginManager.ReplaceActionKeyword(Context.CurrentPluginMetadata.ID, oldActionKeyword, newActionKeyword); + if (Settings.SearchActionKeyword == Settings.PathSearchActionKeyword) + PluginManager.AddActionKeyword(Context.CurrentPluginMetadata.ID, newActionKeyword); + else + PluginManager.ReplaceActionKeyword(Context.CurrentPluginMetadata.ID, oldActionKeyword, newActionKeyword); - if (Settings.FileContentSearchActionKeyword == oldActionKeyword) - Settings.FileContentSearchActionKeyword = newActionKeyword; - - if (Settings.SearchActionKeyword == oldActionKeyword) - Settings.SearchActionKeyword = newActionKeyword; + switch (modifiedActionKeyword) + { + case ActionKeywordProperty.SearchActionKeyword: + Settings.SearchActionKeyword = newActionKeyword; + break; + case ActionKeywordProperty.PathSearchActionKeyword: + Settings.PathSearchActionKeyword = newActionKeyword; + break; + case ActionKeywordProperty.FileContentSearchActionKeyword: + Settings.FileContentSearchActionKeyword = newActionKeyword; + break; + } } internal bool IsActionKeywordAlreadyAssigned(string newActionKeyword) => PluginManager.ActionKeywordRegistered(newActionKeyword); internal bool IsNewActionKeywordGlobal(string newActionKeyword) => newActionKeyword == Query.GlobalPluginWildcardSign; } + + public enum ActionKeywordProperty + { + SearchActionKeyword, + PathSearchActionKeyword, + FileContentSearchActionKeyword + } } diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs index 2957283ad..d1040f746 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs @@ -23,6 +23,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views private ActionKeywordView currentActionKeyword; + private List actionKeywordListView; public ActionKeywordSetting(SettingsViewModel settingsViewModel, List actionKeywordListView, ActionKeywordView selectedActionKeyword) @@ -35,7 +36,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views txtCurrentActionKeyword.Text = selectedActionKeyword.Keyword; - this.actionKeywordListView = actionKeywordListView; + this.actionKeywordListView = actionKeywordListView; } private void OnConfirmButtonClick(object sender, RoutedEventArgs e) @@ -52,20 +53,19 @@ namespace Flow.Launcher.Plugin.Explorer.Views return; } - if (settingsViewModel.IsNewActionKeywordGlobal(newActionKeyword) - && currentActionKeyword.Description - == settingsViewModel.Context.API.GetTranslation("plugin_explorer_actionkeywordview_filecontentsearch")) + if (settingsViewModel.IsNewActionKeywordGlobal(newActionKeyword) + && currentActionKeyword.KeywordProperty == ActionKeywordProperty.FileContentSearchActionKeyword) { MessageBox.Show(settingsViewModel.Context.API.GetTranslation("plugin_explorer_globalActionKeywordInvalid")); return; } - + if (!settingsViewModel.IsActionKeywordAlreadyAssigned(newActionKeyword)) { - settingsViewModel.UpdateActionKeyword(newActionKeyword, currentActionKeyword.Keyword); + settingsViewModel.UpdateActionKeyword(currentActionKeyword.KeywordProperty, newActionKeyword, currentActionKeyword.Keyword); - actionKeywordListView.Where(x => x.Description == currentActionKeyword.Description).FirstOrDefault().Keyword = newActionKeyword; + actionKeywordListView.FirstOrDefault(x => x.Description == currentActionKeyword.Description).Keyword = newActionKeyword; Close(); diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml index b4795ec8b..ce6dbba36 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml @@ -24,7 +24,7 @@ Margin="0,5,0,0" /> + Margin="250,5,0,0" /> diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs index 26f169c92..b8c9a605a 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs @@ -35,16 +35,24 @@ namespace Flow.Launcher.Plugin.Explorer.Views actionKeywordsListView = new List { - new ActionKeywordView() - { - Description = viewModel.Context.API.GetTranslation("plugin_explorer_actionkeywordview_search"), - Keyword = this.viewModel.Settings.SearchActionKeyword - }, - new ActionKeywordView() - { - Description = viewModel.Context.API.GetTranslation("plugin_explorer_actionkeywordview_filecontentsearch"), - Keyword = this.viewModel.Settings.FileContentSearchActionKeyword - } + new () + { + Description = viewModel.Context.API.GetTranslation("plugin_explorer_actionkeywordview_search"), + Keyword = this.viewModel.Settings.SearchActionKeyword, + KeywordProperty = ActionKeywordProperty.SearchActionKeyword + }, + new () + { + Description = viewModel.Context.API.GetTranslation("plugin_explorer_actionkeywordview_filecontentsearch"), + Keyword = this.viewModel.Settings.FileContentSearchActionKeyword, + KeywordProperty = ActionKeywordProperty.FileContentSearchActionKeyword + }, + new () + { + Description = viewModel.Context.API.GetTranslation("plugin_explorer_actionkeywordview_path"), + Keyword = this.viewModel.Settings.PathSearchActionKeyword, + KeywordProperty = ActionKeywordProperty.PathSearchActionKeyword + } }; lbxActionKeywords.ItemsSource = actionKeywordsListView; @@ -71,7 +79,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views && btnEdit.Visibility == Visibility.Hidden) btnEdit.Visibility = Visibility.Visible; - if ((lbxAccessLinks.Items.Count == 0 && lbxExcludedPaths.Items.Count == 0) + if (lbxAccessLinks.Items.Count == 0 && lbxExcludedPaths.Items.Count == 0 && btnDelete.Visibility == Visibility.Visible && btnEdit.Visibility == Visibility.Visible) { @@ -122,7 +130,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views private void expActionKeywords_Collapsed(object sender, RoutedEventArgs e) { if (!expActionKeywords.IsExpanded) - expActionKeywords.Height = Double.NaN; + expActionKeywords.Height = double.NaN; } private void expAccessLinks_Click(object sender, RoutedEventArgs e) @@ -135,20 +143,20 @@ namespace Flow.Launcher.Plugin.Explorer.Views if (expActionKeywords.IsExpanded) expActionKeywords.IsExpanded = false; - + RefreshView(); } private void expAccessLinks_Collapsed(object sender, RoutedEventArgs e) { if (!expAccessLinks.IsExpanded) - expAccessLinks.Height = Double.NaN; + expAccessLinks.Height = double.NaN; } private void expExcludedPaths_Click(object sender, RoutedEventArgs e) { if (expExcludedPaths.IsExpanded) - expAccessLinks.Height = Double.NaN; + expAccessLinks.Height = double.NaN; if (expAccessLinks.IsExpanded) expAccessLinks.IsExpanded = false; @@ -161,7 +169,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views private void btnDelete_Click(object sender, RoutedEventArgs e) { - var selectedRow = lbxAccessLinks.SelectedItem as AccessLink?? lbxExcludedPaths.SelectedItem as AccessLink; + var selectedRow = lbxAccessLinks.SelectedItem as AccessLink ?? lbxExcludedPaths.SelectedItem as AccessLink; if (selectedRow != null) { @@ -315,6 +323,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views { public string Description { get; set; } + public ActionKeywordProperty KeywordProperty { get; init; } public string Keyword { get; set; } } } From 972a291be3d01e96e2f4d1f2cb920bd71afab236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Sat, 22 May 2021 17:26:49 +0800 Subject: [PATCH 02/19] add Chinese translation --- Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml index c4a2322b2..1aed9bf29 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/zh-cn.xaml @@ -20,6 +20,7 @@ 索引搜索排除的路径 索引选项 搜索激活: + 路径搜索激活: 文件内容搜索: From e4a15b453baa3405183b720b7c430523d5d6adf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Fri, 28 May 2021 17:43:06 +0800 Subject: [PATCH 03/19] remove unexpected editor config --- .editorconfig | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index d69b8462e..000000000 --- a/.editorconfig +++ /dev/null @@ -1,4 +0,0 @@ -[*.cs] - -# IDE0011: 添加大括号 -csharp_prefer_braces = when_multiline From 7e799b5625b407cc0347e8331ef10c2c40de1834 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 29 May 2021 20:08:34 +1000 Subject: [PATCH 04/19] keep search activation, enable and disable path and index search --- .../Languages/en.xaml | 2 + .../Search/SearchManager.cs | 15 ++++-- .../Flow.Launcher.Plugin.Explorer/Settings.cs | 6 +++ .../ViewModels/SettingsViewModel.cs | 6 ++- .../Views/ActionKeywordSetting.xaml | 6 ++- .../Views/ActionKeywordSetting.xaml.cs | 54 +++++++++++++++---- .../Views/ExplorerSettings.xaml.cs | 16 +++++- .../Flow.Launcher.Plugin.Explorer/plugin.json | 6 ++- 8 files changed, 88 insertions(+), 23 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml index 3a1a1fb05..71b16f159 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml @@ -22,6 +22,8 @@ Index Search Activation: Path Explore Activation: File Content Search: + Index Only Search: + (Disabled) Explorer diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index 1cb82b75f..4ff6070d4 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -46,12 +46,12 @@ namespace Flow.Launcher.Plugin.Explorer.Search var result = new HashSet(PathEqualityComparator.Instance); - if (ActionKeywordMatch(query, settings.PathSearchActionKeyword)) + if (ActionKeywordMatch(query, settings.PathSearchActionKeyword) || ActionKeywordMatch(query, settings.SearchActionKeyword)) { result.UnionWith(await PathSearchAsync(query, token).ConfigureAwait(false)); } - if (ActionKeywordMatch(query, settings.SearchActionKeyword) && + if ((ActionKeywordMatch(query, settings.IndexOnlySearchActionKeyword) || ActionKeywordMatch(query, settings.SearchActionKeyword)) && querySearch.Length > 0 && !querySearch.IsLocationPathString()) { @@ -61,10 +61,15 @@ namespace Flow.Launcher.Plugin.Explorer.Search return result.ToList(); } - private bool ActionKeywordMatch(Query query, string actionKeyword) + private bool ActionKeywordMatch(Query query, string allowedActionKeyword) { - return query.ActionKeyword == actionKeyword || - query.ActionKeyword.Length == 0 && actionKeyword == Query.GlobalPluginWildcardSign; + if (settings.EnabledIndexOnlySearchKeyword && (settings.IndexOnlySearchActionKeyword == Query.GlobalPluginWildcardSign || query.ActionKeyword == allowedActionKeyword)) + return true; + + if (settings.EnabledPathSearchKeyword && (settings.PathSearchActionKeyword == Query.GlobalPluginWildcardSign || query.ActionKeyword == allowedActionKeyword)) + return true; + + return settings.SearchActionKeyword == Query.GlobalPluginWildcardSign || query.ActionKeyword == allowedActionKeyword; } public async Task> PathSearchAsync(Query query, CancellationToken token = default) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs index e078bca67..0359b00f7 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs @@ -22,5 +22,11 @@ namespace Flow.Launcher.Plugin.Explorer public string FileContentSearchActionKeyword { get; set; } = Constants.DefaultContentSearchActionKeyword; public string PathSearchActionKeyword { get; set; } = Query.GlobalPluginWildcardSign; + + public bool EnabledPathSearchKeyword { get; set; } + + public string IndexOnlySearchActionKeyword { get; set; } = Query.GlobalPluginWildcardSign; + + public bool EnabledIndexOnlySearchKeyword { get; set; } } } \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs index 9d4019b9a..ae84f92d4 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs @@ -59,6 +59,9 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels case ActionKeywordProperty.FileContentSearchActionKeyword: Settings.FileContentSearchActionKeyword = newActionKeyword; break; + case ActionKeywordProperty.IndexOnlySearchActionKeyword: + Settings.IndexOnlySearchActionKeyword = newActionKeyword; + break; } } @@ -71,6 +74,7 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels { SearchActionKeyword, PathSearchActionKeyword, - FileContentSearchActionKeyword + FileContentSearchActionKeyword, + IndexOnlySearchActionKeyword } } diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml index 0e1c7e872..b49ae3465 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml @@ -16,6 +16,7 @@ + @@ -23,8 +24,9 @@ Margin="10" Grid.Row="0" Width="105" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" /> - - + +