Skip to content

Commit 3e0539f

Browse files
authored
Merge branch 'dev' into feature/web_search_private_mode
2 parents 3c41823 + 7b08c96 commit 3e0539f

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

Plugins/Flow.Launcher.Plugin.WebSearch/Settings.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,19 @@ public Settings()
191191
[JsonIgnore]
192192
public SearchSource SelectedSearchSource { get; set; }
193193

194-
public bool EnableSuggestion { get; set; }
194+
private bool enableSuggestion;
195+
public bool EnableSuggestion
196+
{
197+
get => enableSuggestion;
198+
set
199+
{
200+
if (enableSuggestion != value)
201+
{
202+
enableSuggestion = value;
203+
OnPropertyChanged(nameof(EnableSuggestion));
204+
}
205+
}
206+
}
195207

196208
[JsonIgnore]
197209
public SuggestionSource[] Suggestions { get; set; } = {
@@ -221,9 +233,5 @@ public string Suggestion
221233
}
222234
}
223235
}
224-
225-
public string BrowserPath { get; set; }
226-
227-
public bool OpenInNewBrowser { get; set; } = true;
228236
}
229237
}

Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
mc:Ignorable="d">
1212

1313
<UserControl.Resources>
14-
<Style x:Key="BrowserPathBoxStyle" TargetType="TextBox">
15-
<Setter Property="Height" Value="28" />
16-
<Setter Property="VerticalContentAlignment" Value="Center" />
17-
</Style>
1814
<DataTemplate x:Key="HeaderTemplateArrowUp">
1915
<DockPanel>
2016
<TextBlock HorizontalAlignment="Center" Text="{Binding}" />
@@ -152,7 +148,7 @@
152148
Margin="{StaticResource SettingPanelItemLeftMargin}"
153149
VerticalAlignment="Center"
154150
FontSize="11"
155-
IsEnabled="{Binding ElementName=EnableSuggestion, Path=IsChecked}"
151+
IsEnabled="{Binding Settings.EnableSuggestion}"
156152
ItemsSource="{Binding Settings.Suggestions}"
157153
SelectedItem="{Binding Settings.SelectedSuggestion}" />
158154
<CheckBox
@@ -163,7 +159,6 @@
163159
Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion}"
164160
IsChecked="{Binding Settings.EnableSuggestion}" />
165161
</StackPanel>
166-
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSearchSuggestion is not working -->
167162
</DockPanel>
168163
</Grid>
169164
</UserControl>

Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ private void SortByColumn(object sender, RoutedEventArgs e)
9494
var columnBinding = headerClicked.Column.DisplayMemberBinding as Binding;
9595
var sortBy = columnBinding?.Path.Path ?? headerClicked.Column.Header as string;
9696

97-
if(sortBy != null) {
97+
if (sortBy != null)
98+
{
9899
Sort(sortBy, direction);
99100

100101
if (direction == ListSortDirection.Ascending)

Plugins/Flow.Launcher.Plugin.WebSearch/setting.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,6 @@
141141
"Enabled": true
142142
}
143143
],
144-
"EnableWebSearchSuggestion": false,
145-
"WebSearchSuggestionSource": "Google"
144+
"EnableSuggestion": false,
145+
"Suggestion": "Google"
146146
}

0 commit comments

Comments
 (0)