From 96ab33bdea4f372632b9dc8793ce2496d5e0e7a2 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 27 Sep 2021 22:23:03 +1000 Subject: [PATCH 01/78] fix winget update causing incompatibility with always retrieving latest --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index b45b40186..dba2cf8f9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -78,6 +78,6 @@ on_success: - ps: | if ($env:APPVEYOR_REPO_BRANCH -eq "master" -and $env:APPVEYOR_REPO_TAG -eq "true") { - iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe + iwr https://github.com/microsoft/winget-create/releases/download/v0.2.0.29-preview/wingetcreate.exe -OutFile wingetcreate.exe .\wingetcreate.exe update Flow-Launcher.Flow-Launcher -s true -u https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$env:flowVersion/Flow-Launcher-Setup.exe -v $env:flowVersion -t $env:winget_token } From aac60eaa249cfc455effe54efac151011c98bb40 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 29 Sep 2021 14:33:30 -0500 Subject: [PATCH 02/78] change cultural info when switching language --- Flow.Launcher.Core/Resource/Internationalization.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Resource/Internationalization.cs b/Flow.Launcher.Core/Resource/Internationalization.cs index 64b949cbb..3eb6621f1 100644 --- a/Flow.Launcher.Core/Resource/Internationalization.cs +++ b/Flow.Launcher.Core/Resource/Internationalization.cs @@ -9,6 +9,7 @@ using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; +using System.Globalization; namespace Flow.Launcher.Core.Resource { @@ -96,7 +97,7 @@ namespace Flow.Launcher.Core.Resource } UpdatePluginMetadataTranslations(); Settings.Language = language.LanguageCode; - + CultureInfo.CurrentCulture = new CultureInfo(language.LanguageCode); } public bool PromptShouldUsePinyin(string languageCodeToSet) From cb9d7cf0c4f488796c67885e25a65c10066944a1 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 29 Sep 2021 14:35:33 -0500 Subject: [PATCH 03/78] set ui culture as well --- Flow.Launcher.Core/Resource/Internationalization.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Flow.Launcher.Core/Resource/Internationalization.cs b/Flow.Launcher.Core/Resource/Internationalization.cs index 3eb6621f1..78e8c5cbf 100644 --- a/Flow.Launcher.Core/Resource/Internationalization.cs +++ b/Flow.Launcher.Core/Resource/Internationalization.cs @@ -98,6 +98,7 @@ namespace Flow.Launcher.Core.Resource UpdatePluginMetadataTranslations(); Settings.Language = language.LanguageCode; CultureInfo.CurrentCulture = new CultureInfo(language.LanguageCode); + CultureInfo.CurrentUICulture = CultureInfo.CurrentCulture; } public bool PromptShouldUsePinyin(string languageCodeToSet) From a9476b153a6a0d09f63ba0ab6f09080bb80fc702 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Fri, 8 Oct 2021 03:22:56 +0900 Subject: [PATCH 04/78] Adjust Plugin List template --- Flow.Launcher/Languages/en.xaml | 2 +- Flow.Launcher/SettingWindow.xaml | 56 ++++++++++++++++++++--------- Flow.Launcher/SettingWindow.xaml.cs | 12 ++++--- 3 files changed, 48 insertions(+), 22 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 4a9b92700..d0137de91 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -51,7 +51,7 @@ New action keyword: Current Priority: New Priority: - Priority: + Priority Plugin Directory Author Init time: diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 7dc8829be..ed08f8e22 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -418,8 +418,7 @@ - - + @@ -429,33 +428,55 @@ - - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + + + Date: Sat, 9 Oct 2021 20:58:22 +0900 Subject: [PATCH 12/78] - Remove Expander Button's Circle and adjust arrow size --- Flow.Launcher/App.xaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Flow.Launcher/App.xaml b/Flow.Launcher/App.xaml index 1311de968..13d88e1c6 100644 --- a/Flow.Launcher/App.xaml +++ b/Flow.Launcher/App.xaml @@ -71,8 +71,8 @@ - - + + @@ -82,11 +82,11 @@ - + - + @@ -160,8 +160,8 @@ - - + + @@ -170,11 +170,11 @@ - + - + From 762df7fdd380926eaced688b2d2bfef713602f85 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sat, 9 Oct 2021 22:22:47 +0900 Subject: [PATCH 13/78] - Remove colon Action keyword String - Fix layout for init/query time/version/plugin store - change action keyword to button - add listbox bottom margin - add margin when select list item for easy to distinguish. --- Flow.Launcher/Languages/en.xaml | 2 +- Flow.Launcher/SettingWindow.xaml | 80 +++++++++++++++++------------ Flow.Launcher/SettingWindow.xaml.cs | 14 +++-- 3 files changed, 58 insertions(+), 38 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 60605df30..79b8ce669 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -46,7 +46,7 @@ Find more plugins On Off - Action keyword: + Action keyword Current action keyword: New action keyword: Current Priority: diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 02de47fe7..47df70561 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -229,7 +229,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -257,13 +257,6 @@ - @@ -542,7 +535,7 @@ Margin="0, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{StaticResource PluginList}" ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False" - Padding="0" Width="Auto" HorizontalAlignment="Stretch"> + Padding="0 0 0 18" Width="Auto" HorizontalAlignment="Stretch"> @@ -618,22 +611,36 @@ - - - + + + - + + + + @@ -652,29 +659,36 @@ - + Padding="0 12 0 0" > - - + + + - + - + - - + HorizontalAlignment="Right" FontSize="12" VerticalAlignment="Center"/> + + diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 08d0eb88a..9b5c34c44 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -193,14 +193,13 @@ namespace Flow.Launcher } - private void OnPluginActionKeywordsClick(object sender, MouseButtonEventArgs e) + private void OnPluginActionKeywordsClick(object sender, RoutedEventArgs e) { - if (e.ChangedButton == MouseButton.Left) - { + var id = viewModel.SelectedPlugin.PluginPair.Metadata.ID; ActionKeywords changeKeywordsWindow = new ActionKeywords(id, settings, viewModel.SelectedPlugin); changeKeywordsWindow.ShowDialog(); - } + } private void OnPluginNameClick(object sender, MouseButtonEventArgs e) @@ -266,6 +265,13 @@ namespace Flow.Launcher FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), Constant.Themes)); } + /* + private void OnPluginActionKeywordsClick(object sender, RoutedEventArgs e) + { + + } + */ + /*private void OnPluginPriorityClick(object sender, RoutedEventArgs e) { From 4a4f0bbefbd24a0e2209b742934c4736dd573dcf Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sat, 9 Oct 2021 22:27:09 +0900 Subject: [PATCH 14/78] - Add plugin page title - Adjust listbox Margin for fit other setting page list. --- Flow.Launcher/SettingWindow.xaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 47df70561..38c739fb2 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -527,12 +527,20 @@ - - - + + + + + + + + + + + From 0d11b79ee31d21aacb6717e5b6a160e90ee5063d Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 00:02:41 +0900 Subject: [PATCH 15/78] - Adjust Shell, Calc, WebSearch Setting Margin --- .../Views/CalculatorSettings.xaml | 2 +- Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml | 2 +- Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml b/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml index 1330247b2..374bccf62 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml @@ -15,7 +15,7 @@ - + diff --git a/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml b/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml index 4cd4d8fa3..d9b1942f1 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml @@ -6,7 +6,7 @@ mc:Ignorable="d" Loaded="CMDSetting_OnLoaded" d:DesignHeight="300" d:DesignWidth="300"> - + diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml index c2f64bc7e..cb0b50069 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml @@ -32,7 +32,7 @@ - + From 2dc8bb386e41dbfb1b7d41c7f28726084cebc8e1 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 00:33:11 +0900 Subject: [PATCH 16/78] - Add Automatically Hide Plugin Info Border by SettingControl Height --- Flow.Launcher/SettingWindow.xaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 38c739fb2..769da568a 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -655,13 +655,23 @@ - - + + + From 234816df4ba28485565ebb3d1c47fe743c355b97 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 00:33:11 +0900 Subject: [PATCH 17/78] - Add Automatically Hide Plugin Info Border by SettingControl Height --- Flow.Launcher/SettingWindow.xaml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 38c739fb2..07882445c 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -636,7 +636,7 @@ ToolTip="Change Action Keywords" Margin="5 0 0 0" Cursor="Hand" FontWeight="Bold" Click="OnPluginActionKeywordsClick" HorizontalAlignment="Right" - Width="100" Height="32"> + Width="100" Height="40"> + + + + + From 2d98dcbfd8faa19706382febef4fda096a57c81c Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 06:19:15 +0900 Subject: [PATCH 18/78] - Add Author name in plugin list --- Flow.Launcher/Languages/en.xaml | 2 +- Flow.Launcher/SettingWindow.xaml | 226 +++++++++++++++++++++++++++++++ 2 files changed, 227 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 79b8ce669..9d9e69785 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -53,7 +53,7 @@ New Priority: Priority Plugin Directory - Author + Author: Init time: Query time: diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index b0f596372..c875d652c 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -806,6 +806,232 @@ --> + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 579f8c8b9eed6324b9924f6f35d1d9956e322658 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 06:19:15 +0900 Subject: [PATCH 19/78] - Add Author name in plugin list --- Flow.Launcher/Languages/en.xaml | 2 +- Flow.Launcher/SettingWindow.xaml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 79b8ce669..9d9e69785 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -53,7 +53,7 @@ New Priority: Priority Plugin Directory - Author + Author: Init time: Query time: diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index b0f596372..7b45c7448 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -690,9 +690,16 @@ Padding="0 12 0 0" > - + + + + + From 8174d54de659ec4f1fb850c195114fbee1cdfba2 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sat, 9 Oct 2021 17:58:40 -0500 Subject: [PATCH 20/78] Fix PriorityClick Logic Use sender to find actual pluginviewmodel instead of use selected --- Flow.Launcher/SettingWindow.xaml.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 9b5c34c44..4d36ec5da 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -13,6 +13,7 @@ using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedCommands; using Flow.Launcher.ViewModel; using Flow.Launcher.Helper; +using System.Windows.Controls; namespace Flow.Launcher { @@ -186,20 +187,18 @@ namespace Flow.Launcher private void OnPluginPriorityClick(object sender, RoutedEventArgs e) { - - - PriorityChangeWindow priorityChangeWindow = new PriorityChangeWindow(viewModel.SelectedPlugin.PluginPair.Metadata.ID, settings, viewModel.SelectedPlugin); + if (sender is Control { DataContext: PluginViewModel pluginViewModel }) + { + PriorityChangeWindow priorityChangeWindow = new PriorityChangeWindow(pluginViewModel.PluginPair.Metadata.ID, settings, pluginViewModel); priorityChangeWindow.ShowDialog(); - + } } private void OnPluginActionKeywordsClick(object sender, RoutedEventArgs e) { - - var id = viewModel.SelectedPlugin.PluginPair.Metadata.ID; - ActionKeywords changeKeywordsWindow = new ActionKeywords(id, settings, viewModel.SelectedPlugin); - changeKeywordsWindow.ShowDialog(); - + var id = viewModel.SelectedPlugin.PluginPair.Metadata.ID; + ActionKeywords changeKeywordsWindow = new ActionKeywords(id, settings, viewModel.SelectedPlugin); + changeKeywordsWindow.ShowDialog(); } private void OnPluginNameClick(object sender, MouseButtonEventArgs e) From 1e479edead18c1290327a908c49c34d5c326d852 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 12:39:58 +0900 Subject: [PATCH 21/78] - Add plugin store tab (WIP) --- Flow.Launcher/SettingWindow.xaml | 87 +++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index bedad7f91..f58b17963 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -229,7 +229,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -257,6 +257,14 @@ + + @@ -741,6 +749,81 @@ + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 876d477f25cde4ee00c10ce56efd87e0aaa12df2 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 22:21:32 +0900 Subject: [PATCH 22/78] - Add install button with hover --- Flow.Launcher/SettingWindow.xaml | 154 +++++++++++++++++++++++++++---- 1 file changed, 134 insertions(+), 20 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index f58b17963..cb2146c53 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -260,10 +260,70 @@ @@ -785,34 +845,88 @@ Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch"> - + - - - - - - + + + + + + + - + + + - - + + + + - + - - + - + + + + + + + + + + + + + + + + + + From 4164b46f728cd413224f2811bf61996e88e14d29 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Mon, 11 Oct 2021 02:22:39 +0900 Subject: [PATCH 23/78] Add author and version in hover menu. --- Flow.Launcher/SettingWindow.xaml | 37 ++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index cb2146c53..260ab4280 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -852,7 +852,7 @@ - + @@ -905,21 +905,30 @@ - + - + - From ccb565e70a39541d1032bef97d3e6fe235bab72e Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Mon, 11 Oct 2021 04:54:04 +0900 Subject: [PATCH 24/78] Responsive Width in Plugin Store List (WIP --- Flow.Launcher/SettingWindow.xaml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 260ab4280..c02c487a6 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -263,7 +263,9 @@ - + + + @@ -837,7 +839,7 @@ - - + + + + - + @@ -887,12 +892,12 @@ - + - - + + - - - - + + + + - - + + + - - - - + From 1317077dd8ab1102c97d93ad0477c255e4aa112b Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 17 Oct 2021 10:57:50 +0900 Subject: [PATCH 36/78] - Change the popup to windows notification --- Flow.Launcher/Msg.xaml.cs | 66 ++++++++++++--------------------------- 1 file changed, 20 insertions(+), 46 deletions(-) diff --git a/Flow.Launcher/Msg.xaml.cs b/Flow.Launcher/Msg.xaml.cs index 6bb2fc2dc..c6b26ccd5 100644 --- a/Flow.Launcher/Msg.xaml.cs +++ b/Flow.Launcher/Msg.xaml.cs @@ -5,59 +5,30 @@ using System.Windows.Forms; using System.Windows.Input; using System.Windows.Media.Animation; using System.Windows.Media.Imaging; +using System.Windows.Media; using Flow.Launcher.Helper; using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Image; +using Windows.UI; +using Windows.Data; +using Windows.Data.Xml.Dom; +using Windows.UI.Notifications; namespace Flow.Launcher { public partial class Msg : Window { - Storyboard fadeOutStoryboard = new Storyboard(); - private bool closing; public Msg() { InitializeComponent(); - var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position); - var dipWorkingArea = WindowsInteropHelper.TransformPixelsToDIP(this, - screen.WorkingArea.Width, - screen.WorkingArea.Height); - Left = dipWorkingArea.X - Width; - Top = dipWorkingArea.Y; - showAnimation.From = dipWorkingArea.Y; - showAnimation.To = dipWorkingArea.Y - Height; - // Create the fade out storyboard - fadeOutStoryboard.Completed += fadeOutStoryboard_Completed; - DoubleAnimation fadeOutAnimation = new DoubleAnimation(dipWorkingArea.Y - Height, dipWorkingArea.Y, new Duration(TimeSpan.FromSeconds(5))) - { - AccelerationRatio = 0.2 - }; - Storyboard.SetTarget(fadeOutAnimation, this); - Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(TopProperty)); - fadeOutStoryboard.Children.Add(fadeOutAnimation); - - imgClose.Source = ImageLoader.Load(Path.Combine(Infrastructure.Constant.ProgramDirectory, "Images\\close.png")); - imgClose.MouseUp += imgClose_MouseUp; - } - - void imgClose_MouseUp(object sender, MouseButtonEventArgs e) - { - if (!closing) - { - closing = true; - fadeOutStoryboard.Begin(); - } - } - - private void fadeOutStoryboard_Completed(object sender, EventArgs e) - { - Close(); } public void Show(string title, string subTitle, string iconPath) { + + tbTitle.Text = title; tbSubTitle.Text = subTitle; if (string.IsNullOrEmpty(subTitle)) @@ -68,20 +39,23 @@ namespace Flow.Launcher { imgIco.Source = ImageLoader.Load(Path.Combine(Constant.ProgramDirectory, "Images\\app.png")); } - else { + else + { imgIco.Source = ImageLoader.Load(iconPath); } - Show(); + /* Using Windows Notification System */ + var ToastTitle = title; + var ToastsubTitle = subTitle; + var Icon = imgIco.Source; + var xml = $"\"meziantou\"/{ToastTitle}" + + $"{ToastsubTitle}"; + var toastXml = new XmlDocument(); + toastXml.LoadXml(xml); + var toast = new ToastNotification(toastXml); + ToastNotificationManager.CreateToastNotifier("Flow Launcher").Show(toast); - Dispatcher.InvokeAsync(async () => - { - if (!closing) - { - closing = true; - await Dispatcher.InvokeAsync(fadeOutStoryboard.Begin); - } - }); } + } } From 52b357952527ed9c1836b91ac2ac9cd53b229042 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sat, 16 Oct 2021 21:28:55 -0500 Subject: [PATCH 37/78] Implement Install & Refresh Button - Add ShowMainWindow API for IPublicAPI --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 5 +++ Flow.Launcher/PublicAPIInstance.cs | 2 + Flow.Launcher/SettingWindow.xaml | 40 ++++++++++--------- Flow.Launcher/SettingWindow.xaml.cs | 17 ++++++++ .../ViewModel/SettingWindowViewModel.cs | 7 ++++ 5 files changed, 53 insertions(+), 18 deletions(-) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index d9cdf5581..974eafa96 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -59,6 +59,11 @@ namespace Flow.Launcher.Plugin /// Optional message subtitle void ShowMsgError(string title, string subTitle = ""); + /// + /// Show the MainWindow when hiding + /// + void ShowMainWindow(); + /// /// Show message box /// diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 6f995671d..70d54619d 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -68,6 +68,8 @@ namespace Flow.Launcher public void RestarApp() => RestartApp(); + public void ShowMainWindow() => _mainVM.MainWindowVisibility = Visibility.Visible; + public void CheckForNewUpdate() => _settingsVM.UpdateApp(); public void SaveAppAllSettings() diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8a5feb866..8aaef7054 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -37,7 +37,7 @@ - + - @@ -998,7 +999,10 @@ - @@ -1079,7 +1083,7 @@ + Visibility="Visible" /> @@ -1112,7 +1116,7 @@ - + diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 4d36ec5da..4b58b9c6a 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -14,6 +14,7 @@ using Flow.Launcher.Plugin.SharedCommands; using Flow.Launcher.ViewModel; using Flow.Launcher.Helper; using System.Windows.Controls; +using Flow.Launcher.Core.ExternalPlugins; namespace Flow.Launcher { @@ -264,6 +265,22 @@ namespace Flow.Launcher FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), Constant.Themes)); } + private void OnPluginStoreRefreshClick(object sender, RoutedEventArgs e) + { + _ = viewModel.RefreshExternalPluginsAsync(); + } + + private void OnExternalPluginInstallClick(object sender, RoutedEventArgs e) + { + if(sender is Button { DataContext: UserPlugin plugin }) + { + var pluginsManagerPlugin = PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7"); + var actionKeywrod = pluginsManagerPlugin.Metadata.ActionKeywords.Count == 0 ? "" : pluginsManagerPlugin.Metadata.ActionKeywords[0]; + API.ChangeQuery($"{actionKeywrod} install {plugin.Name}"); + API.ShowMainWindow(); + } + } + /* private void OnPluginActionKeywordsClick(object sender, RoutedEventArgs e) { diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 7f16da8ae..6bbf22c41 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; +using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Media; @@ -265,6 +266,12 @@ namespace Flow.Launcher.ViewModel } } + public async Task RefreshExternalPluginsAsync() + { + await PluginsManifest.UpdateManifestAsync(); + OnPropertyChanged(nameof(ExternalPlugins)); + } + #endregion From da12a0616f461567bce4429a986ac3b10753669e Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 17 Oct 2021 11:44:25 +0900 Subject: [PATCH 38/78] Add style for toggle button --- Flow.Launcher/SettingWindow.xaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8aaef7054..e6612e4dc 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -37,7 +37,6 @@ - + + - - - - - - - - - + + + + + + + + + + + - + - + - - - - + + + - - - + + - - - + + + + - - - + + + - + - - - - - - - - + + + + + + - + - + - - + - - + - - - - - - - - - - - - + - - + - - + + + - - - + + - - - + + + + @@ -912,125 +915,128 @@ BorderThickness="1 1 1 2"/> - + - - - - - - - - + Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch"> + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + - - - - - - + + + + + - + - + - - - - - + + + + + - - - - - - - + + + + + + + - - - + + - - - - + + + - + + - - - - - - - + + + + + - - - - + + + + + From 3bacb3fc0753ccb0c77814de465e120826df3063 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 21 Oct 2021 22:29:03 -0500 Subject: [PATCH 48/78] Revert "add scroll movement with drag" This reverts commit f6d4736f1ab8766822f1d394d7dc3b3f4418110a. --- Flow.Launcher/SettingWindow.xaml | 444 +++++++++++++++---------------- 1 file changed, 219 insertions(+), 225 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 7c09a8d0f..a28886094 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -658,105 +658,103 @@ - - - - - - - - - - + + + + + + + + - - + - - - - - - - - + + + + + + + - - - - + + - + - - - - + + + - - - - - + + + + + + + + + + + - + - + - - - - + + + - - - + + - - - + + + + - - - + + + - + - - - - - - - - + + + + + + - + - + - - + - - + - - - - - - - - - - - - + - - + - - + + - - - + + + - - - - + + + @@ -915,128 +912,125 @@ BorderThickness="1 1 1 2"/> - - - - - - - - - - + ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False" + Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"> + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + - - - - - - + + + + + - + - + - - - - - + + + + + - - - - - - - + + + + + + + - - - + + - - - - + + + - - + - - - - - - + + + + + - - - - - + + + + From 82464b79c511030713f21af05b1f2a171282f36b Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 21 Oct 2021 22:31:33 -0500 Subject: [PATCH 49/78] Remove deferred scroll option to enable direct scrolling --- Flow.Launcher/SettingWindow.xaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index a28886094..2dcc2fa02 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -662,7 +662,6 @@ ItemsSource="{Binding PluginViewModels}" Margin="5, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{StaticResource PluginList}" - ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False" Padding="0 0 7 0" Width="Auto" HorizontalAlignment="Stretch" SnapsToDevicePixels="True" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"> @@ -916,7 +915,6 @@ ItemsSource="{Binding ExternalPlugins}" Margin="6, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{StaticResource StoreList}" SelectionMode="Single" - ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False" Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"> From 799ed81ef22106252a37462a3f9cea728c752eda Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sat, 23 Oct 2021 05:44:12 -0400 Subject: [PATCH 50/78] Update en.xaml --- Flow.Launcher/Languages/en.xaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 1dd6d3889..1e12c3d4e 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -19,29 +19,29 @@ Flow Launcher Settings General Portable Mode - All setting into single folder. You can use with USB drive or cloud. + Store all settings and user data in a central folder. Compatible with most removeable drives and cloud services. Start Flow Launcher on system startup Hide Flow Launcher when focus is lost Do not show new version notifications Remember last launch location Language Last Query Style - When you open Query box, decide what to do. + Show/Hide previous results when Flow Launcher is reactivated. Preserve Last Query Select last Query Empty last Query Maximum results shown Ignore hotkeys in fullscreen mode - If you're a gamer, We recommend turning it on. + Disable Flow Launcher activation when a Full screen application is active (Recommended for games). Python Directory Auto Update Auto Hide Scroll Bar in Setting - If you feel the scroll bar in the setting window is small, We recommend turning it off. + Hide the scroll bar when not in use. Select Hide Flow Launcher on startup Hide tray icon Query Search Precision - Search results become more accurate. + Changes minimum match score required for results. Should Use Pinyin Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese Shadow effect is not allowed while current theme has blur effect enabled @@ -84,11 +84,11 @@ Hotkey Flow Launcher Hotkey - Enter the shortcut that open the Flow Launcher. + Enter shortcut to show/hide Flow Launcher. Open Result Modifiers - Shortcuts to select the result list. + Select a modifier to action results via keyboard. Show Hotkey - Display Shortcut in Result list . + Show result modifier with results. Custom Query Hotkey Query Delete @@ -197,4 +197,4 @@ Update files Update description - \ No newline at end of file + From e5a7c862b84790db7250ebaa8a8d7c122f847ab8 Mon Sep 17 00:00:00 2001 From: DB p Date: Sat, 23 Oct 2021 18:59:42 +0900 Subject: [PATCH 51/78] - remove AutoHideScrollbar tooltip --- Flow.Launcher/Languages/en.xaml | 1 - Flow.Launcher/Languages/ko.xaml | 1 - Flow.Launcher/SettingWindow.xaml | 2 -- 3 files changed, 4 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 1e12c3d4e..5c27fd74b 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -36,7 +36,6 @@ Python Directory Auto Update Auto Hide Scroll Bar in Setting - Hide the scroll bar when not in use. Select Hide Flow Launcher on startup Hide tray icon diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml index 6a145d670..79c7c12f7 100644 --- a/Flow.Launcher/Languages/ko.xaml +++ b/Flow.Launcher/Languages/ko.xaml @@ -36,7 +36,6 @@ Python 디렉토리 자동 업데이트 설정 창 스크롤바 숨기기 - 설정 창 스크롤바가 작다면 끄는 것을 추천합니다. 선택 시작 시 Flow Launcher 숨김 트레이 아이콘 숨기기 diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 2dcc2fa02..980430b64 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -620,8 +620,6 @@ - Date: Sat, 23 Oct 2021 19:41:21 +0900 Subject: [PATCH 52/78] Remove Auto HIde Scrollbar section --- Flow.Launcher/SettingWindow.xaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 980430b64..fe5339045 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -615,17 +615,6 @@ DisplayMemberPath="Display" SelectedValuePath="LanguageCode" Grid.Column="2" /> - - - - - - - - From 1a5116023e1484cdc978302b36688092f88ff466 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 26 Oct 2021 06:41:25 +1100 Subject: [PATCH 53/78] remove auto hiding of setting window's scrollbar related 925f6bc55bd4b674951c02de4ffb7d472b1d8228, a452feb4c678ab1d8e8f9bce3919e91ef08edc22 --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 2 -- Flow.Launcher/Languages/en.xaml | 1 - Flow.Launcher/Languages/ko.xaml | 1 - Flow.Launcher/Languages/sk.xaml | 2 -- Flow.Launcher/SettingWindow.xaml | 8 ++------ Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 6 ------ 6 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 907314ba8..102446158 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -99,8 +99,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings public bool RememberLastLaunchLocation { get; set; } public bool IgnoreHotkeysOnFullscreen { get; set; } - public bool AutoHideScrollBar { get; set; } - public HttpProxy Proxy { get; set; } = new HttpProxy(); [JsonConverter(typeof(JsonStringEnumConverter))] diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 5c27fd74b..8baab8355 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -35,7 +35,6 @@ Disable Flow Launcher activation when a Full screen application is active (Recommended for games). Python Directory Auto Update - Auto Hide Scroll Bar in Setting Select Hide Flow Launcher on startup Hide tray icon diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml index 79c7c12f7..649895cea 100644 --- a/Flow.Launcher/Languages/ko.xaml +++ b/Flow.Launcher/Languages/ko.xaml @@ -35,7 +35,6 @@ 게이머라면 켜는 것을 추천합니다. Python 디렉토리 자동 업데이트 - 설정 창 스크롤바 숨기기 선택 시작 시 Flow Launcher 숨김 트레이 아이콘 숨기기 diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index b766ccfa2..70a5d3b7c 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -31,8 +31,6 @@ Ignorovať klávesové skratky v režime na celú obrazovku Priečinok s Pythonom Automatická aktualizácia - Automaticky skryť posuvník - Automaticky skrývať posuvník v okne nastavení a zobraziť ho, keď naň prejdete myšou Vybrať Schovať Flow Launcher po spustení Schovať ikonu z oblasti oznámení diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index fe5339045..8fc214da7 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -401,7 +401,6 @@ + Padding="0 0 7 0" Width="Auto" HorizontalAlignment="Stretch" SnapsToDevicePixels="True"> @@ -902,7 +901,7 @@ ItemsSource="{Binding ExternalPlugins}" Margin="6, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{StaticResource StoreList}" SelectionMode="Single" - Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"> + Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch"> @@ -1038,7 +1037,6 @@ @@ -1314,7 +1312,6 @@ @@ -1442,7 +1439,6 @@ diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 6bbf22c41..dde540b0c 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -63,12 +63,6 @@ namespace Flow.Launcher.ViewModel } } - public bool AutoHideScrollBar - { - get => Settings.AutoHideScrollBar; - set => Settings.AutoHideScrollBar = value; - } - // This is only required to set at startup. When portable mode enabled/disabled a restart is always required private bool _portableMode = DataLocation.PortableDataLocationInUse(); public bool PortableMode From 6e6db2c67b835e04621852b4eb458981e19cc475 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Mon, 25 Oct 2021 17:52:45 -0500 Subject: [PATCH 54/78] fix iconpath other than default icon --- Flow.Launcher/Notification.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/Notification.cs b/Flow.Launcher/Notification.cs index 8933dc95e..b6aba7727 100644 --- a/Flow.Launcher/Notification.cs +++ b/Flow.Launcher/Notification.cs @@ -19,8 +19,8 @@ namespace Flow.Launcher { /* Using Windows Notification System */ var Icon = !File.Exists(iconPath) - ? ImageLoader.Load(Path.Combine(Constant.ProgramDirectory, "Images\\app.png")) - : ImageLoader.Load(iconPath); + ? Path.Combine(Constant.ProgramDirectory, "Images\\app.png") + : iconPath; var xml = $"\"meziantou\"/{title}" + $"{subTitle}"; From 8a59e87f997db2f4991de4786c5e2aa5bd7272d5 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Mon, 25 Oct 2021 18:51:34 -0500 Subject: [PATCH 55/78] Fix unselected issue for bookmark plugin by using binding (Don't understand Reason it doesn't work before) --- .../Views/SettingsControl.xaml | 12 ++++---- .../Views/SettingsControl.xaml.cs | 30 +++++++++++-------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml index 7b7ccbeea..abe1f0ad5 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml @@ -22,12 +22,12 @@ diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs index 2f67b999c..56fa58acf 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs @@ -3,34 +3,38 @@ using System.Windows; using System.Windows.Controls; using Flow.Launcher.Plugin.BrowserBookmark.Models; using System.Windows.Input; +using System.ComponentModel; namespace Flow.Launcher.Plugin.BrowserBookmark.Views { /// /// Interaction logic for BrowserBookmark.xaml /// - public partial class SettingsControl + public partial class SettingsControl : INotifyPropertyChanged { public Settings Settings { get; } public CustomBrowser SelectedCustomBrowser { get; set; } + public bool OpenInNewBrowserWindow + { + get => Settings.OpenInNewBrowserWindow; + set + { + Settings.OpenInNewBrowserWindow = value; + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(OpenInNewBrowserWindow))); + } + } + public bool OpenInNewTab + { + get => !OpenInNewBrowserWindow; + } public SettingsControl(Settings settings) { Settings = settings; InitializeComponent(); - NewWindowBrowser.IsChecked = Settings.OpenInNewBrowserWindow; - NewTabInBrowser.IsChecked = !Settings.OpenInNewBrowserWindow; } - private void OnNewBrowserWindowClick(object sender, RoutedEventArgs e) - { - Settings.OpenInNewBrowserWindow = true; - } - - private void OnNewTabClick(object sender, RoutedEventArgs e) - { - Settings.OpenInNewBrowserWindow = false; - } + public event PropertyChangedEventHandler PropertyChanged; private void OnChooseClick(object sender, RoutedEventArgs e) { @@ -61,7 +65,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Views private void DeleteCustomBrowser(object sender, RoutedEventArgs e) { - if(CustomBrowsers.SelectedItem is CustomBrowser selectedCustomBrowser) + if (CustomBrowsers.SelectedItem is CustomBrowser selectedCustomBrowser) { Settings.CustomChromiumBrowsers.Remove(selectedCustomBrowser); } From 5487834ed02626cd4836b6e95488d8205b37ed47 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Mon, 25 Oct 2021 19:02:22 -0500 Subject: [PATCH 56/78] Add back field to avoid duplicate plugin control loading --- Flow.Launcher/SettingWindow.xaml | 4 ++-- Flow.Launcher/ViewModel/PluginViewModel.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8fc214da7..ac6138644 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -774,7 +774,7 @@