From 96ab33bdea4f372632b9dc8793ce2496d5e0e7a2 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 27 Sep 2021 22:23:03 +1000 Subject: [PATCH 001/110] 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 002/110] 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 003/110] 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 3f95385f6a13a5995a71bf1eee05edb335057ce7 Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 20 Oct 2021 12:33:23 +0900 Subject: [PATCH 004/110] - Change Tray Menu to context menu for design --- Flow.Launcher/MainWindow.xaml.cs | 56 +++++++++++++++++++------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 057c3f07d..0c2173391 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -30,6 +30,7 @@ namespace Flow.Launcher private bool isProgressBarStoryboardPaused; private Settings _settings; private NotifyIcon _notifyIcon; + private ContextMenu contextMenu; private MainViewModel _viewModel; #endregion @@ -159,14 +160,19 @@ namespace Flow.Launcher private void UpdateNotifyIconText() { - var menu = _notifyIcon.ContextMenuStrip; - var open = menu.Items[0]; - var setting = menu.Items[1]; - var exit = menu.Items[2]; + var menu = contextMenu; - open.Text = InternationalizationManager.Instance.GetTranslation("iconTrayOpen"); - setting.Text = InternationalizationManager.Instance.GetTranslation("iconTraySettings"); - exit.Text = InternationalizationManager.Instance.GetTranslation("iconTrayExit"); + var header = new MenuItem() { Header = "Flow Launcher", IsEnabled = false }; + var open = new MenuItem() { Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") }; + var settings = new MenuItem() { Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings") }; + var exit = new MenuItem() { Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit") }; + menu.Items[0] = header; + menu.Items[1] = open; + menu.Items[2] = settings; + menu.Items[3] = exit; + open.Click += (o, e) => Visibility = Visibility.Visible; + settings.Click += (o, e) => App.API.OpenSettingDialog(); + exit.Click += (o, e) => Close(); } private void InitializeNotifyIcon() @@ -178,29 +184,33 @@ namespace Flow.Launcher Visible = !_settings.HideNotifyIcon }; var menu = new ContextMenuStrip(); - var items = menu.Items; + contextMenu = new ContextMenu(); + + MenuItem header = new MenuItem() { Header = "Flow Launcher", IsEnabled = false }; + MenuItem open = new MenuItem() { Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") }; + MenuItem settings = new MenuItem() { Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings") }; + MenuItem exit = new MenuItem() { Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit") }; - var open = items.Add(InternationalizationManager.Instance.GetTranslation("iconTrayOpen")); open.Click += (o, e) => Visibility = Visibility.Visible; - var setting = items.Add(InternationalizationManager.Instance.GetTranslation("iconTraySettings")); - setting.Click += (o, e) => App.API.OpenSettingDialog(); - var exit = items.Add(InternationalizationManager.Instance.GetTranslation("iconTrayExit")); + settings.Click += (o, e) => App.API.OpenSettingDialog(); exit.Click += (o, e) => Close(); + contextMenu.Items.Add(header); + contextMenu.Items.Add(open); + contextMenu.Items.Add(settings); + contextMenu.Items.Add(exit); - _notifyIcon.ContextMenuStrip = menu; + _notifyIcon.ContextMenuStrip = menu; /*it need for close the context menu. if not, context menu can't close. */ _notifyIcon.MouseClick += (o, e) => { - if (e.Button == MouseButtons.Left) + switch (e.Button) { - if (menu.Visible) - { - menu.Close(); - } - else - { - var p = System.Windows.Forms.Cursor.Position; - menu.Show(p); - } + case MouseButtons.Left: + _viewModel.ToggleFlowLauncher(); + break; + + case MouseButtons.Right: + contextMenu.IsOpen = true; + break; } }; } From 02036f13a401cb87628aa2f3229de57312d28f29 Mon Sep 17 00:00:00 2001 From: DB p Date: Wed, 20 Oct 2021 23:58:34 +0900 Subject: [PATCH 005/110] add width slider --- .../UserSettings/Settings.cs | 11 +++++++++- Flow.Launcher/SettingWindow.xaml | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 907314ba8..b9afa819a 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -10,10 +10,19 @@ namespace Flow.Launcher.Infrastructure.UserSettings public class Settings : BaseModel { private string language = "en"; - + private int windowsize = 580; public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}"; public string OpenResultModifiers { get; set; } = KeyConstant.Alt; public bool ShowOpenResultHotkey { get; set; } = true; + public int WindowSize + { + get => windowsize; set + { + windowsize = value; + OnPropertyChanged(); + } + } + public string Language { get => language; set diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 7dc8829be..8873d8aae 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -674,6 +674,24 @@ + + + + + + + + + + + +  + + + + + @@ -753,6 +771,7 @@ + @@ -765,6 +784,7 @@ + From 616e98af6022615797df4258703a2cfd51ea6aa1 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 21 Oct 2021 10:07:11 +0900 Subject: [PATCH 006/110] wip --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 4 ++-- Flow.Launcher/Themes/Base.xaml | 5 +++-- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 6 ++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index b9afa819a..99879e64e 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -10,11 +10,11 @@ namespace Flow.Launcher.Infrastructure.UserSettings public class Settings : BaseModel { private string language = "en"; - private int windowsize = 580; + public double windowsize = 580; public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}"; public string OpenResultModifiers { get; set; } = KeyConstant.Alt; public bool ShowOpenResultHotkey { get; set; } = true; - public int WindowSize + public double WindowSize { get => windowsize; set { diff --git a/Flow.Launcher/Themes/Base.xaml b/Flow.Launcher/Themes/Base.xaml index 19612af70..d7df48d93 100644 --- a/Flow.Launcher/Themes/Base.xaml +++ b/Flow.Launcher/Themes/Base.xaml @@ -1,6 +1,7 @@  + xmlns:system="clr-namespace:System;assembly=mscorlib" + xmlns:userSettings="clr-namespace:Flow.Launcher"> diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index e85d01b1b..cbb99962b 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -304,6 +304,12 @@ namespace Flow.Launcher.ViewModel } } + public double WindowWidthSize + { + get { return Settings.WindowSize; } + set { Settings.WindowSize = value; } + } + public bool UseGlyphIcons { get { return Settings.UseGlyphIcons; } From 6af1262ca6255ec7ad58b6e86d3fbb0abc5873f9 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 21 Oct 2021 18:16:05 +0900 Subject: [PATCH 007/110] Adjust Width in Theme.cs --- Flow.Launcher.Core/Resource/Theme.cs | 7 ++++--- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 1 + Flow.Launcher/SettingWindow.xaml | 2 +- Flow.Launcher/Themes/Base.xaml | 4 ++-- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 4648aef63..d934491be 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -191,7 +191,7 @@ namespace Flow.Launcher.Core.Resource } var windowStyle = dict["WindowStyle"] as Style; - + /* var width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") .Select(x => x.Value).FirstOrDefault(); @@ -202,9 +202,10 @@ namespace Flow.Launcher.Core.Resource width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") .Select(x => x.Value).FirstOrDefault(); } - + */ + var width = Settings.WindowSize; + windowStyle.Setters.Add(new Setter(Window.WidthProperty, width)); mainWindowWidth = (double)width; - return dict; } diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 99879e64e..3bae6a24c 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -21,6 +21,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings windowsize = value; OnPropertyChanged(); } + } public string Language diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8873d8aae..403e6adaf 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -683,7 +683,7 @@ Click="OpenPluginFolder" Grid.Column="2">Open Theme Folder--> - +  diff --git a/Flow.Launcher/Themes/Base.xaml b/Flow.Launcher/Themes/Base.xaml index d7df48d93..ad13e0101 100644 --- a/Flow.Launcher/Themes/Base.xaml +++ b/Flow.Launcher/Themes/Base.xaml @@ -1,7 +1,7 @@  + xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"> diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index cbb99962b..b5fc2d803 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -307,7 +307,7 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get { return Settings.WindowSize; } - set { Settings.WindowSize = value; } + set { Settings.WindowSize = value;} } public bool UseGlyphIcons From 5e0172cbf6e4852c3d3970c352d7f5827a65cf7e Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 21 Oct 2021 18:31:14 +0900 Subject: [PATCH 008/110] - Remove Comment - Add String "Window Width Size" --- Flow.Launcher.Core/Resource/Theme.cs | 14 +------------- .../UserSettings/Settings.cs | 2 +- Flow.Launcher/Languages/en.xaml | 1 + Flow.Launcher/SettingWindow.xaml | 6 ++---- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 2 +- 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index d934491be..efd311acb 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -189,20 +189,8 @@ namespace Flow.Launcher.Core.Resource new[] { resultItemStyle, resultSubItemStyle, resultItemSelectedStyle, resultSubItemSelectedStyle, resultHotkeyItemStyle, resultHotkeyItemSelectedStyle }, o => Array.ForEach(setters, p => o.Setters.Add(p))); } - + /* Ignore Theme Window Width and use setting */ var windowStyle = dict["WindowStyle"] as Style; - /* - var width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") - .Select(x => x.Value).FirstOrDefault(); - - if (width == null) - { - windowStyle = dict["BaseWindowStyle"] as Style; - - width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") - .Select(x => x.Value).FirstOrDefault(); - } - */ var width = Settings.WindowSize; windowStyle.Setters.Add(new Setter(Window.WidthProperty, width)); mainWindowWidth = (double)width; diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 3bae6a24c..1d4100138 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -4,7 +4,7 @@ using System.Drawing; using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedModels; - +using Flow.Launcher; namespace Flow.Launcher.Infrastructure.UserSettings { public class Settings : BaseModel diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 4a9b92700..bbb56b9ec 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -82,6 +82,7 @@ Are you sure you want to delete {0} plugin hotkey? Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. + Window Width Size Use Segoe Fluent Icons Use Segoe Fluent Icons for query results where supported diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 403e6adaf..e74cfff79 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -677,13 +677,11 @@ - + - - +  diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index b5fc2d803..0fb6e6969 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -307,7 +307,7 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get { return Settings.WindowSize; } - set { Settings.WindowSize = value;} + set { Settings.WindowSize = value; ThemeManager.Instance.ChangeTheme(Settings.Theme); } } public bool UseGlyphIcons From 6b37adaf0797a407696032cfa3692caac8bca22f Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 21 Oct 2021 18:31:14 +0900 Subject: [PATCH 009/110] - Remove Comment - Add String "Window Width Size" --- Flow.Launcher.Core/Resource/Theme.cs | 14 +------------- .../UserSettings/Settings.cs | 2 +- Flow.Launcher/Languages/en.xaml | 1 + Flow.Launcher/SettingWindow.xaml | 6 ++---- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 6 +++++- 5 files changed, 10 insertions(+), 19 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index d934491be..efd311acb 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -189,20 +189,8 @@ namespace Flow.Launcher.Core.Resource new[] { resultItemStyle, resultSubItemStyle, resultItemSelectedStyle, resultSubItemSelectedStyle, resultHotkeyItemStyle, resultHotkeyItemSelectedStyle }, o => Array.ForEach(setters, p => o.Setters.Add(p))); } - + /* Ignore Theme Window Width and use setting */ var windowStyle = dict["WindowStyle"] as Style; - /* - var width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") - .Select(x => x.Value).FirstOrDefault(); - - if (width == null) - { - windowStyle = dict["BaseWindowStyle"] as Style; - - width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") - .Select(x => x.Value).FirstOrDefault(); - } - */ var width = Settings.WindowSize; windowStyle.Setters.Add(new Setter(Window.WidthProperty, width)); mainWindowWidth = (double)width; diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 3bae6a24c..1d4100138 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -4,7 +4,7 @@ using System.Drawing; using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedModels; - +using Flow.Launcher; namespace Flow.Launcher.Infrastructure.UserSettings { public class Settings : BaseModel diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 4a9b92700..bbb56b9ec 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -82,6 +82,7 @@ Are you sure you want to delete {0} plugin hotkey? Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. + Window Width Size Use Segoe Fluent Icons Use Segoe Fluent Icons for query results where supported diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 403e6adaf..8e20232ac 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -677,13 +677,11 @@ - + - - +  diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index b5fc2d803..67d167113 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -307,7 +307,11 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get { return Settings.WindowSize; } - set { Settings.WindowSize = value;} + set + { + Settings.WindowSize = value; + ThemeManager.Instance.ChangeTheme(Settings.Theme); + } } public bool UseGlyphIcons From 5be44b68eadc64238bb8c9c1b0764440668a0491 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 21 Oct 2021 23:31:51 -0500 Subject: [PATCH 010/110] Add fody and use binding to change width --- Flow.Launcher.Core/Resource/Theme.cs | 1 - .../Flow.Launcher.Infrastructure.csproj | 5 +++++ .../UserSettings/Settings.cs | 17 +++++--------- Flow.Launcher/MainWindow.xaml | 1 + Flow.Launcher/MainWindow.xaml.cs | 5 +++++ Flow.Launcher/ViewModel/MainViewModel.cs | 10 +++++++++ .../ViewModel/SettingWindowViewModel.cs | 22 +++++++++---------- 7 files changed, 36 insertions(+), 25 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index efd311acb..3abb426cb 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -365,7 +365,6 @@ namespace Flow.Launcher.Core.Resource var windowHelper = new WindowInteropHelper(w); // this determines the width of the main query window - w.Width = mainWindowWidth; windowHelper.EnsureHandle(); var accent = new AccentPolicy { AccentState = state }; diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index ef76fd617..e01bc1efd 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -50,10 +50,15 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 1d4100138..614fc1de8 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -5,28 +5,21 @@ using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedModels; using Flow.Launcher; + namespace Flow.Launcher.Infrastructure.UserSettings { public class Settings : BaseModel { private string language = "en"; - public double windowsize = 580; public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}"; public string OpenResultModifiers { get; set; } = KeyConstant.Alt; public bool ShowOpenResultHotkey { get; set; } = true; - public double WindowSize - { - get => windowsize; set - { - windowsize = value; - OnPropertyChanged(); - } - - } + public double WindowSize { get; set; } = 580; public string Language { - get => language; set + get => language; + set { language = value; OnPropertyChanged(); @@ -62,7 +55,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings try { var precisionScore = (SearchPrecisionScore)Enum - .Parse(typeof(SearchPrecisionScore), value); + .Parse(typeof(SearchPrecisionScore), value); QuerySearchPrecision = precisionScore; StringMatcher.Instance.UserSettingSearchPrecision = precisionScore; diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 73b13be8c..dbf329b58 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -26,6 +26,7 @@ LocationChanged="OnLocationChanged" Deactivated="OnDeactivated" PreviewKeyDown="OnKeyDown" + Width="{Binding MainWindowWidth, Mode=OneTime}" Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" d:DataContext="{d:DesignInstance vm:MainViewModel}"> diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 057c3f07d..79682806c 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -19,6 +19,7 @@ using DragEventArgs = System.Windows.DragEventArgs; using KeyEventArgs = System.Windows.Input.KeyEventArgs; using MessageBox = System.Windows.MessageBox; using NotifyIcon = System.Windows.Forms.NotifyIcon; +using System.Windows.Interop; namespace Flow.Launcher { @@ -131,6 +132,10 @@ namespace Flow.Launcher _viewModel.QueryTextCursorMovedToEnd = false; } break; + case nameof(MainViewModel.MainWindowWidth): + MinWidth = _viewModel.MainWindowWidth; + MaxWidth = _viewModel.MainWindowWidth; + break; } }; _settings.PropertyChanged += (o, e) => diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index e54014110..522d10b3a 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -22,6 +22,7 @@ using System.Threading.Channels; using ISavable = Flow.Launcher.Plugin.ISavable; using System.Windows.Threading; using NHotkey; +using Windows.Web.Syndication; namespace Flow.Launcher.ViewModel @@ -63,6 +64,13 @@ namespace Flow.Launcher.ViewModel _lastQuery = new Query(); _settings = settings; + _settings.PropertyChanged += (_, args) => + { + if (args.PropertyName == nameof(Settings.WindowSize)) + { + OnPropertyChanged(nameof(MainWindowWidth)); + } + }; _historyItemsStorage = new FlowLauncherJsonStorage(); _userSelectedRecordStorage = new FlowLauncherJsonStorage(); @@ -378,6 +386,8 @@ namespace Flow.Launcher.ViewModel public Visibility ProgressBarVisibility { get; set; } public Visibility MainWindowVisibility { get; set; } + public double MainWindowWidth => _settings.WindowSize; + public ICommand EscCommand { get; set; } public ICommand SelectNextItemCommand { get; set; } public ICommand SelectPrevItemCommand { get; set; } diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 67d167113..e2c1d9700 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -35,9 +35,11 @@ namespace Flow.Launcher.ViewModel Settings = _storage.Load(); Settings.PropertyChanged += (s, e) => { - if (e.PropertyName == nameof(Settings.ActivateTimes)) + switch (e.PropertyName) { - OnPropertyChanged(nameof(ActivatedTimes)); + case nameof(Settings.ActivateTimes): + OnPropertyChanged(nameof(ActivatedTimes)); + break; } }; } @@ -51,7 +53,7 @@ namespace Flow.Launcher.ViewModel public bool AutoUpdates { - get { return Settings.AutoUpdates; } + get => Settings.AutoUpdates; set { Settings.AutoUpdates = value; @@ -71,7 +73,7 @@ namespace Flow.Launcher.ViewModel private bool _portableMode = DataLocation.PortableDataLocationInUse(); public bool PortableMode { - get { return _portableMode; } + get => _portableMode; set { if (!_portable.CanUpdatePortability()) @@ -306,18 +308,14 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { - get { return Settings.WindowSize; } - set - { - Settings.WindowSize = value; - ThemeManager.Instance.ChangeTheme(Settings.Theme); - } + get => Settings.WindowSize; + set => Settings.WindowSize = value; } public bool UseGlyphIcons { - get { return Settings.UseGlyphIcons; } - set { Settings.UseGlyphIcons = value; } + get => Settings.UseGlyphIcons; + set => Settings.UseGlyphIcons = value; } public Brush PreviewBackground From 674d6154a2156282b9c8bba03e18d5078d308429 Mon Sep 17 00:00:00 2001 From: DB p Date: Fri, 22 Oct 2021 14:39:26 +0900 Subject: [PATCH 011/110] Display Querybox when Using Width slider. --- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index e2c1d9700..c869f5601 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -309,7 +309,11 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get => Settings.WindowSize; - set => Settings.WindowSize = value; + set + { + Settings.WindowSize = value; + Application.Current.MainWindow.Visibility = Visibility.Visible; + } } public bool UseGlyphIcons From 08c643adcc58f90843ddaa9badc2e21ec4c1ca9e Mon Sep 17 00:00:00 2001 From: DB p Date: Fri, 22 Oct 2021 16:41:35 +0900 Subject: [PATCH 012/110] Add "IsMoveToPointEnabled" property --- Flow.Launcher/SettingWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8e20232ac..9126ab4a1 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -681,7 +681,7 @@ - +  From 64a489b3129914543befa8ad4eeae4fc535d97e0 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 22 Oct 2021 13:41:36 -0500 Subject: [PATCH 013/110] Use Hacky way to show up windows when width change. Clear query to prevent large area of window preventing user change width. --- Flow.Launcher/ViewModel/MainViewModel.cs | 15 +++++++++++++-- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 6 +----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 522d10b3a..cd6392cb6 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -52,6 +52,7 @@ namespace Flow.Launcher.ViewModel private ChannelWriter _resultsUpdateChannelWriter; private Task _resultsViewUpdateTask; + private bool _keepVisibility = false; #endregion @@ -64,10 +65,20 @@ namespace Flow.Launcher.ViewModel _lastQuery = new Query(); _settings = settings; - _settings.PropertyChanged += (_, args) => + _settings.PropertyChanged += async (_, args) => { if (args.PropertyName == nameof(Settings.WindowSize)) { + ChangeQueryText(""); + if (MainWindowVisibility == Visibility.Collapsed) + { + ToggleFlowLauncher(); + _keepVisibility = true; + await Task.Delay(1000); + _keepVisibility = false; + Application.Current.MainWindow.Activate(); + } + OnPropertyChanged(nameof(MainWindowWidth)); } }; @@ -742,7 +753,7 @@ namespace Flow.Launcher.ViewModel public void Hide() { - if (MainWindowVisibility != Visibility.Collapsed) + if (MainWindowVisibility != Visibility.Collapsed && !_keepVisibility) { ToggleFlowLauncher(); } diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index c869f5601..e2c1d9700 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -309,11 +309,7 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get => Settings.WindowSize; - set - { - Settings.WindowSize = value; - Application.Current.MainWindow.Visibility = Visibility.Visible; - } + set => Settings.WindowSize = value; } public bool UseGlyphIcons From a83f9df19c978787220cf0f57167ee1b33176d00 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 22 Oct 2021 13:57:22 -0500 Subject: [PATCH 014/110] Revert "Use Hacky way to show up windows when width change." This reverts commit 64a489b3129914543befa8ad4eeae4fc535d97e0. --- Flow.Launcher/ViewModel/MainViewModel.cs | 15 ++------------- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 6 +++++- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index cd6392cb6..522d10b3a 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -52,7 +52,6 @@ namespace Flow.Launcher.ViewModel private ChannelWriter _resultsUpdateChannelWriter; private Task _resultsViewUpdateTask; - private bool _keepVisibility = false; #endregion @@ -65,20 +64,10 @@ namespace Flow.Launcher.ViewModel _lastQuery = new Query(); _settings = settings; - _settings.PropertyChanged += async (_, args) => + _settings.PropertyChanged += (_, args) => { if (args.PropertyName == nameof(Settings.WindowSize)) { - ChangeQueryText(""); - if (MainWindowVisibility == Visibility.Collapsed) - { - ToggleFlowLauncher(); - _keepVisibility = true; - await Task.Delay(1000); - _keepVisibility = false; - Application.Current.MainWindow.Activate(); - } - OnPropertyChanged(nameof(MainWindowWidth)); } }; @@ -753,7 +742,7 @@ namespace Flow.Launcher.ViewModel public void Hide() { - if (MainWindowVisibility != Visibility.Collapsed && !_keepVisibility) + if (MainWindowVisibility != Visibility.Collapsed) { ToggleFlowLauncher(); } diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index e2c1d9700..c869f5601 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -309,7 +309,11 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get => Settings.WindowSize; - set => Settings.WindowSize = value; + set + { + Settings.WindowSize = value; + Application.Current.MainWindow.Visibility = Visibility.Visible; + } } public bool UseGlyphIcons From 9d3096050f51c6a9876234fc8a15b01ac204d4e4 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 22 Oct 2021 15:26:13 -0500 Subject: [PATCH 015/110] Bind width to preview --- Flow.Launcher/SettingWindow.xaml | 250 +++++++++--------- .../ViewModel/SettingWindowViewModel.cs | 6 +- 2 files changed, 124 insertions(+), 132 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 9126ab4a1..a696aefdd 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -68,7 +68,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -432,7 +432,7 @@ - + @@ -457,32 +457,32 @@ - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + - - @@ -494,63 +494,63 @@ - - - + - - - + + - - - - - - - + + + + - - - - - + + + + - + - - - - - - - + + + + + + + - - + + @@ -561,7 +561,7 @@ - + @@ -587,7 +587,7 @@ - + @@ -600,6 +600,35 @@ + + + + + + + + + +  + + + + + + + + + + + + + +  + + + + + - - - - - - - - - - -  - - - - - - - - - - - - - - - - -  - - - - - @@ -789,8 +785,8 @@ - - + + @@ -895,8 +891,8 @@ - - + + @@ -910,7 +906,7 @@ - + @@ -977,53 +973,53 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - + + + - - diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 1d270e42f..120fd328c 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -596,8 +596,17 @@ Style="{DynamicResource SettingSubTitleLabel}" /> - Date: Sun, 31 Oct 2021 08:09:12 +0900 Subject: [PATCH 030/110] - Remove URL - Add Icon --- .../SettingsControl.xaml | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml index 54ef8d8e4..68f5adc3b 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml @@ -56,7 +56,6 @@ - + - + + + Width="130"> - + - + + + + + + + + From 102e7cb1b93c4d29bdd891291b2cf88e770c778c Mon Sep 17 00:00:00 2001 From: DB p Date: Sun, 31 Oct 2021 17:18:03 +0900 Subject: [PATCH 031/110] Fix HideonStartup (#783) --- Flow.Launcher/ViewModel/MainViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 4588a677f..2e0eb4924 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -729,7 +729,7 @@ namespace Flow.Launcher.ViewModel { if (MainWindowVisibility != Visibility.Collapsed) { - ToggleFlowLauncher(); + MainWindowVisibility = Visibility.Collapsed; } } From 58c599e748860e48fefea59b3a30fb8bbddfbe3f Mon Sep 17 00:00:00 2001 From: DB p Date: Mon, 1 Nov 2021 04:35:58 +0900 Subject: [PATCH 032/110] Move "HideEmptyQuery" from toggleflow to hide. --- Flow.Launcher/ViewModel/MainViewModel.cs | 39 +++++++++++------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 4588a677f..fde5bb467 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -704,33 +704,30 @@ namespace Flow.Launcher.ViewModel } else { - switch (_settings.LastQueryMode) - { - case LastQueryMode.Empty: - ChangeQueryText(string.Empty); - Application.Current.MainWindow.Opacity = 0; // Trick for no delay - await Task.Delay(100); - Application.Current.MainWindow.Opacity = 1; - break; - case LastQueryMode.Preserved: - LastQuerySelected = true; - break; - case LastQueryMode.Selected: - LastQuerySelected = false; - break; - default: - throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>"); - } - MainWindowVisibility = Visibility.Collapsed; + Hide(); } } - public void Hide() + public async void Hide() { - if (MainWindowVisibility != Visibility.Collapsed) + switch (_settings.LastQueryMode) { - ToggleFlowLauncher(); + case LastQueryMode.Empty: + ChangeQueryText(string.Empty); + Application.Current.MainWindow.Opacity = 0; // Trick for no delay + await Task.Delay(100); + Application.Current.MainWindow.Opacity = 1; + break; + case LastQueryMode.Preserved: + LastQuerySelected = true; + break; + case LastQueryMode.Selected: + LastQuerySelected = false; + break; + default: + throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>"); } + MainWindowVisibility = Visibility.Collapsed; } #endregion From 5aeab2456b8aceb150f7756d6c32cb86287a3cfb Mon Sep 17 00:00:00 2001 From: DB p Date: Mon, 1 Nov 2021 07:33:59 +0900 Subject: [PATCH 033/110] add force closin --- Flow.Launcher/MainWindow.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 057c3f07d..16c9fd05c 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -53,7 +53,7 @@ namespace Flow.Launcher _viewModel.Save(); e.Cancel = true; await PluginManager.DisposePluginsAsync(); - Application.Current.Shutdown(); + Environment.Exit(0); } private void OnInitialized(object sender, EventArgs e) @@ -185,7 +185,7 @@ namespace Flow.Launcher var setting = items.Add(InternationalizationManager.Instance.GetTranslation("iconTraySettings")); setting.Click += (o, e) => App.API.OpenSettingDialog(); var exit = items.Add(InternationalizationManager.Instance.GetTranslation("iconTrayExit")); - exit.Click += (o, e) => Close(); + exit.Click += (o, e) => Environment.Exit(0); _notifyIcon.ContextMenuStrip = menu; _notifyIcon.MouseClick += (o, e) => From e04284a013d681a3f1fc6d9e5f22819219807e35 Mon Sep 17 00:00:00 2001 From: DB p Date: Mon, 1 Nov 2021 07:33:59 +0900 Subject: [PATCH 034/110] add force closing --- Flow.Launcher/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 057c3f07d..b0e3492d2 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -53,7 +53,7 @@ namespace Flow.Launcher _viewModel.Save(); e.Cancel = true; await PluginManager.DisposePluginsAsync(); - Application.Current.Shutdown(); + Environment.Exit(0); } private void OnInitialized(object sender, EventArgs e) From 323c2422ef1bdaad8cfea04f9116738c3fd4df75 Mon Sep 17 00:00:00 2001 From: kubalav Date: Tue, 2 Nov 2021 19:51:28 +0100 Subject: [PATCH 035/110] Update Slovak translation --- Flow.Launcher/Languages/sk.xaml | 35 ++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index 70a5d3b7c..51b03db5d 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -13,47 +13,58 @@ Nastavenia O aplikácii Ukončiť + Zavrieť Nastavenia Flow Launchera Všeobecné Prenosný režim + Uloží všetky nastavenia a používateľské údaje do jedného centrálneho priečinka (Užitočné pri vyberateľných diskoch a cloudových službách). Spustiť Flow Launcher po štarte systému Schovať Flow Launcher po strate fokusu Nezobrazovať upozornenia na novú verziu Zapamätať si posledné umiestnenie Jazyk Posledné vyhľadávanie + Zobrazí/skryje predchádzajúce výsledky pri opätovnej aktivácii Flow Launchera. Ponechať Označiť Vymazať Max. výsledkov Ignorovať klávesové skratky v režime na celú obrazovku + Zakázať aktiváciu Flow Launchera, keď je aktívna aplikácia na celú obrazovku (odporúčané pre hry). Priečinok s Pythonom Automatická aktualizácia Vybrať Schovať Flow Launcher po spustení Schovať ikonu z oblasti oznámení Presnosť vyhľadávania + Mení minimálne skóre zhody potrebné na zobrazenie výsledkov. Použiť Pinyin Umožňuje vyhľadávanie pomocou Pinyin. Pinyin je štandardný systém romanizovaného pravopisu pre transliteráciu čínštiny Efekt tieňa nie je povolený, kým má aktuálny motív povolený efekt rozostrenia - + - Plugin + Pluginy Nájsť ďalšie pluginy - Povolené - Zakázané + Zap. + Vyp. Skratka akcie Aktuálna akcia skratky: Nová akcia skratky: Aktuálna priorita: Nová priorita: - Priorita: + Priorita Priečinok s pluginmi - Autor + Autor: Príprava: Čas dopytu: + + + + Repozitár pluginov + Obnoviť + Inštalovať Motív @@ -65,12 +76,17 @@ Nepriehľadnosť Motív {0} neexistuje, návrat na predvolený motív Nepodarilo sa nečítať motív {0}, návrat na predvolený motív + Priečinok s motívmi + Otvoriť priečinok s motívmi Klávesové skratky Klávesová skratka pre Flow Launcher - Modifikáčné klávesy na otvorenie výsledkov + Zadajte skratku na zobrazenie/skrytie Flow Launchera. + Otvoriť výsledok modifikačným klávesom + Vyberte modifikačný kláves na otvorenie výsledku pomocou klávesnice. Zobraziť klávesovú skratku + Zobrazí klávesovú skratku spolu s výsledkami. Vlastná klávesová skratka na vyhľadávanie Dopyt Odstrániť @@ -115,6 +131,7 @@ Tipy na používanie: + Zmena priority Vyššie číslo znamená, že výsledok bude vyššie. Skúste nastaviť napr. 5. Ak chcete, aby boli výsledky nižšie ako ktorékoľvek iné doplnky, zadajte záporné číslo Prosím, zadajte platné číslo pre prioritu! @@ -160,8 +177,8 @@ Čakajte, prosím… - Kontrolujú sa akutalizácie - Už máte najnovšiu verizu Flow Launchera + Kontrolujú sa aktualizácie + Už máte najnovšiu verziu Flow Launchera Bola nájdená aktualizácia Aktualizuje sa… Flow Launcher nedokázal presunúť používateľské údaje do aktualizovanej verzie. From 6f004a4774718c83e81a5c1a3c5974710788de3b Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Tue, 2 Nov 2021 15:07:11 -0500 Subject: [PATCH 036/110] Custom Explorer Binding (Part 1) --- .../UserSettings/CustomExplorerViewModel.cs | 17 ++ .../UserSettings/Settings.cs | 25 +++ Flow.Launcher/App.xaml.cs | 2 +- Flow.Launcher/Languages/en.xaml | 3 +- Flow.Launcher/SelectFileManagerWindow.xaml | 208 +++++++++++------- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 9 +- Flow.Launcher/SettingWindow.xaml.cs | 2 +- 7 files changed, 181 insertions(+), 85 deletions(-) create mode 100644 Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs diff --git a/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs new file mode 100644 index 000000000..4fd5e317a --- /dev/null +++ b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Flow.Launcher.ViewModel +{ + public class CustomExplorerViewModel + { + public string Name { get; set; } + public string Path { get; set; } + public string FileArgument { get; set; } = "\"%d\""; + public string DirectoryArgument { get; set; } = "\"%d\""; + public bool Editable { get; init; } = true; + } +} diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 102446158..f1c5fd442 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -1,9 +1,11 @@ using System; +using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedModels; +using Flow.Launcher.ViewModel; namespace Flow.Launcher.Infrastructure.UserSettings { @@ -34,6 +36,29 @@ namespace Flow.Launcher.Infrastructure.UserSettings public string ResultFontStretch { get; set; } public bool UseGlyphIcons { get; set; } = true; + public CustomExplorerViewModel CustomExplorer { get; set; } + public List CustomExplorerList { get; set; } = new() + { + new() + { + Name = "Explorer", + Path = "explorer", + FileArgument = "/select, \"%f\"", + DirectoryArgument = "\"%d\"", + Editable = false + }, + new() + { + Name = "Total Commander", + Path = @"C:\Program Files\TOTALCMD\totalcommander.exe" + }, + new() + { + Name = "Dopus", + Path = @"c:\programe files\dopus\dopus.exe" + } + }; + /// /// when false Alphabet static service will always return empty results diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 8c869e941..75925b1e0 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -101,7 +101,7 @@ namespace Flow.Launcher API.SaveAppAllSettings(); - _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible; + _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Collapsed : Visibility.Visible; Log.Info("|App.OnStartup|End Flow Launcher startup ---------------------------------------------------- "); }); } diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 15954c896..84f7c06b1 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -135,7 +135,8 @@ Please specify the file location of the file manager you using and add arguments (optional) if necessary. File Manager Path - Argument + Argument For Directory + Argument For File Parent Directory Change Priority diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml index 9fb9ee1cd..55eceae27 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -2,112 +2,154 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Flow.Launcher" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.modernwpf.com/2019" - xmlns:local="clr-namespace:Flow.Launcher" - mc:Ignorable="d" + Title="{DynamicResource fileManagerWindow}" + Width="500" + Height="420" + Background="#f3f3f3" + DataContext="{Binding RelativeSource={RelativeSource Self}}" + ResizeMode="NoResize" WindowStartupLocation="CenterScreen" - Title="{DynamicResource fileManagerWindow}" Height="420" Width="500" ResizeMode="NoResize" Background="#f3f3f3"> + mc:Ignorable="d"> - + - + - - + + - + - - - - - - - - + + + + + + + + - - + + - + - + - - + + - - - - - - + + + + + + + + @@ -116,10 +158,16 @@ - - diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index 6fcf6feef..429ccec49 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -1,4 +1,6 @@ -using System; +using Flow.Launcher.Infrastructure.UserSettings; +using Flow.Launcher.ViewModel; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -19,8 +21,11 @@ namespace Flow.Launcher /// public partial class SelectFileManagerWindow : Window { - public SelectFileManagerWindow() + public Settings Settings { get; } + + public SelectFileManagerWindow(Settings settings) { + Settings = settings; InitializeComponent(); } } diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 80f82e8ed..3066778c1 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -117,7 +117,7 @@ namespace Flow.Launcher private void OnSelectFileManagerClick(object sender, RoutedEventArgs e) { - SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow(); + SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow(settings); fileManagerChangeWindow.ShowDialog(); } From c2a633097b16e51e5242eeb5b69e6b125c0a3874 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Wed, 3 Nov 2021 08:17:57 +1100 Subject: [PATCH 037/110] update wording and bump WebSearch version --- Flow.Launcher/CustomQueryHotkeySetting.xaml.cs | 1 - Flow.Launcher/HotkeyControl.xaml.cs | 2 -- Flow.Launcher/SettingWindow.xaml.cs | 2 +- Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml | 4 ++-- Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs index 6d50ab2b0..0109474e1 100644 --- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs +++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs @@ -9,7 +9,6 @@ using System.Windows; using System.Windows.Input; using System.Windows.Controls; - namespace Flow.Launcher { public partial class CustomQueryHotkeySetting : Window diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs index 43aaa4889..2b6e275df 100644 --- a/Flow.Launcher/HotkeyControl.xaml.cs +++ b/Flow.Launcher/HotkeyControl.xaml.cs @@ -81,8 +81,6 @@ namespace Flow.Launcher } } - - public void SetHotkey(string keyStr, bool triggerValidate = true) { SetHotkey(new HotkeyModel(keyStr), triggerValidate); diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index c8b5e29ec..203248ad6 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -281,6 +281,7 @@ namespace Flow.Launcher API.ShowMainWindow(); } } + private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */ { TextBox textBox = Keyboard.FocusedElement as TextBox; @@ -290,6 +291,5 @@ namespace Flow.Launcher textBox.MoveFocus(tRequest); } } - } } \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml index cc19b57ca..632b6d3a3 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml @@ -19,9 +19,9 @@ Autocomplete Data from: Please select a web search Are you sure you want to delete {0}? - If you have a web search on the service you want to use, you can add it to the Flow. For example, You can check the following formats in the address bar when you search 'casino' on Netflix . "https://www.netflix.com/search?q=Casino" So, you change the search word area as follows. + If you have a web search service you want to use, you can add it to Flow. For example, you can follow the url format in the address bar if you want to search 'casino' on Netflix: "https://www.netflix.com/search?q=Casino". To do this, change the search term 'Casino' as follows. https://www.netflix.com/search?q={q} - And add it to the place URL in this window, then you can search Netflix in Flow. + Add it to the URL section below. You can now search Netflix with Flow using any search terms. diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json index 679f976d3..f83b1e40b 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json @@ -26,7 +26,7 @@ "Name": "Web Searches", "Description": "Provide the web search ability", "Author": "qianlifeng", - "Version": "1.4.0", + "Version": "1.4.1", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll", From ad88e3fb34ef7d3e53916d64ac95650ff83ad8e7 Mon Sep 17 00:00:00 2001 From: kubalav Date: Wed, 3 Nov 2021 09:21:10 +0100 Subject: [PATCH 038/110] Update Slovak translation + bump version --- Flow.Launcher/Languages/sk.xaml | 11 +++++++---- Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml | 2 ++ Plugins/Flow.Launcher.Plugin.Sys/plugin.json | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index 51b03db5d..4014d215f 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -49,6 +49,7 @@ Nájsť ďalšie pluginy Zap. Vyp. + Nastavenie kľúčového slova akcie Skratka akcie Aktuálna akcia skratky: Nová akcia skratky: @@ -68,7 +69,8 @@ Motív - Prehliadať viac motívov + Galéria motívov + Ako vytvoriť motív Ahojte Písmo vyhľadávacieho poľa Písmo výsledkov @@ -104,7 +106,7 @@ Povoliť HTTP Proxy HTTP Server Port - Použív. meno + Používateľské meno Heslo Test Proxy Uložiť @@ -145,10 +147,11 @@ Nová skratka pre akciu bola priradená pre iný plugin, prosím, zvoľte inú skratku Úspešné Úspešne dokončené - Použite * ak nechcete určiť skratku pre akciu + Zadajte skratku akcie, ktorá je potrebná na spustenie pluginu. Ak nechcete zadať skratku akcie, použite *. V tom prípade plugin funguje bez kľúčových slov. - Vlastná klávesová skratka pre plugin + Klávesová skratka pre vlastné vyhľadávanie + Stlačením klávesovej skratky sa automaticky vloží zadaný výraz. Náhľad Klávesová skratka je nedostupná, prosím, zadajte novú Neplatná klávesová skratka pluginu diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml index 1b64699cd..f58574854 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml +++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml @@ -8,6 +8,7 @@ Vypnúť počítač Reštartovať počítač + Reštartovať počítač s rozšírenými možnosťami spúšťania pre núdzový režim a režim ladenia, ako aj s ďalšími možnosťami Odhlásiť Zamknúť počítač Zavrieť Flow Launcher @@ -29,6 +30,7 @@ Všetky dáta pluginov aktualizované Naozaj chcete počítač vypnúť? Naozaj chcete počítač reštartovať? + Naozaj chcete počítač reštartovať s pokročilými možnosťami spúšťania? Systémové príkazy Poskytuje príkazy súvisiace so systémom ako je vypnutie, uzamknutie počítača atď. diff --git a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json index 1bfcd92a5..826a1b756 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json @@ -4,7 +4,7 @@ "Name": "System Commands", "Description": "Provide System related commands. e.g. shutdown,lock, setting etc.", "Author": "qianlifeng", - "Version": "1.4.0", + "Version": "1.4.1", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll", From 58ee77f40f2819ee00e0a1f975b86d58b34c9e4e Mon Sep 17 00:00:00 2001 From: kubalav Date: Wed, 3 Nov 2021 09:29:33 +0100 Subject: [PATCH 039/110] Removed extra spaces before chevrons --- Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml | 2 +- Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml index 62f95534a..cb52898f2 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml @@ -14,7 +14,7 @@ Prehliadať Kopírovať URL Kopírovať URL záložky do schránky - Načítať prehliadač z: + Načítať prehliadač z: Názov prehliadača Umiestnenie priečinka Data Pridať diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml index f58574854..42bfcab44 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml +++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml @@ -8,7 +8,7 @@ Vypnúť počítač Reštartovať počítač - Reštartovať počítač s rozšírenými možnosťami spúšťania pre núdzový režim a režim ladenia, ako aj s ďalšími možnosťami + Reštartovať počítač s rozšírenými možnosťami spúšťania pre núdzový režim a režim ladenia, ako aj s ďalšími možnosťami Odhlásiť Zamknúť počítač Zavrieť Flow Launcher From 0a74766b9a7ee2f727e86c0b9301a640d840560f Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Fri, 5 Nov 2021 07:39:10 +1100 Subject: [PATCH 040/110] remove obsolete comment --- Flow.Launcher.Core/Resource/Theme.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 3abb426cb..6561419a1 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -364,7 +364,6 @@ namespace Flow.Launcher.Core.Resource { var windowHelper = new WindowInteropHelper(w); - // this determines the width of the main query window windowHelper.EnsureHandle(); var accent = new AccentPolicy { AccentState = state }; From 17f8ffed2d8acfa440d606028bb6daa31fb7e86c Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Fri, 5 Nov 2021 08:00:01 +1100 Subject: [PATCH 041/110] version bump BrowserBookmarks plugin --- Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json index 7d124169b..d72db3a90 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json @@ -4,7 +4,7 @@ "Name": "Browser Bookmarks", "Description": "Search your browser bookmarks", "Author": "qianlifeng, Ioannis G.", - "Version": "1.5.2", + "Version": "1.5.3", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.BrowserBookmark.dll", From 6498c6bd53cf87188bcf4782a5841132664c749d Mon Sep 17 00:00:00 2001 From: DB p Date: Fri, 5 Nov 2021 10:12:35 +0900 Subject: [PATCH 042/110] Merge dev for fix conflict --- Flow.Launcher/SettingWindow.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index ad77dee55..f90ebf4f9 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1114,7 +1114,7 @@ - + @@ -1131,7 +1131,7 @@ - Date: Fri, 5 Nov 2021 12:23:46 -0500 Subject: [PATCH 043/110] Reformat xaml code --- Flow.Launcher/SettingWindow.xaml | 1503 ++++++++++++++++++------------ 1 file changed, 900 insertions(+), 603 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index f90ebf4f9..433feeb9f 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1,28 +1,29 @@ - + Icon="Images\app.ico" + Loaded="OnLoaded" + MouseDown="window_MouseDown" + ResizeMode="CanResizeWithGrip" + WindowStartupLocation="CenterScreen" + mc:Ignorable="d"> @@ -32,7 +33,7 @@ - + @@ -46,9 +47,9 @@ - + - + @@ -60,25 +61,25 @@ - - + + - - + - - @@ -768,10 +829,13 @@ - - + + - + - + - - - + + + - - + + - + - - + + @@ -1185,47 +1395,56 @@ - - + + - - + + - + - - + + - - + + - - + + - - - - + + + + @@ -1239,26 +1458,32 @@ - + - - + + - - - - + + + + @@ -1272,8 +1497,11 @@ - + @@ -1282,17 +1510,23 @@ - + - + - - + Click="OpenPluginFolder" + Content="{DynamicResource OpenThemeFolder}" + DockPanel.Dock="Top" /> + @@ -1312,17 +1546,21 @@ - + - + - + @@ -1331,83 +1569,99 @@ - + - + - - + + - + - + - + - + - - + + - + SelectedItem="{Binding Settings.OpenResultModifiers}" /> - - + + - - - + + + - + - - + + Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"> - + - + @@ -1417,21 +1671,31 @@ - - + Margin="5,0,0,0" + Content="{DynamicResource done}" + Click="btnDone_Click" + /> diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index 429ccec49..7ac8dc1cf 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -2,6 +2,7 @@ using Flow.Launcher.ViewModel; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -19,14 +20,43 @@ namespace Flow.Launcher /// /// SelectFileManagerWindow.xaml에 대한 상호 작용 논리 /// - public partial class SelectFileManagerWindow : Window + public partial class SelectFileManagerWindow : Window, INotifyPropertyChanged { + private int selectedCustomExplorerIndex; + + public event PropertyChangedEventHandler PropertyChanged; + public Settings Settings { get; } + public int SelectedCustomExplorerIndex + { + get => selectedCustomExplorerIndex; set + { + selectedCustomExplorerIndex = value; + PropertyChanged?.Invoke(this, new(nameof(CustomExplorer))); + } + } + public List CustomExplorers { get; set; } + + public CustomExplorerViewModel CustomExplorer => CustomExplorers[SelectedCustomExplorerIndex]; public SelectFileManagerWindow(Settings settings) { Settings = settings; + CustomExplorers = Settings.CustomExplorerList.Select(x => x.Copy()).ToList(); + SelectedCustomExplorerIndex = Settings.CustomExplorerIndex; InitializeComponent(); } + + private void btnCancel_Click(object sender, RoutedEventArgs e) + { + Close(); + } + + private void btnDone_Click(object sender, RoutedEventArgs e) + { + Settings.CustomExplorerIndex = SelectedCustomExplorerIndex; + Settings.CustomExplorerList = CustomExplorers; + Close(); + } } } diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8e9bc8042..e8064a421 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -618,7 +618,7 @@ diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml index 9db840ad4..d4cf96e86 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml @@ -1,79 +1,164 @@ - - + + - - - + + + - - - - - + + + + + - - - + + Visibility="{Binding ActionKeywordsVisibility}" /> @@ -1455,8 +1455,8 @@ - + @@ -1840,11 +1840,18 @@ BorderThickness="0" Style="{DynamicResource SettingGroupBox}"> - - + + - + @@ -2060,10 +2067,7 @@ - + Date: Mon, 8 Nov 2021 10:53:13 +0900 Subject: [PATCH 065/110] Change the text to string --- Flow.Launcher/Languages/en.xaml | 2 + Flow.Launcher/SettingWindow.xaml | 2011 +++++++++++++++++------------- 2 files changed, 1174 insertions(+), 839 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 3884d6997..289aec337 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -34,6 +34,8 @@ Maximum results shown Ignore hotkeys in fullscreen mode Disable Flow Launcher activation when a full screen application is active (Recommended for games). + Default File Manager + Select the file manager to use when opening the folder. Python Directory Auto Update Select diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index e8064a421..c567812f8 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1,29 +1,30 @@ - + @@ -47,9 +48,15 @@ - + - + @@ -115,20 +122,25 @@ - - - + + + @@ -154,20 +166,25 @@ - - - + + + @@ -203,19 +220,21 @@ - - + + @@ -273,19 +292,21 @@ - - + + @@ -341,15 +362,17 @@ - - + + @@ -361,10 +384,11 @@ - + @@ -373,19 +397,22 @@ - - - + + + @@ -397,39 +424,46 @@ - + - + - + - - + + @@ -441,11 +475,12 @@ - + @@ -486,11 +521,12 @@ - + @@ -502,12 +538,16 @@ - - + + @@ -518,15 +558,17 @@ - - + + @@ -538,69 +580,100 @@ - - + + - + - + - + - + - - + + - + - + - - + + - - - + + + @@ -608,43 +681,61 @@ - + - - + + - - -  + +  - + - - + Content="{Binding Settings.CustomExplorer.Name}" /> Date: Mon, 8 Nov 2021 23:26:24 +0900 Subject: [PATCH 072/110] - Adjust Priority Button --- Flow.Launcher/SettingWindow.xaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 049b0aa0c..5c9e80a5a 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -827,7 +827,7 @@ + TextWrapping="WrapWithOverflow"> @@ -838,10 +838,10 @@ VerticalAlignment="Center" FontSize="12" Text="{DynamicResource priority}" /> - + diff --git a/Flow.Launcher/PriorityChangeWindow.xaml.cs b/Flow.Launcher/PriorityChangeWindow.xaml.cs index 0adb1f080..8f392f0a3 100644 --- a/Flow.Launcher/PriorityChangeWindow.xaml.cs +++ b/Flow.Launcher/PriorityChangeWindow.xaml.cs @@ -26,7 +26,6 @@ namespace Flow.Launcher private Settings settings; private readonly Internationalization translater = InternationalizationManager.Instance; private readonly PluginViewModel pluginViewModel; - public PriorityChangeWindow(string pluginId, Settings settings, PluginViewModel pluginViewModel) { InitializeComponent(); @@ -62,8 +61,18 @@ namespace Flow.Launcher private void PriorityChangeWindow_Loaded(object sender, RoutedEventArgs e) { - OldPriority.Text = pluginViewModel.Priority.ToString(); + tbAction.Text = pluginViewModel.Priority.ToString(); + //OldPriority.Text = pluginViewModel.Priority.ToString(); tbAction.Focus(); } + private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */ + { + TextBox textBox = Keyboard.FocusedElement as TextBox; + if (textBox != null) + { + TraversalRequest tRequest = new TraversalRequest(FocusNavigationDirection.Next); + textBox.MoveFocus(tRequest); + } + } } } \ No newline at end of file diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml index 70fb18e2d..cd956d265 100644 --- a/Flow.Launcher/Resources/CustomControlTemplate.xaml +++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml @@ -4,6 +4,535 @@ xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:ui="http://schemas.modernwpf.com/2019"> + + + + + + + + + + + + + + + + + + + + + + + + + + result = dlg.ShowDialog(); + + if (result == true) + { + TextBox path = (TextBox)(((FrameworkElement)sender).Parent as FrameworkElement).FindName("PathTextBox"); + path.Text = dlg.FileName; + path.Focus(); + ((Button)sender).Focus(); + } + } } } From c6054d4c56bdfa6a56193bb920a5a333915eb171 Mon Sep 17 00:00:00 2001 From: DB p Date: Sun, 31 Oct 2021 03:49:23 +0900 Subject: [PATCH 078/110] Add File Manager Item and popup window --- Flow.Launcher/SelectFileManagerWindow.xaml | 58 +++++++++++++++++++ Flow.Launcher/SelectFileManagerWindow.xaml.cs | 27 +++++++++ Flow.Launcher/SettingWindow.xaml | 22 ++++++- Flow.Launcher/SettingWindow.xaml.cs | 6 ++ 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 Flow.Launcher/SelectFileManagerWindow.xaml create mode 100644 Flow.Launcher/SelectFileManagerWindow.xaml.cs diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml new file mode 100644 index 000000000..1a846710f --- /dev/null +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs new file mode 100644 index 000000000..6fcf6feef --- /dev/null +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace Flow.Launcher +{ + /// + /// SelectFileManagerWindow.xaml에 대한 상호 작용 논리 + /// + public partial class SelectFileManagerWindow : Window + { + public SelectFileManagerWindow() + { + InitializeComponent(); + } + } +} diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 433feeb9f..55c650378 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -608,7 +608,27 @@ - + + + + + + + + diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 55c650378..8e9bc8042 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -617,8 +617,17 @@ Style="{DynamicResource SettingSubTitleLabel}" /> - Date: Tue, 2 Nov 2021 15:07:11 -0500 Subject: [PATCH 080/110] Custom Explorer Binding (Part 1) --- .../UserSettings/CustomExplorerViewModel.cs | 17 ++ .../UserSettings/Settings.cs | 25 +++ Flow.Launcher/App.xaml.cs | 2 +- Flow.Launcher/Languages/en.xaml | 3 +- Flow.Launcher/SelectFileManagerWindow.xaml | 208 +++++++++++------- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 9 +- Flow.Launcher/SettingWindow.xaml.cs | 2 +- 7 files changed, 181 insertions(+), 85 deletions(-) create mode 100644 Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs diff --git a/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs new file mode 100644 index 000000000..4fd5e317a --- /dev/null +++ b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Flow.Launcher.ViewModel +{ + public class CustomExplorerViewModel + { + public string Name { get; set; } + public string Path { get; set; } + public string FileArgument { get; set; } = "\"%d\""; + public string DirectoryArgument { get; set; } = "\"%d\""; + public bool Editable { get; init; } = true; + } +} diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 5f9082fe9..53ced1524 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -1,10 +1,12 @@ using System; +using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedModels; using Flow.Launcher; +using Flow.Launcher.ViewModel; namespace Flow.Launcher.Infrastructure.UserSettings { @@ -37,6 +39,29 @@ namespace Flow.Launcher.Infrastructure.UserSettings public string ResultFontStretch { get; set; } public bool UseGlyphIcons { get; set; } = true; + public CustomExplorerViewModel CustomExplorer { get; set; } + public List CustomExplorerList { get; set; } = new() + { + new() + { + Name = "Explorer", + Path = "explorer", + FileArgument = "/select, \"%f\"", + DirectoryArgument = "\"%d\"", + Editable = false + }, + new() + { + Name = "Total Commander", + Path = @"C:\Program Files\TOTALCMD\totalcommander.exe" + }, + new() + { + Name = "Dopus", + Path = @"c:\programe files\dopus\dopus.exe" + } + }; + /// /// when false Alphabet static service will always return empty results diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 8c869e941..75925b1e0 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -101,7 +101,7 @@ namespace Flow.Launcher API.SaveAppAllSettings(); - _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible; + _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Collapsed : Visibility.Visible; Log.Info("|App.OnStartup|End Flow Launcher startup ---------------------------------------------------- "); }); } diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 9d8e0caa0..e8469763f 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -138,7 +138,8 @@ Please specify the file location of the file manager you using and add arguments (optional) if necessary. File Manager Path - Argument + Argument For Directory + Argument For File Parent Directory Change Priority diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml index 9fb9ee1cd..55eceae27 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -2,112 +2,154 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Flow.Launcher" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.modernwpf.com/2019" - xmlns:local="clr-namespace:Flow.Launcher" - mc:Ignorable="d" + Title="{DynamicResource fileManagerWindow}" + Width="500" + Height="420" + Background="#f3f3f3" + DataContext="{Binding RelativeSource={RelativeSource Self}}" + ResizeMode="NoResize" WindowStartupLocation="CenterScreen" - Title="{DynamicResource fileManagerWindow}" Height="420" Width="500" ResizeMode="NoResize" Background="#f3f3f3"> + mc:Ignorable="d"> - + - + - - + + - + - - - - - - - - + + + + + + + + - - + + - + - + - - + + - - - - - - + + + + + + + + @@ -116,10 +158,16 @@ - - diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index 6fcf6feef..429ccec49 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -1,4 +1,6 @@ -using System; +using Flow.Launcher.Infrastructure.UserSettings; +using Flow.Launcher.ViewModel; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -19,8 +21,11 @@ namespace Flow.Launcher /// public partial class SelectFileManagerWindow : Window { - public SelectFileManagerWindow() + public Settings Settings { get; } + + public SelectFileManagerWindow(Settings settings) { + Settings = settings; InitializeComponent(); } } diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 62ef96b38..38ede8076 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -117,7 +117,7 @@ namespace Flow.Launcher private void OnSelectFileManagerClick(object sender, RoutedEventArgs e) { - SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow(); + SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow(settings); fileManagerChangeWindow.ShowDialog(); } From 6bfebe9fbd77acdfe2075ee644ecfc7addae0b3f Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 5 Nov 2021 12:53:53 -0500 Subject: [PATCH 081/110] Revert a test change --- Flow.Launcher/App.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 75925b1e0..8c869e941 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -101,7 +101,7 @@ namespace Flow.Launcher API.SaveAppAllSettings(); - _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Collapsed : Visibility.Visible; + _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible; Log.Info("|App.OnStartup|End Flow Launcher startup ---------------------------------------------------- "); }); } From a69f4a7ea636fd8acc4f2117886bb574f20586d3 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 5 Nov 2021 14:16:20 -0500 Subject: [PATCH 082/110] File Explore Binding (Part 2) --- .../UserSettings/CustomExplorerViewModel.cs | 17 ++++++++-- .../UserSettings/Settings.cs | 8 ++++- Flow.Launcher/SelectFileManagerWindow.xaml | 17 +++++----- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 32 ++++++++++++++++++- Flow.Launcher/SettingWindow.xaml | 2 +- 5 files changed, 63 insertions(+), 13 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs index 4fd5e317a..7806debe1 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs @@ -1,4 +1,5 @@ -using System; +using Flow.Launcher.Plugin; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,12 +7,24 @@ using System.Threading.Tasks; namespace Flow.Launcher.ViewModel { - public class CustomExplorerViewModel + public class CustomExplorerViewModel : BaseModel { public string Name { get; set; } public string Path { get; set; } public string FileArgument { get; set; } = "\"%d\""; public string DirectoryArgument { get; set; } = "\"%d\""; public bool Editable { get; init; } = true; + + public CustomExplorerViewModel Copy() + { + return new CustomExplorerViewModel + { + Name = Name, + Path = Path, + FileArgument = FileArgument, + DirectoryArgument = DirectoryArgument, + Editable = Editable + }; + } } } diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 53ced1524..f753a4a1a 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -39,7 +39,13 @@ namespace Flow.Launcher.Infrastructure.UserSettings public string ResultFontStretch { get; set; } public bool UseGlyphIcons { get; set; } = true; - public CustomExplorerViewModel CustomExplorer { get; set; } + public int CustomExplorerIndex { get; set; } = 0; + public CustomExplorerViewModel CustomExplorer + { + get => CustomExplorerList[CustomExplorerIndex]; + set => CustomExplorerList[CustomExplorerIndex] = value; + } + public List CustomExplorerList { get; set; } = new() { new() diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml index 55eceae27..ff472f007 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -53,9 +53,8 @@ Margin="14,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" - ItemsSource="{Binding Settings.CustomExplorerList}" - SelectedIndex="0" - SelectedItem="{Binding Settings.CustomExplorer}"> + ItemsSource="{Binding CustomExplorers}" + SelectedIndex="{Binding SelectedCustomExplorerIndex}"> @@ -66,7 +65,7 @@ @@ -163,13 +162,15 @@ Width="100" Height="30" Margin="0,0,5,0" - Content="{DynamicResource cancel}" /> + Content="{DynamicResource cancel}" + Click="btnCancel_Click"/> + Margin="5,0,0,0" + Content="{DynamicResource done}" + Click="btnDone_Click" + /> diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index 429ccec49..7ac8dc1cf 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -2,6 +2,7 @@ using Flow.Launcher.ViewModel; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -19,14 +20,43 @@ namespace Flow.Launcher /// /// SelectFileManagerWindow.xaml에 대한 상호 작용 논리 /// - public partial class SelectFileManagerWindow : Window + public partial class SelectFileManagerWindow : Window, INotifyPropertyChanged { + private int selectedCustomExplorerIndex; + + public event PropertyChangedEventHandler PropertyChanged; + public Settings Settings { get; } + public int SelectedCustomExplorerIndex + { + get => selectedCustomExplorerIndex; set + { + selectedCustomExplorerIndex = value; + PropertyChanged?.Invoke(this, new(nameof(CustomExplorer))); + } + } + public List CustomExplorers { get; set; } + + public CustomExplorerViewModel CustomExplorer => CustomExplorers[SelectedCustomExplorerIndex]; public SelectFileManagerWindow(Settings settings) { Settings = settings; + CustomExplorers = Settings.CustomExplorerList.Select(x => x.Copy()).ToList(); + SelectedCustomExplorerIndex = Settings.CustomExplorerIndex; InitializeComponent(); } + + private void btnCancel_Click(object sender, RoutedEventArgs e) + { + Close(); + } + + private void btnDone_Click(object sender, RoutedEventArgs e) + { + Settings.CustomExplorerIndex = SelectedCustomExplorerIndex; + Settings.CustomExplorerList = CustomExplorers; + Close(); + } } } diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8e9bc8042..e8064a421 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -618,7 +618,7 @@ diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml index 9db840ad4..d4cf96e86 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml @@ -1,79 +1,164 @@ - - + + - - - + + + - - - - - + + + + + - - - -  + +  - + - - + Content="{Binding Settings.CustomExplorer.Name}" /> Date: Wed, 10 Nov 2021 08:30:10 +0900 Subject: [PATCH 101/110] Add File Select Dialogue --- Flow.Launcher/SelectFileManagerWindow.xaml | 41 ++++++++++++++----- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 14 +++++++ 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml index 85d0d14ce..68e7b93b2 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -88,7 +88,7 @@ Orientation="Horizontal"> - + @@ -123,16 +123,35 @@ VerticalAlignment="Center" FontSize="14" Text="{DynamicResource fileManager_path}" /> - + + + + result = dlg.ShowDialog(); + + if (result == true) + { + TextBox path = (TextBox)(((FrameworkElement)sender).Parent as FrameworkElement).FindName("PathTextBox"); + path.Text = dlg.FileName; + path.Focus(); + ((Button)sender).Focus(); + } + } } } From b15ec0f83b01c21cc58d61e038c29ed5a81fde17 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 10 Nov 2021 13:39:15 -0600 Subject: [PATCH 102/110] Json Ignore CustomExplorer Property because we don't use that to store value --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index ce07dc0ea..34e86a3ed 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -40,6 +40,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings public bool UseGlyphIcons { get; set; } = true; public int CustomExplorerIndex { get; set; } = 0; + + [JsonIgnore] public CustomExplorerViewModel CustomExplorer { get => CustomExplorerList[CustomExplorerIndex < CustomExplorerList.Count ? CustomExplorerIndex : 0]; From 2ecf57e980c18f940c760e26bf02aebd13b7d498 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 11 Nov 2021 07:17:45 +1100 Subject: [PATCH 103/110] change the default theme for fresh install --- Flow.Launcher.Infrastructure/Constant.cs | 2 +- Flow.Launcher/App.xaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index a5b89c300..564e03638 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -33,7 +33,7 @@ namespace Flow.Launcher.Infrastructure public static readonly string QueryTextBoxIconImagePath = $"{ProgramDirectory}\\Images\\mainsearch.svg"; - public const string DefaultTheme = "Darker"; + public const string DefaultTheme = "Win11Light"; public const string Themes = "Themes"; diff --git a/Flow.Launcher/App.xaml b/Flow.Launcher/App.xaml index 13d88e1c6..34097aa86 100644 --- a/Flow.Launcher/App.xaml +++ b/Flow.Launcher/App.xaml @@ -230,7 +230,7 @@ - + From 000a15e5747bed9d5984e40a74d0428f0ace280e Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 11 Nov 2021 08:06:37 +1100 Subject: [PATCH 104/110] remove commented out code --- Flow.Launcher/PriorityChangeWindow.xaml.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Flow.Launcher/PriorityChangeWindow.xaml.cs b/Flow.Launcher/PriorityChangeWindow.xaml.cs index 8f392f0a3..fe846e78b 100644 --- a/Flow.Launcher/PriorityChangeWindow.xaml.cs +++ b/Flow.Launcher/PriorityChangeWindow.xaml.cs @@ -62,7 +62,6 @@ namespace Flow.Launcher private void PriorityChangeWindow_Loaded(object sender, RoutedEventArgs e) { tbAction.Text = pluginViewModel.Priority.ToString(); - //OldPriority.Text = pluginViewModel.Priority.ToString(); tbAction.Focus(); } private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */ From d3ece3a2e7e23abbb05cca68890faf3986b0dfcc Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 11 Nov 2021 08:15:13 +1100 Subject: [PATCH 105/110] revert changes to sln --- Flow.Launcher.sln | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.sln b/Flow.Launcher.sln index 8e44ab421..21c3b47dc 100644 --- a/Flow.Launcher.sln +++ b/Flow.Launcher.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29806.167 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Test", "Flow.Launcher.Test\Flow.Launcher.Test.csproj", "{FF742965-9A80-41A5-B042-D6C7D3A21708}" ProjectSection(ProjectDependencies) = postProject @@ -163,11 +163,13 @@ Global {403B57F2-1856-4FC7-8A24-36AB346B763E}.Release|x86.ActiveCfg = Release|Any CPU {403B57F2-1856-4FC7-8A24-36AB346B763E}.Release|x86.Build.0 = Release|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|Any CPU.Build.0 = Debug|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x64.ActiveCfg = Debug|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x64.Build.0 = Debug|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x86.ActiveCfg = Debug|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x86.Build.0 = Debug|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|Any CPU.Build.0 = Release|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x64.ActiveCfg = Release|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x64.Build.0 = Release|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x86.ActiveCfg = Release|Any CPU @@ -210,11 +212,13 @@ Global {A3DCCBCA-ACC1-421D-B16E-210896234C26}.Release|x86.ActiveCfg = Release|Any CPU {A3DCCBCA-ACC1-421D-B16E-210896234C26}.Release|x86.Build.0 = Release|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|Any CPU.Build.0 = Debug|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.ActiveCfg = Debug|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.Build.0 = Debug|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x86.ActiveCfg = Debug|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x86.Build.0 = Debug|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|Any CPU.Build.0 = Release|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.ActiveCfg = Release|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.Build.0 = Release|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x86.ActiveCfg = Release|Any CPU @@ -232,11 +236,13 @@ Global {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|x86.ActiveCfg = Release|Any CPU {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|x86.Build.0 = Release|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|Any CPU.Build.0 = Debug|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.ActiveCfg = Debug|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.Build.0 = Debug|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x86.ActiveCfg = Debug|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x86.Build.0 = Debug|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|Any CPU.Build.0 = Release|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.ActiveCfg = Release|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.Build.0 = Release|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x86.ActiveCfg = Release|Any CPU From 07905e8d9ce6c9976cbbd8b3a804a7fb0f9ba31f Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 11 Nov 2021 08:40:15 +1100 Subject: [PATCH 106/110] update api description comment --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index 066188882..3abdaf01f 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -192,7 +192,7 @@ namespace Flow.Launcher.Plugin void SaveSettingJsonStorage() where T : new(); /// - /// Open Directory in explorer configured by user + /// Open directory in an explorer configured by user via Flow's Settings. The default is Windows Explorer /// /// Directory Path to open /// Extra FileName Info From d8b4050dd6a6350758fb889168dee30b66602a29 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 11 Nov 2021 08:42:16 +1100 Subject: [PATCH 107/110] remove summary --- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index c648f86ac..4f6fb3439 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -18,9 +18,6 @@ using System.Windows.Shapes; namespace Flow.Launcher { - /// - /// SelectFileManagerWindow.xaml에 대한 상호 작용 논리 - /// public partial class SelectFileManagerWindow : Window, INotifyPropertyChanged { private int selectedCustomExplorerIndex; From e09248fe0a11e498d841f1d472a7583c1d67f2ee Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 11 Nov 2021 08:50:02 +1100 Subject: [PATCH 108/110] bump version for plugins --- Plugins/Flow.Launcher.Plugin.Explorer/plugin.json | 2 +- Plugins/Flow.Launcher.Plugin.Program/plugin.json | 2 +- Plugins/Flow.Launcher.Plugin.Sys/plugin.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json index c525c001b..8d5d97af1 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json @@ -10,7 +10,7 @@ "Name": "Explorer", "Description": "Search and manage files and folders. Explorer utilises Windows Index Search", "Author": "Jeremy Wu", - "Version": "1.9.1", + "Version": "1.10.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Program/plugin.json b/Plugins/Flow.Launcher.Plugin.Program/plugin.json index 5f762f7b6..cbcc00f2b 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Program/plugin.json @@ -4,7 +4,7 @@ "Name": "Program", "Description": "Search programs in Flow.Launcher", "Author": "qianlifeng", - "Version": "1.6.1", + "Version": "1.7.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Program.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json index 826a1b756..42e8058e5 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json @@ -4,7 +4,7 @@ "Name": "System Commands", "Description": "Provide System related commands. e.g. shutdown,lock, setting etc.", "Author": "qianlifeng", - "Version": "1.4.1", + "Version": "1.5.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll", From 994d7eba47500f840b48ecdd5bc139f7b885e3c7 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 11 Nov 2021 23:53:54 +0900 Subject: [PATCH 109/110] - Add "%f" tip text and adjust string - Adjust Window Size --- Flow.Launcher/Languages/en.xaml | 5 +++-- Flow.Launcher/SelectFileManagerWindow.xaml | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 289aec337..64f87759d 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -139,11 +139,12 @@ Select File Manager Please specify the file location of the file manager you using and add arguments if necessary. The default arguments is "%d", and a path is entered at that location. For example, If a command is required such as "totalcmd.exe /A c:\windows", Argument is /A "%d". + "%f" is an argument that represent the file path. It is used to emphasize the file/folder name when opening a specific file location in 3rd party file manager. This Argument is only available in the "Arg for File" item. If the file manager does not have that function, you can use "%d". File Manager Profile Name File Manager Path - Arguments For Folder - Arguments For File + Arg For Folder + Arg For File Change Priority diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml index 68e7b93b2..eba794c96 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -42,6 +42,12 @@ Text="{DynamicResource fileManager_tips}" TextAlignment="Left" TextWrapping="WrapWithOverflow" /> + + + @@ -88,7 +94,7 @@ Orientation="Horizontal"> - + @@ -126,7 +132,7 @@ + Text="{DynamicResource fileManager_directory_arg}" + TextWrapping="WrapWithOverflow" /> + Text="{DynamicResource fileManager_file_arg}" + TextWrapping="WrapWithOverflow" /> Date: Fri, 12 Nov 2021 07:30:47 +1100 Subject: [PATCH 110/110] update wording --- Flow.Launcher/Languages/en.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 64f87759d..5ca6bdbfd 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -138,8 +138,8 @@ Select File Manager - Please specify the file location of the file manager you using and add arguments if necessary. The default arguments is "%d", and a path is entered at that location. For example, If a command is required such as "totalcmd.exe /A c:\windows", Argument is /A "%d". - "%f" is an argument that represent the file path. It is used to emphasize the file/folder name when opening a specific file location in 3rd party file manager. This Argument is only available in the "Arg for File" item. If the file manager does not have that function, you can use "%d". + Please specify the file location of the file manager you using and add arguments if necessary. The default arguments is "%d", and a path is entered at that location. For example, If a command is required such as "totalcmd.exe /A c:\windows", argument is /A "%d". + "%f" is an argument that represent the file path. It is used to emphasize the file/folder name when opening a specific file location in 3rd party file manager. This argument is only available in the "Arg for File" item. If the file manager does not have that function, you can use "%d". File Manager Profile Name File Manager Path