Merge branch 'dev' into feature/web_search_private_mode

This commit is contained in:
Zoltan 2025-08-12 12:33:51 +02:00 committed by GitHub
commit 3e0539f8c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 14 deletions

View file

@ -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;
}
}

View file

@ -11,10 +11,6 @@
mc:Ignorable="d">
<UserControl.Resources>
<Style x:Key="BrowserPathBoxStyle" TargetType="TextBox">
<Setter Property="Height" Value="28" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<DataTemplate x:Key="HeaderTemplateArrowUp">
<DockPanel>
<TextBlock HorizontalAlignment="Center" Text="{Binding}" />
@ -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}" />
<CheckBox
@ -163,7 +159,6 @@
Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion}"
IsChecked="{Binding Settings.EnableSuggestion}" />
</StackPanel>
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSearchSuggestion is not working -->
</DockPanel>
</Grid>
</UserControl>

View file

@ -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)

View file

@ -141,6 +141,6 @@
"Enabled": true
}
],
"EnableWebSearchSuggestion": false,
"WebSearchSuggestionSource": "Google"
"EnableSuggestion": false,
"Suggestion": "Google"
}