From 7c3e0e25c4bc09174510780cffd5759cef5dabcf Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 11 Oct 2022 13:37:58 +1100 Subject: [PATCH 1/6] formatting --- Flow.Launcher/SettingWindow.xaml.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index e681d78ab..44c593324 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -383,6 +383,7 @@ namespace Flow.Launcher } return false; } + private bool PluginStoreFilter(object item) { if (string.IsNullOrEmpty(pluginStoreFilterTxb.Text)) From 559920360e716a3a35c3e43c3e455af187b46eb1 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 11 Oct 2022 13:46:13 +1100 Subject: [PATCH 2/6] formatting --- Flow.Launcher/SettingWindow.xaml.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 44c593324..c253a1d0c 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -427,6 +427,7 @@ namespace Flow.Launcher if (e.Key == Key.Enter) RefreshPluginStoreEventHandler(sender, e); } + private void OnPluginSettingKeydown(object sender, KeyEventArgs e) { if ((Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control && e.Key == Key.F) From 3317bab0291cbb55e6dbd08fdbb8afd8957ff6c3 Mon Sep 17 00:00:00 2001 From: DB p Date: Tue, 11 Oct 2022 12:10:30 +0900 Subject: [PATCH 3/6] Remove No Network Message in Noresult --- Flow.Launcher.sln | 1 + Flow.Launcher/Languages/en.xaml | 5 ++--- Flow.Launcher/SettingWindow.xaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher.sln b/Flow.Launcher.sln index 0d9eea06c..f59d3d26f 100644 --- a/Flow.Launcher.sln +++ b/Flow.Launcher.sln @@ -213,6 +213,7 @@ Global {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x86.ActiveCfg = Release|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x86.Build.0 = Release|Any CPU {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Debug|Any CPU.Build.0 = Debug|Any CPU {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Debug|x64.ActiveCfg = Debug|Any CPU {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Debug|x64.Build.0 = Debug|Any CPU {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Debug|x86.ActiveCfg = Debug|Any CPU diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 8d5d04146..752adb53a 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -62,9 +62,8 @@ Search Plugin Ctrl+F to Search Plugins - No results to display - Try another search term. - Please check your network connection or try another search term. + No results found + Please try a different search. Plugin Find more plugins On diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index f300203ac..a8997886e 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -428,7 +428,7 @@ Margin="0,20,0,4" FontWeight="Bold" Text="{DynamicResource searchplugin_Noresult_Title}" /> - + From 682f5029a9c51a0020bb553e204fc67191f1d28a Mon Sep 17 00:00:00 2001 From: DB p Date: Tue, 11 Oct 2022 12:13:03 +0900 Subject: [PATCH 4/6] Remove Useless Size Value --- Flow.Launcher/SettingWindow.xaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index a8997886e..7f88aeec4 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -323,8 +323,6 @@ - - From 7b1fb22a5bf81b44c0ada3008d3ffa3b479080ba Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 11 Oct 2022 20:36:11 +1100 Subject: [PATCH 5/6] formatting --- Flow.Launcher/Languages/en.xaml | 2 +- Flow.Launcher/SettingWindow.xaml.cs | 12 ++---------- Flow.Launcher/ViewModel/PluginViewModel.cs | 10 ++++++++-- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 752adb53a..2019c1b66 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -61,7 +61,7 @@ Search Plugin - Ctrl+F to Search Plugins + Ctrl+F to search plugins No results found Please try a different search. Plugin diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index c253a1d0c..51017b96b 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -65,6 +65,7 @@ namespace Flow.Launcher pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource); pluginStoreView.Filter = PluginStoreFilter; + InitializePosition(); } @@ -246,7 +247,6 @@ namespace Flow.Launcher viewModel.UpdateApp(); // TODO: change to command } - private void OnRequestNavigate(object sender, RequestNavigateEventArgs e) { API.OpenUrl(e.Uri.AbsoluteUri); @@ -416,6 +416,7 @@ namespace Flow.Launcher pluginStoreView.Refresh(); } } + private void PluginFilterTxb_OnKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) @@ -434,15 +435,6 @@ namespace Flow.Launcher pluginFilterTxb.Focus(); } - private void ItemSizeChanged(object sender, SizeChangedEventArgs e) - { - - } - - private void SelectedPluginChanged(object sender, SelectionChangedEventArgs e) - { - - } private void PluginStore_OnKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.F && (Keyboard.Modifiers & ModifierKeys.Control) != 0) diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs index 38f2421a1..2294681b4 100644 --- a/Flow.Launcher/ViewModel/PluginViewModel.cs +++ b/Flow.Launcher/ViewModel/PluginViewModel.cs @@ -1,4 +1,4 @@ -using System.Windows; +using System.Windows; using System.Windows.Media; using Flow.Launcher.Plugin; using Flow.Launcher.Infrastructure.Image; @@ -43,7 +43,13 @@ namespace Flow.Launcher.ViewModel private Control _settingControl; private bool _isExpanded; - public Control SettingControl => IsExpanded ? _settingControl ??= PluginPair.Plugin is not ISettingProvider settingProvider ? new Control() : settingProvider.CreateSettingPanel() : null; + public Control SettingControl + => IsExpanded + ? _settingControl + ??= PluginPair.Plugin is not ISettingProvider settingProvider + ? new Control() + : settingProvider.CreateSettingPanel() + : null; public Visibility ActionKeywordsVisibility => PluginPair.Metadata.ActionKeywords.Count == 1 ? Visibility.Visible : Visibility.Collapsed; public string InitilizaTime => PluginPair.Metadata.InitTime + "ms"; From db71ffd691a1ecf91a0abd8cbfa202fd7f49aeab Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 11 Oct 2022 20:48:54 +1100 Subject: [PATCH 6/6] remove obsolete calls --- Flow.Launcher/SettingWindow.xaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 7f88aeec4..0a63b3a6c 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1030,7 +1030,6 @@ ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectedItem="{Binding SelectedPlugin}" - SelectionChanged="SelectedPluginChanged" SnapsToDevicePixels="True" Style="{DynamicResource PluginListStyle}"> @@ -1220,8 +1219,7 @@ Margin="0" Padding="1" VerticalAlignment="Stretch" - Content="{Binding SettingControl}" - SizeChanged="ItemSizeChanged" /> + Content="{Binding SettingControl}" />