diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs index 9183adc7b..8d2c6df24 100644 --- a/Flow.Launcher.Core/Plugin/PluginManager.cs +++ b/Flow.Launcher.Core/Plugin/PluginManager.cs @@ -252,6 +252,8 @@ namespace Flow.Launcher.Core.Plugin public static bool ActionKeywordRegistered(string actionKeyword) { + // this method is only checking for action keywords (defined as not '*') registration + // hence the actionKeyword != Query.GlobalPluginWildcardSign logic return actionKeyword != Query.GlobalPluginWildcardSign && NonGlobalPlugins.ContainsKey(actionKeyword); } diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml index 445326a76..24a591c4f 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml @@ -23,6 +23,10 @@ Path Search: File Content Search: Index Search: + Current Action Keyword: + Done + Enabled + When disabled Flow will not execute this search option, and will additionally revert back to '*' to free up the action keyword Explorer diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index 8e67277a8..6f3996b0d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -67,7 +67,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search private bool ActionKeywordMatch(Query query, Settings.ActionKeyword allowedActionKeyword) { - var keyword = query.ActionKeyword.Length == 0 ? "*" : query.ActionKeyword; + var keyword = query.ActionKeyword.Length == 0 ? Query.GlobalPluginWildcardSign : query.ActionKeyword; return allowedActionKeyword switch { diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs index fbf9c325e..0fed15fc4 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs @@ -62,7 +62,14 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels } } - internal bool IsActionKeywordAlreadyAssigned(string newActionKeyword) => PluginManager.ActionKeywordRegistered(newActionKeyword); + internal bool IsActionKeywordAlreadyAssigned(string newActionKeyword, string oldActionKeyword) + { + // PluginManager.ActionKeywordRegistered does not check global action keyword ('*'), so use this logic instead + if (newActionKeyword == Query.GlobalPluginWildcardSign) + return newActionKeyword == oldActionKeyword; + + return PluginManager.ActionKeywordRegistered(newActionKeyword); + } internal bool IsNewActionKeywordGlobal(string newActionKeyword) => newActionKeyword == Query.GlobalPluginWildcardSign; } diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml index 52df61a5f..af67f1727 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml @@ -20,23 +20,19 @@ + HorizontalAlignment="Left" Text="{DynamicResource plugin_explorer_actionkeyword_current}" /> - - -