Skip to content

Commit 520ef37

Browse files
committed
Remove Obsolete Property and use Status Property for Sorting
1 parent ea6622f commit 520ef37

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public string IconPath
3535
}
3636

3737
public string Url { get; set; }
38+
39+
[JsonIgnore]
40+
public bool Status => Enabled;
3841
public bool Enabled { get; set; }
3942

4043
public SearchSource DeepCopy()

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

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,11 @@
6969
<GridViewColumn
7070
Width="130"
7171
DisplayMemberBinding="{Binding ActionKeyword}"
72-
Header="{DynamicResource flowlauncher_plugin_websearch_action_keyword}">
73-
<GridViewColumn.CellTemplate>
74-
<DataTemplate>
75-
<TextBlock Text="{Binding ActionKeyword}" />
76-
</DataTemplate>
77-
</GridViewColumn.CellTemplate>
78-
</GridViewColumn>
72+
Header="{DynamicResource flowlauncher_plugin_websearch_action_keyword}"/>
7973
<GridViewColumn
8074
Width="350"
8175
DisplayMemberBinding="{Binding Title}"
82-
Header="{DynamicResource flowlauncher_plugin_websearch_title}">
83-
<GridViewColumn.CellTemplate>
84-
<DataTemplate>
85-
<TextBlock Text="{Binding Title}" />
86-
</DataTemplate>
87-
</GridViewColumn.CellTemplate>
88-
</GridViewColumn>
76+
Header="{DynamicResource flowlauncher_plugin_websearch_title}"/>
8977
<GridViewColumn Width="140" Header="{DynamicResource flowlauncher_plugin_websearch_enable}">
9078
<GridViewColumn.CellTemplate>
9179
<DataTemplate>
@@ -94,7 +82,7 @@
9482
<Style TargetType="TextBlock">
9583
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_websearch_false}" />
9684
<Style.Triggers>
97-
<DataTrigger Binding="{Binding Enabled, UpdateSourceTrigger=PropertyChanged}" Value="True">
85+
<DataTrigger Binding="{Binding Status, UpdateSourceTrigger=PropertyChanged}" Value="True">
9886
<Setter Property="Text" Value="{DynamicResource flowlauncher_plugin_websearch_true}" />
9987
</DataTrigger>
10088
</Style.Triggers>

0 commit comments

Comments
 (0)