Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions Flow.Launcher/SettingWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using ModernWpf;
using ModernWpf.Controls;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Security.Policy;
Expand Down Expand Up @@ -58,12 +59,24 @@ private void OnLoaded(object sender, RoutedEventArgs e)
pluginListView = (CollectionView)CollectionViewSource.GetDefaultView(Plugins.ItemsSource);
pluginListView.Filter = PluginListFilter;

pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
pluginStoreView.Filter = PluginStoreFilter;

viewModel.PropertyChanged += new PropertyChangedEventHandler(SettingsWindowViewModelChanged);

InitializePosition();
}

private void SettingsWindowViewModelChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(viewModel.ExternalPlugins))
{
pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
pluginStoreView.Filter = PluginStoreFilter;
pluginStoreView.Refresh();
}
}

private void OnSelectPythonPathClick(object sender, RoutedEventArgs e)
{
var selectedFile = viewModel.GetFileFromDialog(
Expand Down Expand Up @@ -257,9 +270,9 @@ private void ClearLogFolder(object sender, RoutedEventArgs e)
{
var confirmResult = MessageBox.Show(
InternationalizationManager.Instance.GetTranslation("clearlogfolderMessage"),
InternationalizationManager.Instance.GetTranslation("clearlogfolder"),
InternationalizationManager.Instance.GetTranslation("clearlogfolder"),
MessageBoxButton.YesNo);

if (confirmResult == MessageBoxResult.Yes)
{
viewModel.ClearLogFolder();
Expand Down Expand Up @@ -390,7 +403,7 @@ private void OnAddCustomShortCutClick(object sender, RoutedEventArgs e)
}

#endregion

private CollectionView pluginListView;
private CollectionView pluginStoreView;

Expand Down