diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs index f0e5ac327..0c0ac4b84 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs @@ -191,7 +191,19 @@ namespace Flow.Launcher.Plugin.WebSearch [JsonIgnore] public SearchSource SelectedSearchSource { get; set; } - public bool EnableSuggestion { get; set; } + private bool enableSuggestion; + public bool EnableSuggestion + { + get => enableSuggestion; + set + { + if (enableSuggestion != value) + { + enableSuggestion = value; + OnPropertyChanged(nameof(EnableSuggestion)); + } + } + } [JsonIgnore] public SuggestionSource[] Suggestions { get; set; } = { @@ -221,9 +233,5 @@ namespace Flow.Launcher.Plugin.WebSearch } } } - - public string BrowserPath { get; set; } - - public bool OpenInNewBrowser { get; set; } = true; } } diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml index 7b35019fd..33461e9e7 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml @@ -11,10 +11,6 @@ mc:Ignorable="d"> - @@ -152,7 +148,7 @@ Margin="{StaticResource SettingPanelItemLeftMargin}" VerticalAlignment="Center" FontSize="11" - IsEnabled="{Binding ElementName=EnableSuggestion, Path=IsChecked}" + IsEnabled="{Binding Settings.EnableSuggestion}" ItemsSource="{Binding Settings.Suggestions}" SelectedItem="{Binding Settings.SelectedSuggestion}" /> - \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs index e53f4ec75..71dc6ece7 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs @@ -94,7 +94,8 @@ namespace Flow.Launcher.Plugin.WebSearch var columnBinding = headerClicked.Column.DisplayMemberBinding as Binding; var sortBy = columnBinding?.Path.Path ?? headerClicked.Column.Header as string; - if(sortBy != null) { + if (sortBy != null) + { Sort(sortBy, direction); if (direction == ListSortDirection.Ascending) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/setting.json b/Plugins/Flow.Launcher.Plugin.WebSearch/setting.json index 533b894b8..a10ea6f33 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/setting.json +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/setting.json @@ -141,6 +141,6 @@ "Enabled": true } ], - "EnableWebSearchSuggestion": false, - "WebSearchSuggestionSource": "Google" + "EnableSuggestion": false, + "Suggestion": "Google" } \ No newline at end of file