From 15b874728071c9ce62ccaa71669731cff551392e Mon Sep 17 00:00:00 2001 From: zoltanvi Date: Sat, 9 Aug 2025 11:51:12 +0200 Subject: [PATCH 1/4] Fix IsEnabled binding for suggestion combobox --- Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs | 12 +++++++++++- .../SettingsControl.xaml | 3 +-- Plugins/Flow.Launcher.Plugin.WebSearch/setting.json | 4 ++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs index f0e5ac327..04112f965 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs @@ -7,6 +7,8 @@ namespace Flow.Launcher.Plugin.WebSearch { public class Settings : BaseModel { + private bool enableSuggestion; + public Settings() { SelectedSuggestion = Suggestions[0]; @@ -191,7 +193,15 @@ namespace Flow.Launcher.Plugin.WebSearch [JsonIgnore] public SearchSource SelectedSearchSource { get; set; } - public bool EnableSuggestion { get; set; } + public bool EnableSuggestion + { + get => enableSuggestion; + set + { + enableSuggestion = value; + OnPropertyChanged(nameof(EnableSuggestion)); + } + } [JsonIgnore] public SuggestionSource[] Suggestions { get; set; } = { diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml index 1ce9b70b4..bee133496 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml @@ -138,7 +138,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/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 From 09d8cefcef770fa02f5d196bdfaf99e7fc7c5481 Mon Sep 17 00:00:00 2001 From: zoltanvi Date: Sat, 9 Aug 2025 11:56:13 +0200 Subject: [PATCH 2/4] Remove unused properties --- Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs | 4 ---- Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml | 4 ---- .../Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs | 3 ++- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs index 04112f965..1682a9a4b 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs @@ -231,9 +231,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 bee133496..79d6265fe 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml @@ -11,10 +11,6 @@ mc:Ignorable="d"> - 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) From 37c529e012a83199cbadbc2b8d0cd1832645fb78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 06:40:12 +0000 Subject: [PATCH 3/4] Bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/default_plugins.yml | 2 +- .github/workflows/dotnet.yml | 2 +- .github/workflows/release_pr.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/default_plugins.yml b/.github/workflows/default_plugins.yml index 59cedc1e8..d0ba62c17 100644 --- a/.github/workflows/default_plugins.yml +++ b/.github/workflows/default_plugins.yml @@ -10,7 +10,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup .NET uses: actions/setup-dotnet@v4 with: diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 988548bee..9a09198fe 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -20,7 +20,7 @@ jobs: NUGET_CERT_REVOCATION_MODE: offline BUILD_NUMBER: ${{ github.run_number }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set Flow.Launcher.csproj version id: update uses: vers-one/dotnet-project-version-updater@v1.7 diff --git a/.github/workflows/release_pr.yml b/.github/workflows/release_pr.yml index 451bf386c..65946755b 100644 --- a/.github/workflows/release_pr.yml +++ b/.github/workflows/release_pr.yml @@ -11,7 +11,7 @@ jobs: update-pr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-python@v5 with: From cc2df8d680bb0d2861732e527442e91110027e64 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 12 Aug 2025 17:31:26 +0800 Subject: [PATCH 4/4] Improve code quality --- Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs index 1682a9a4b..0c0ac4b84 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs @@ -7,8 +7,6 @@ namespace Flow.Launcher.Plugin.WebSearch { public class Settings : BaseModel { - private bool enableSuggestion; - public Settings() { SelectedSuggestion = Suggestions[0]; @@ -193,13 +191,17 @@ namespace Flow.Launcher.Plugin.WebSearch [JsonIgnore] public SearchSource SelectedSearchSource { get; set; } + private bool enableSuggestion; public bool EnableSuggestion { get => enableSuggestion; set { - enableSuggestion = value; - OnPropertyChanged(nameof(EnableSuggestion)); + if (enableSuggestion != value) + { + enableSuggestion = value; + OnPropertyChanged(nameof(EnableSuggestion)); + } } }