From 099021b186874c66be267585278fdc5f385a9de0 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 24 Apr 2023 19:50:34 +0800 Subject: [PATCH 01/23] Save programs cache after indexing --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 340d882da..c847982a2 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -110,6 +110,8 @@ namespace Flow.Launcher.Plugin.Program var win32S = Win32.All(_settings); _win32s = win32S; ResetCache(); + _win32Storage.Save(_win32s); + _settings.LastIndexTime = DateTime.Now; } public static void IndexUwpPrograms() @@ -117,6 +119,8 @@ namespace Flow.Launcher.Plugin.Program var applications = UWP.All(_settings); _uwps = applications; ResetCache(); + _uwpStorage.Save(_uwps); + _settings.LastIndexTime = DateTime.Now; } public static async Task IndexProgramsAsync() @@ -131,7 +135,6 @@ namespace Flow.Launcher.Plugin.Program Stopwatch.Normal("|Flow.Launcher.Plugin.Program.Main|UWPProgram index cost", IndexUwpPrograms); }); await Task.WhenAll(a, b).ConfigureAwait(false); - _settings.LastIndexTime = DateTime.Today; } internal static void ResetCache() @@ -199,7 +202,6 @@ namespace Flow.Launcher.Plugin.Program _ = Task.Run(() => { IndexUwpPrograms(); - _settings.LastIndexTime = DateTime.Today; }); } else if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)) @@ -210,7 +212,6 @@ namespace Flow.Launcher.Plugin.Program _ = Task.Run(() => { IndexWin32Programs(); - _settings.LastIndexTime = DateTime.Today; }); } } From b123c09c6c3ba0b2b66f58c4f38acdd40a6048dc Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 24 Apr 2023 21:03:49 +0800 Subject: [PATCH 02/23] Remove unused settings --- Plugins/Flow.Launcher.Plugin.Program/Settings.cs | 7 ------- .../Views/ProgramSetting.xaml.cs | 12 ------------ 2 files changed, 19 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs index f59facaa4..ca203f803 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs @@ -121,13 +121,6 @@ namespace Flow.Launcher.Plugin.Program public bool EnablePathSource { get; set; } = false; public bool EnableUWP { get; set; } = true; - public string CustomizedExplorer { get; set; } = Explorer; - public string CustomizedArgs { get; set; } = ExplorerArgs; - internal const char SuffixSeparator = ';'; - - internal const string Explorer = "explorer"; - - internal const string ExplorerArgs = "%s"; } } diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs index 4b63d38a5..156f33ebc 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs @@ -87,18 +87,6 @@ namespace Flow.Launcher.Plugin.Program.Views } } - public string CustomizedExplorerPath - { - get => _settings.CustomizedExplorer; - set => _settings.CustomizedExplorer = value; - } - - public string CustomizedExplorerArg - { - get => _settings.CustomizedArgs; - set => _settings.CustomizedArgs = value; - } - public bool ShowUWPCheckbox => UWP.SupportUWP(); public ProgramSetting(PluginInitContext context, Settings settings, Win32[] win32s, UWP.Application[] uwps) From 4debacde4fc633b45d614a922d14ba5850a7603a Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 24 Apr 2023 21:22:18 +0800 Subject: [PATCH 03/23] Refactor program indexing and cache logic No longer await on first run (no cache detected) to speed up boost 30 hours cache life --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 27 +++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index c847982a2..ac23534b1 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -88,21 +88,24 @@ namespace Flow.Launcher.Plugin.Program bool cacheEmpty = !_win32s.Any() && !_uwps.Any(); - var a = Task.Run(() => + if (cacheEmpty || _settings.LastIndexTime.AddHours(30) < DateTime.Now) { - Stopwatch.Normal("|Flow.Launcher.Plugin.Program.Main|Win32Program index cost", IndexWin32Programs); - }); - - var b = Task.Run(() => + _ = Task.Run(async () => + { + await IndexProgramsAsync().ConfigureAwait(false); + WatchProgramUpdate(); + }); + } + else { - Stopwatch.Normal("|Flow.Launcher.Plugin.Program.Main|UWPPRogram index cost", IndexUwpPrograms); - }); + WatchProgramUpdate(); + } - if (cacheEmpty) - await Task.WhenAll(a, b); - - Win32.WatchProgramUpdate(_settings); - _ = UWP.WatchPackageChange(); + static void WatchProgramUpdate() + { + Win32.WatchProgramUpdate(_settings); + _ = UWP.WatchPackageChange(); + } } public static void IndexWin32Programs() From 00e6e5b30d13751847047befbe461cf475122b03 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Tue, 25 Apr 2023 20:04:08 +0800 Subject: [PATCH 04/23] Remove unused using --- Flow.Launcher.Core/Plugin/ExecutablePlugin.cs | 1 - Flow.Launcher.Core/Plugin/JsonPRCModel.cs | 2 -- Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs | 3 --- Flow.Launcher.Core/Plugin/NodePlugin.cs | 6 +----- Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs | 5 +---- Flow.Launcher.Core/Plugin/PluginsLoader.cs | 2 ++ Flow.Launcher.Core/Plugin/PythonPlugin.cs | 3 +-- Flow.Launcher.Core/Plugin/QueryBuilder.cs | 1 - .../Exception/ExceptionFormatter.cs | 1 - Flow.Launcher.Infrastructure/Helper.cs | 1 - Flow.Launcher.Infrastructure/Hotkey/GlobalHotkey.cs | 1 - Flow.Launcher.Infrastructure/Http/Http.cs | 3 --- Flow.Launcher.Infrastructure/Image/ImageLoader.cs | 3 --- Flow.Launcher.Infrastructure/Logger/Log.cs | 1 - .../Storage/FlowLauncherJsonStorage.cs | 7 +------ .../UserSettings/CustomExplorerViewModel.cs | 5 ----- .../UserSettings/HttpProxy.cs | 4 +--- Flow.Launcher.Plugin/Features.cs | 7 +------ Flow.Launcher.Plugin/GlyphInfo.cs | 9 +-------- Flow.Launcher.Plugin/PluginInitContext.cs | 4 +--- Flow.Launcher.Plugin/PluginMetadata.cs | 3 +-- Flow.Launcher.Plugin/Query.cs | 5 +---- Flow.Launcher.Plugin/SharedCommands/ShellCommand.cs | 3 --- Flow.Launcher.Test/HttpTest.cs | 2 -- Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs | 1 - Flow.Launcher/ActionKeywords.xaml.cs | 3 --- Flow.Launcher/App.xaml.cs | 1 - .../Converters/BoolToVisibilityConverter.cs | 8 +------- Flow.Launcher/Converters/BorderClipConverter.cs | 5 ----- Flow.Launcher/Converters/HighlightTextConverter.cs | 3 --- Flow.Launcher/Converters/IconRadiusConverter.cs | 1 - .../OpenResultHotkeyVisibilityConverter.cs | 2 -- Flow.Launcher/Helper/AutoStartup.cs | 4 ---- Flow.Launcher/Helper/ErrorReporting.cs | 2 -- Flow.Launcher/Helper/SingleInstance.cs | 5 +---- Flow.Launcher/Msg.xaml.cs | 1 - Flow.Launcher/Notification.cs | 2 -- Flow.Launcher/PriorityChangeWindow.xaml.cs | 8 -------- Flow.Launcher/Properties/AssemblyInfo.cs | 5 ++--- Flow.Launcher/ReportWindow.xaml.cs | 1 - Flow.Launcher/SelectBrowserWindow.xaml.cs | 10 ---------- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 9 --------- Flow.Launcher/SettingWindow.xaml.cs | 2 -- Flow.Launcher/Settings.cs | 7 ++++--- Flow.Launcher/Storage/UserSelectedRecord.cs | 7 +------ Flow.Launcher/ViewModel/PluginViewModel.cs | 3 +-- Flow.Launcher/ViewModel/ResultsForUpdate.cs | 2 -- .../ChromeBookmarkLoader.cs | 2 -- .../ChromiumBookmarkLoader.cs | 1 - .../EdgeBookmarkLoader.cs | 3 --- Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs | 2 -- .../Models/Settings.cs | 4 +--- .../DecimalSeparator.cs | 2 +- .../NumberTranslator.cs | 6 +----- .../ViewModels/SettingsViewModel.cs | 7 +------ .../Views/CalculatorSettings.xaml.cs | 12 ------------ Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs | 2 -- .../Helper/ShellContextMenu.cs | 2 -- .../Search/Constants.cs | 3 +-- .../Search/Everything/EverythingAPI.cs | 4 ---- .../Search/Everything/EverythingDownloadHelper.cs | 1 - .../Search/Everything/EverythingSearchOption.cs | 3 +-- .../Search/Everything/SortOption.cs | 9 +-------- .../Search/IProvider/IContentIndexProvider.cs | 3 +-- .../Search/IProvider/IIndexProvider.cs | 3 +-- .../Search/IProvider/IPathIndexProvider.cs | 3 +-- .../Search/ResultManager.cs | 1 - .../Search/SearchResult.cs | 2 -- .../Search/WindowsIndex/QueryConstructor.cs | 1 - .../Search/WindowsIndex/WindowsIndex.cs | 1 - Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs | 2 -- .../ViewModels/EnumBindingModel.cs | 2 -- .../ViewModels/SettingsViewModel.cs | 1 - .../Views/ActionKeywordSetting.xaml.cs | 4 ---- .../ContextMenu.cs | 2 -- Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs | 5 +---- .../Flow.Launcher.Plugin.PluginsManager/Settings.cs | 6 +----- .../Flow.Launcher.Plugin.PluginsManager/Utilities.cs | 4 +--- .../ViewModels/SettingsViewModel.cs | 5 +---- Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs | 6 ------ .../Flow.Launcher.Plugin.Program/Programs/Win32.cs | 1 - .../Views/Models/ProgramSource.cs | 3 +-- Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 2 -- Plugins/Flow.Launcher.Plugin.Url/Main.cs | 2 -- Plugins/Flow.Launcher.Plugin.Url/Settings.cs | 8 +------- .../Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs | 5 +---- Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs | 3 --- .../Flow.Launcher.Plugin.WebSearch/SearchSource.cs | 4 ---- .../SearchSourceViewModel.cs | 3 ++- .../SettingsControl.xaml.cs | 1 - .../SuggestionSources/Baidu.cs | 1 - .../SuggestionSources/Bing.cs | 3 --- .../SuggestionSources/Google.cs | 2 -- .../Helper/ContextMenuHelper.cs | 3 --- .../Helper/ResultHelper.cs | 1 - .../Helper/TranslationHelper.cs | 2 -- Plugins/Flow.Launcher.Plugin.WindowsSettings/Log.cs | 1 - Plugins/Flow.Launcher.Plugin.WindowsSettings/Main.cs | 1 - 98 files changed, 41 insertions(+), 293 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs b/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs index 6b55bb3e3..a7bbccfec 100644 --- a/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs +++ b/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs @@ -2,7 +2,6 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -using Flow.Launcher.Plugin; namespace Flow.Launcher.Core.Plugin { diff --git a/Flow.Launcher.Core/Plugin/JsonPRCModel.cs b/Flow.Launcher.Core/Plugin/JsonPRCModel.cs index e937779a1..eaaae25b0 100644 --- a/Flow.Launcher.Core/Plugin/JsonPRCModel.cs +++ b/Flow.Launcher.Core/Plugin/JsonPRCModel.cs @@ -12,9 +12,7 @@ * */ -using Flow.Launcher.Core.Resource; using System.Collections.Generic; -using System.Linq; using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using System.Text.Json; diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs index f3b2eed87..438c1dd8a 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs @@ -23,9 +23,6 @@ using Orientation = System.Windows.Controls.Orientation; using TextBox = System.Windows.Controls.TextBox; using UserControl = System.Windows.Controls.UserControl; using System.Windows.Documents; -using static System.Windows.Forms.LinkLabel; -using Droplex; -using System.Windows.Forms; namespace Flow.Launcher.Core.Plugin { diff --git a/Flow.Launcher.Core/Plugin/NodePlugin.cs b/Flow.Launcher.Core/Plugin/NodePlugin.cs index 1247143fa..8ea5c4b78 100644 --- a/Flow.Launcher.Core/Plugin/NodePlugin.cs +++ b/Flow.Launcher.Core/Plugin/NodePlugin.cs @@ -1,9 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; +using System.Diagnostics; using System.IO; -using System.Linq; -using System.Text; using System.Threading; using System.Threading.Tasks; using Flow.Launcher.Plugin; diff --git a/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs b/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs index 9d76b6be0..1dd0683f0 100644 --- a/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs +++ b/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs @@ -1,7 +1,4 @@ -using Flow.Launcher.Infrastructure; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; +using System; using System.IO; using System.Linq; using System.Reflection; diff --git a/Flow.Launcher.Core/Plugin/PluginsLoader.cs b/Flow.Launcher.Core/Plugin/PluginsLoader.cs index e6329aba1..fea7f55b9 100644 --- a/Flow.Launcher.Core/Plugin/PluginsLoader.cs +++ b/Flow.Launcher.Core/Plugin/PluginsLoader.cs @@ -5,7 +5,9 @@ using System.Reflection; using System.Threading.Tasks; using System.Windows.Forms; using Flow.Launcher.Core.ExternalPlugins.Environments; +#pragma warning disable IDE0005 using Flow.Launcher.Infrastructure.Logger; +#pragma warning restore IDE0005 using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch; diff --git a/Flow.Launcher.Core/Plugin/PythonPlugin.cs b/Flow.Launcher.Core/Plugin/PythonPlugin.cs index 2bbf6d110..d8df21226 100644 --- a/Flow.Launcher.Core/Plugin/PythonPlugin.cs +++ b/Flow.Launcher.Core/Plugin/PythonPlugin.cs @@ -1,5 +1,4 @@ -using System; -using System.Diagnostics; +using System.Diagnostics; using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/Flow.Launcher.Core/Plugin/QueryBuilder.cs b/Flow.Launcher.Core/Plugin/QueryBuilder.cs index a819f94b7..84f36e91a 100644 --- a/Flow.Launcher.Core/Plugin/QueryBuilder.cs +++ b/Flow.Launcher.Core/Plugin/QueryBuilder.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; using Flow.Launcher.Plugin; namespace Flow.Launcher.Core.Plugin diff --git a/Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs b/Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs index 54c19c048..939b84c3c 100644 --- a/Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs +++ b/Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; -using System.Xml; using Microsoft.Win32; namespace Flow.Launcher.Infrastructure.Exception diff --git a/Flow.Launcher.Infrastructure/Helper.cs b/Flow.Launcher.Infrastructure/Helper.cs index db575de90..864d796c7 100644 --- a/Flow.Launcher.Infrastructure/Helper.cs +++ b/Flow.Launcher.Infrastructure/Helper.cs @@ -2,7 +2,6 @@ using System; using System.IO; -using System.Runtime.CompilerServices; using System.Text.Json; using System.Text.Json.Serialization; diff --git a/Flow.Launcher.Infrastructure/Hotkey/GlobalHotkey.cs b/Flow.Launcher.Infrastructure/Hotkey/GlobalHotkey.cs index a09185696..f847ab189 100644 --- a/Flow.Launcher.Infrastructure/Hotkey/GlobalHotkey.cs +++ b/Flow.Launcher.Infrastructure/Hotkey/GlobalHotkey.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Flow.Launcher.Plugin; diff --git a/Flow.Launcher.Infrastructure/Http/Http.cs b/Flow.Launcher.Infrastructure/Http/Http.cs index e5be0701f..14b8eef4e 100644 --- a/Flow.Launcher.Infrastructure/Http/Http.cs +++ b/Flow.Launcher.Infrastructure/Http/Http.cs @@ -1,15 +1,12 @@ using System.IO; using System.Net; using System.Net.Http; -using System.Text; using System.Threading.Tasks; using JetBrains.Annotations; using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.UserSettings; using System; -using System.ComponentModel; using System.Threading; -using System.Windows.Interop; using Flow.Launcher.Plugin; namespace Flow.Launcher.Infrastructure.Http diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs index 0a51d56f9..3ee69c63e 100644 --- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs +++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs @@ -1,11 +1,8 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; -using System.Net; -using System.Net.Http; using System.Threading.Tasks; using System.Windows.Media; using System.Windows.Media.Imaging; diff --git a/Flow.Launcher.Infrastructure/Logger/Log.cs b/Flow.Launcher.Infrastructure/Logger/Log.cs index 53726ea64..d4bd473ac 100644 --- a/Flow.Launcher.Infrastructure/Logger/Log.cs +++ b/Flow.Launcher.Infrastructure/Logger/Log.cs @@ -5,7 +5,6 @@ using NLog; using NLog.Config; using NLog.Targets; using Flow.Launcher.Infrastructure.UserSettings; -using NLog.Fluent; using NLog.Targets.Wrappers; using System.Runtime.ExceptionServices; diff --git a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs index ec7a38804..865041fb3 100644 --- a/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs +++ b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.IO; using Flow.Launcher.Infrastructure.UserSettings; namespace Flow.Launcher.Infrastructure.Storage diff --git a/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs index 7806debe1..c54c30478 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs @@ -1,9 +1,4 @@ using Flow.Launcher.Plugin; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Flow.Launcher.ViewModel { diff --git a/Flow.Launcher.Infrastructure/UserSettings/HttpProxy.cs b/Flow.Launcher.Infrastructure/UserSettings/HttpProxy.cs index 213193526..c8d76d2ba 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/HttpProxy.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/HttpProxy.cs @@ -1,6 +1,4 @@ -using System.ComponentModel; - -namespace Flow.Launcher.Infrastructure.UserSettings +namespace Flow.Launcher.Infrastructure.UserSettings { public enum ProxyProperty { diff --git a/Flow.Launcher.Plugin/Features.cs b/Flow.Launcher.Plugin/Features.cs index 5b9c6a7b9..b4a1eccc1 100644 --- a/Flow.Launcher.Plugin/Features.cs +++ b/Flow.Launcher.Plugin/Features.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Threading; - -namespace Flow.Launcher.Plugin +namespace Flow.Launcher.Plugin { /// /// Base Interface for Flow's special plugin feature interface diff --git a/Flow.Launcher.Plugin/GlyphInfo.cs b/Flow.Launcher.Plugin/GlyphInfo.cs index 730046e1d..45b90b09e 100644 --- a/Flow.Launcher.Plugin/GlyphInfo.cs +++ b/Flow.Launcher.Plugin/GlyphInfo.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media; - -namespace Flow.Launcher.Plugin +namespace Flow.Launcher.Plugin { /// /// Text with FontFamily specified diff --git a/Flow.Launcher.Plugin/PluginInitContext.cs b/Flow.Launcher.Plugin/PluginInitContext.cs index 04f20e984..233ead8f9 100644 --- a/Flow.Launcher.Plugin/PluginInitContext.cs +++ b/Flow.Launcher.Plugin/PluginInitContext.cs @@ -1,6 +1,4 @@ -using System; - -namespace Flow.Launcher.Plugin +namespace Flow.Launcher.Plugin { public class PluginInitContext { diff --git a/Flow.Launcher.Plugin/PluginMetadata.cs b/Flow.Launcher.Plugin/PluginMetadata.cs index e8f5cf744..b4e06913e 100644 --- a/Flow.Launcher.Plugin/PluginMetadata.cs +++ b/Flow.Launcher.Plugin/PluginMetadata.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Text.Json.Serialization; diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs index 95547d273..84e5dc84e 100644 --- a/Flow.Launcher.Plugin/Query.cs +++ b/Flow.Launcher.Plugin/Query.cs @@ -1,7 +1,4 @@ -using JetBrains.Annotations; -using System; -using System.Collections.Generic; -using System.Linq; +using System; namespace Flow.Launcher.Plugin { diff --git a/Flow.Launcher.Plugin/SharedCommands/ShellCommand.cs b/Flow.Launcher.Plugin/SharedCommands/ShellCommand.cs index c18f8b90c..49f78b458 100644 --- a/Flow.Launcher.Plugin/SharedCommands/ShellCommand.cs +++ b/Flow.Launcher.Plugin/SharedCommands/ShellCommand.cs @@ -1,13 +1,10 @@ using System; -using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; -using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading; -using System.Threading.Tasks; namespace Flow.Launcher.Plugin.SharedCommands { diff --git a/Flow.Launcher.Test/HttpTest.cs b/Flow.Launcher.Test/HttpTest.cs index 637747a07..e72ad7a67 100644 --- a/Flow.Launcher.Test/HttpTest.cs +++ b/Flow.Launcher.Test/HttpTest.cs @@ -1,7 +1,5 @@ using NUnit.Framework; using System; -using System.Collections.Generic; -using System.Text; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Infrastructure.Http; diff --git a/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs b/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs index 765280e08..d071545ba 100644 --- a/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs +++ b/Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs @@ -1,4 +1,3 @@ -using NUnit; using NUnit.Framework; using Flow.Launcher.Core.Plugin; using Flow.Launcher.Plugin; diff --git a/Flow.Launcher/ActionKeywords.xaml.cs b/Flow.Launcher/ActionKeywords.xaml.cs index c89f82a3b..371b2dd07 100644 --- a/Flow.Launcher/ActionKeywords.xaml.cs +++ b/Flow.Launcher/ActionKeywords.xaml.cs @@ -1,8 +1,5 @@ using System.Windows; -using Flow.Launcher.Core.Plugin; using Flow.Launcher.Core.Resource; -using Flow.Launcher.Infrastructure.Exception; -using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; using Flow.Launcher.ViewModel; diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 1d398276d..295dd3e7a 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -3,7 +3,6 @@ using System.Diagnostics; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Timers; using System.Windows; using Flow.Launcher.Core; using Flow.Launcher.Core.Configuration; diff --git a/Flow.Launcher/Converters/BoolToVisibilityConverter.cs b/Flow.Launcher/Converters/BoolToVisibilityConverter.cs index ad474d693..e60e26be4 100644 --- a/Flow.Launcher/Converters/BoolToVisibilityConverter.cs +++ b/Flow.Launcher/Converters/BoolToVisibilityConverter.cs @@ -1,11 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Globalization; using System.Windows; -using System.Windows.Controls; using System.Windows.Data; namespace Flow.Launcher.Converters diff --git a/Flow.Launcher/Converters/BorderClipConverter.cs b/Flow.Launcher/Converters/BorderClipConverter.cs index 83e83f1de..c0bce2cd9 100644 --- a/Flow.Launcher/Converters/BorderClipConverter.cs +++ b/Flow.Launcher/Converters/BorderClipConverter.cs @@ -1,13 +1,8 @@ using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; using System.Windows.Data; using System.Windows.Media; -using System.Windows.Documents; using System.Windows.Shapes; // For Clipping inside listbox item diff --git a/Flow.Launcher/Converters/HighlightTextConverter.cs b/Flow.Launcher/Converters/HighlightTextConverter.cs index 972dd1bc8..cb62c0d3d 100644 --- a/Flow.Launcher/Converters/HighlightTextConverter.cs +++ b/Flow.Launcher/Converters/HighlightTextConverter.cs @@ -2,11 +2,8 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; using System.Windows.Data; -using System.Windows.Media; using System.Windows.Documents; namespace Flow.Launcher.Converters diff --git a/Flow.Launcher/Converters/IconRadiusConverter.cs b/Flow.Launcher/Converters/IconRadiusConverter.cs index 51129cfb8..c73bef8b2 100644 --- a/Flow.Launcher/Converters/IconRadiusConverter.cs +++ b/Flow.Launcher/Converters/IconRadiusConverter.cs @@ -1,7 +1,6 @@ using System; using System.Globalization; using System.Windows.Data; -using Windows.Devices.PointOfService; namespace Flow.Launcher.Converters { diff --git a/Flow.Launcher/Converters/OpenResultHotkeyVisibilityConverter.cs b/Flow.Launcher/Converters/OpenResultHotkeyVisibilityConverter.cs index 7586d1fcf..a44b07cab 100644 --- a/Flow.Launcher/Converters/OpenResultHotkeyVisibilityConverter.cs +++ b/Flow.Launcher/Converters/OpenResultHotkeyVisibilityConverter.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using System.Globalization; -using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; diff --git a/Flow.Launcher/Helper/AutoStartup.cs b/Flow.Launcher/Helper/AutoStartup.cs index 956324020..6a7aceb31 100644 --- a/Flow.Launcher/Helper/AutoStartup.cs +++ b/Flow.Launcher/Helper/AutoStartup.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Logger; using Microsoft.Win32; diff --git a/Flow.Launcher/Helper/ErrorReporting.cs b/Flow.Launcher/Helper/ErrorReporting.cs index a7ce7444c..8108124ee 100644 --- a/Flow.Launcher/Helper/ErrorReporting.cs +++ b/Flow.Launcher/Helper/ErrorReporting.cs @@ -3,8 +3,6 @@ using System.Windows.Threading; using NLog; using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Exception; -using NLog.Fluent; -using Log = Flow.Launcher.Infrastructure.Logger.Log; namespace Flow.Launcher.Helper { diff --git a/Flow.Launcher/Helper/SingleInstance.cs b/Flow.Launcher/Helper/SingleInstance.cs index d684596be..739fed378 100644 --- a/Flow.Launcher/Helper/SingleInstance.cs +++ b/Flow.Launcher/Helper/SingleInstance.cs @@ -1,21 +1,18 @@ using System; -using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Runtime.InteropServices; using System.IO.Pipes; -using System.Runtime.Serialization.Formatters; using System.Security; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows; -using System.Windows.Threading; // http://blogs.microsoft.co.il/arik/2010/05/28/wpf-single-instance-application/ // modified to allow single instace restart -namespace Flow.Launcher.Helper +namespace Flow.Launcher.Helper { internal enum WM { diff --git a/Flow.Launcher/Msg.xaml.cs b/Flow.Launcher/Msg.xaml.cs index 1be89d716..ff84e1064 100644 --- a/Flow.Launcher/Msg.xaml.cs +++ b/Flow.Launcher/Msg.xaml.cs @@ -4,7 +4,6 @@ using System.Windows; using System.Windows.Forms; using System.Windows.Input; using System.Windows.Media.Animation; -using System.Windows.Media.Imaging; using Flow.Launcher.Helper; using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Image; diff --git a/Flow.Launcher/Notification.cs b/Flow.Launcher/Notification.cs index 64db5c213..5f578ec95 100644 --- a/Flow.Launcher/Notification.cs +++ b/Flow.Launcher/Notification.cs @@ -4,8 +4,6 @@ using Microsoft.Toolkit.Uwp.Notifications; using System; using System.IO; using System.Windows; -using Windows.Data.Xml.Dom; -using Windows.UI.Notifications; namespace Flow.Launcher { diff --git a/Flow.Launcher/PriorityChangeWindow.xaml.cs b/Flow.Launcher/PriorityChangeWindow.xaml.cs index e2fe46adc..2d0966de4 100644 --- a/Flow.Launcher/PriorityChangeWindow.xaml.cs +++ b/Flow.Launcher/PriorityChangeWindow.xaml.cs @@ -2,17 +2,9 @@ using Flow.Launcher.Core.Resource; using Flow.Launcher.Plugin; using Flow.Launcher.ViewModel; -using System; -using System.Collections.Generic; -using System.Text; 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 { diff --git a/Flow.Launcher/Properties/AssemblyInfo.cs b/Flow.Launcher/Properties/AssemblyInfo.cs index b557656b1..93ce37f2b 100644 --- a/Flow.Launcher/Properties/AssemblyInfo.cs +++ b/Flow.Launcher/Properties/AssemblyInfo.cs @@ -1,7 +1,6 @@ -using System.Reflection; -using System.Windows; +using System.Windows; [assembly: ThemeInfo( - ResourceDictionaryLocation.None, + ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly )] diff --git a/Flow.Launcher/ReportWindow.xaml.cs b/Flow.Launcher/ReportWindow.xaml.cs index 4899edc14..52a7843d7 100644 --- a/Flow.Launcher/ReportWindow.xaml.cs +++ b/Flow.Launcher/ReportWindow.xaml.cs @@ -1,6 +1,5 @@ using Flow.Launcher.Core.ExternalPlugins; using System; -using System.Diagnostics; using System.Globalization; using System.IO; using System.Text; diff --git a/Flow.Launcher/SelectBrowserWindow.xaml.cs b/Flow.Launcher/SelectBrowserWindow.xaml.cs index 37f0c47ae..4244d5827 100644 --- a/Flow.Launcher/SelectBrowserWindow.xaml.cs +++ b/Flow.Launcher/SelectBrowserWindow.xaml.cs @@ -1,20 +1,10 @@ using Flow.Launcher.Infrastructure.UserSettings; -using Flow.Launcher.ViewModel; using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; 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 { diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index 4f6fb3439..b7bda4565 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -1,20 +1,11 @@ using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.ViewModel; using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; 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 { diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index f39974142..95c6cd61b 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -9,9 +9,7 @@ using Flow.Launcher.ViewModel; using ModernWpf; using ModernWpf.Controls; using System; -using System.Diagnostics; using System.IO; -using System.Security.Policy; using System.Windows; using System.Windows.Data; using System.Windows.Forms; diff --git a/Flow.Launcher/Settings.cs b/Flow.Launcher/Settings.cs index c5294b372..8f53c061f 100644 --- a/Flow.Launcher/Settings.cs +++ b/Flow.Launcher/Settings.cs @@ -1,6 +1,7 @@ -namespace Flow.Launcher.Properties { - - +namespace Flow.Launcher.Properties +{ + + // This class allows you to handle specific events on the settings class: // The SettingChanging event is raised before a setting's value is changed. // The PropertyChanged event is raised after a setting's value is changed. diff --git a/Flow.Launcher/Storage/UserSelectedRecord.cs b/Flow.Launcher/Storage/UserSelectedRecord.cs index 23d8c4faf..6afe1e91f 100644 --- a/Flow.Launcher/Storage/UserSelectedRecord.cs +++ b/Flow.Launcher/Storage/UserSelectedRecord.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.Collections.Generic; using System.Text.Json.Serialization; -using Flow.Launcher.Infrastructure; -using Flow.Launcher.Infrastructure.Storage; using Flow.Launcher.Plugin; -using Flow.Launcher.ViewModel; namespace Flow.Launcher.Storage { diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs index 65ba657ba..d2919507d 100644 --- a/Flow.Launcher/ViewModel/PluginViewModel.cs +++ b/Flow.Launcher/ViewModel/PluginViewModel.cs @@ -1,5 +1,4 @@ -using System.Threading.Tasks; -using System.Windows; +using System.Windows; using System.Windows.Media; using Flow.Launcher.Plugin; using Flow.Launcher.Infrastructure.Image; diff --git a/Flow.Launcher/ViewModel/ResultsForUpdate.cs b/Flow.Launcher/ViewModel/ResultsForUpdate.cs index 94c6a923a..4cb5b1a95 100644 --- a/Flow.Launcher/ViewModel/ResultsForUpdate.cs +++ b/Flow.Launcher/ViewModel/ResultsForUpdate.cs @@ -1,7 +1,5 @@ using Flow.Launcher.Plugin; -using System; using System.Collections.Generic; -using System.Text; using System.Threading; namespace Flow.Launcher.ViewModel diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs index ec6f8423d..09755fe0c 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs @@ -2,8 +2,6 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text.RegularExpressions; namespace Flow.Launcher.Plugin.BrowserBookmark { diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs index e20a476c5..c1efb5b5f 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs @@ -1,5 +1,4 @@ using Flow.Launcher.Plugin.BrowserBookmark.Models; -using Microsoft.AspNetCore.Authentication; using System.Collections.Generic; using System.IO; using System.Text.Json; diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs index 276f6368e..79190f0ef 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs @@ -2,9 +2,6 @@ using Flow.Launcher.Plugin.BrowserBookmark.Models; using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text.Json; -using System.Text.RegularExpressions; namespace Flow.Launcher.Plugin.BrowserBookmark { diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs index d9a719272..dfe5fc5d5 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs @@ -4,11 +4,9 @@ using System.Linq; using System.Windows; using System.Windows.Controls; using Flow.Launcher.Infrastructure.Logger; -using Flow.Launcher.Infrastructure.Storage; using Flow.Launcher.Plugin.BrowserBookmark.Commands; using Flow.Launcher.Plugin.BrowserBookmark.Models; using Flow.Launcher.Plugin.BrowserBookmark.Views; -using Flow.Launcher.Plugin.SharedCommands; using System.IO; using System.Threading.Channels; using System.Threading.Tasks; diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs index 17b794e03..dc1016b4e 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Text.Json.Serialization; +using System.Collections.ObjectModel; namespace Flow.Launcher.Plugin.BrowserBookmark.Models { diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/DecimalSeparator.cs b/Plugins/Flow.Launcher.Plugin.Calculator/DecimalSeparator.cs index ac0da1c6f..27bdf94ee 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/DecimalSeparator.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/DecimalSeparator.cs @@ -2,7 +2,7 @@ using Flow.Launcher.Core.Resource; namespace Flow.Launcher.Plugin.Caculator -{ +{ [TypeConverter(typeof(LocalizationConverter))] public enum DecimalSeparator { diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/NumberTranslator.cs b/Plugins/Flow.Launcher.Plugin.Calculator/NumberTranslator.cs index 528b21e4d..ed4aed75b 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/NumberTranslator.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/NumberTranslator.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; +using System.Globalization; using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; namespace Flow.Launcher.Plugin.Caculator { diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.Calculator/ViewModels/SettingsViewModel.cs index 9ee95e840..afe4d1c0c 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/ViewModels/SettingsViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/ViewModels/SettingsViewModel.cs @@ -1,10 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Flow.Launcher.Infrastructure.Storage; -using Flow.Launcher.Infrastructure.UserSettings; namespace Flow.Launcher.Plugin.Caculator.ViewModels { diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml.cs index 807bdca00..1f15aceaa 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml.cs @@ -1,17 +1,5 @@ -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.Navigation; -using System.Windows.Shapes; using Flow.Launcher.Plugin.Caculator.ViewModels; namespace Flow.Launcher.Plugin.Caculator.Views diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index f5733bbb5..d92ae11e5 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -9,8 +9,6 @@ using Flow.Launcher.Plugin.SharedCommands; using Flow.Launcher.Plugin.Explorer.Search; using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks; using System.Linq; -using System.Windows.Controls; -using System.Windows.Input; using MessageBox = System.Windows.Forms.MessageBox; using MessageBoxIcon = System.Windows.Forms.MessageBoxIcon; using MessageBoxButton = System.Windows.Forms.MessageBoxButtons; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Helper/ShellContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Helper/ShellContextMenu.cs index 3870c4876..abb76580d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Helper/ShellContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Helper/ShellContextMenu.cs @@ -1,11 +1,9 @@ using System; -using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Drawing; using System.Windows.Forms; using System.IO; -using System.Security.Permissions; namespace Peter { diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Constants.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Constants.cs index 2174aeee6..e7b43c555 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Constants.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Constants.cs @@ -1,5 +1,4 @@ -using System; -using System.IO; +using System.IO; using System.Reflection; namespace Flow.Launcher.Plugin.Explorer.Search diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs index e618b5c36..6159c9355 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs @@ -2,14 +2,10 @@ using Flow.Launcher.Plugin.Explorer.Search.Everything.Exceptions; using System; using System.Collections.Generic; -using System.Linq; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Windows.Forms.Design; -using Flow.Launcher.Plugin.Explorer.Exceptions; namespace Flow.Launcher.Plugin.Explorer.Search.Everything { diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingDownloadHelper.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingDownloadHelper.cs index ce774281c..ef923632d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingDownloadHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingDownloadHelper.cs @@ -4,7 +4,6 @@ using Microsoft.Win32; using System; using System.IO; using System.Linq; -using System.Threading; using System.Threading.Tasks; namespace Flow.Launcher.Plugin.Explorer.Search.Everything; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchOption.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchOption.cs index 0b1bbd0ec..3d930becf 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchOption.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchOption.cs @@ -1,5 +1,4 @@ -using System; -using Flow.Launcher.Plugin.Everything.Everything; +using Flow.Launcher.Plugin.Everything.Everything; namespace Flow.Launcher.Plugin.Explorer.Search.Everything { diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/SortOption.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/SortOption.cs index c57e3fe4a..3c2fc3660 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/SortOption.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/SortOption.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Flow.Launcher.Plugin.Everything.Everything +namespace Flow.Launcher.Plugin.Everything.Everything { public enum SortOption : uint { diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IContentIndexProvider.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IContentIndexProvider.cs index 6e036e058..7b8960b37 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IContentIndexProvider.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IContentIndexProvider.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading; namespace Flow.Launcher.Plugin.Explorer.Search.IProvider diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IIndexProvider.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IIndexProvider.cs index d43dd7df3..9909b18d8 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IIndexProvider.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IIndexProvider.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading; namespace Flow.Launcher.Plugin.Explorer.Search.IProvider diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IPathIndexProvider.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IPathIndexProvider.cs index 4622df5f9..56d735687 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IPathIndexProvider.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/IProvider/IPathIndexProvider.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading; namespace Flow.Launcher.Plugin.Explorer.Search.IProvider diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs index 83c173ac6..a87f766a1 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs @@ -2,7 +2,6 @@ using Flow.Launcher.Infrastructure; using Flow.Launcher.Plugin.SharedCommands; using System; -using System.Diagnostics; using System.IO; using System.Linq; using System.Threading.Tasks; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchResult.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchResult.cs index 92c24559d..3cd97df82 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchResult.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchResult.cs @@ -1,5 +1,3 @@ -using System; - namespace Flow.Launcher.Plugin.Explorer.Search { public record struct SearchResult diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs index 87eca91da..a35bad274 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/QueryConstructor.cs @@ -1,5 +1,4 @@ using System; -using System.Buffers; using Microsoft.Search.Interop; namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndex.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndex.cs index 2093508a0..8aca5929d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndex.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/WindowsIndex.cs @@ -8,7 +8,6 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Threading; -using System.Threading.Tasks; using Flow.Launcher.Plugin.Explorer.Exceptions; namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs index 4077e2fcc..137ba2f19 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs @@ -4,10 +4,8 @@ using Flow.Launcher.Plugin.Explorer.Search.Everything; using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks; using Flow.Launcher.Plugin.Explorer.Search.WindowsIndex; using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Linq; using System.Text.Json.Serialization; using Flow.Launcher.Plugin.Explorer.Search.IProvider; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/EnumBindingModel.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/EnumBindingModel.cs index 29c81a465..13971914b 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/EnumBindingModel.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/EnumBindingModel.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.ComponentModel; using System.Linq; -using System.Reflection; -using System.Runtime.CompilerServices; namespace Flow.Launcher.Plugin.Explorer.ViewModels; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs index 189434eea..02199fb5a 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs @@ -6,7 +6,6 @@ using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks; using Flow.Launcher.Plugin.Explorer.Views; using System; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs index 6ee4faad8..9e86ce4b4 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs @@ -1,9 +1,5 @@ -using Flow.Launcher.Plugin.Explorer.ViewModels; -using ICSharpCode.SharpZipLib.Zip; -using System; using System.Collections.Generic; using System.ComponentModel; -using System.Linq; using System.Runtime.CompilerServices; using System.Windows; using System.Windows.Input; diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs index 37f0a126e..f5a4d7271 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/ContextMenu.cs @@ -1,6 +1,4 @@ using Flow.Launcher.Core.ExternalPlugins; -using Flow.Launcher.Infrastructure.UserSettings; -using System; using System.Collections.Generic; using System.Text.RegularExpressions; diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs index bf62caee8..cd554e4d0 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs @@ -1,14 +1,11 @@ -using Flow.Launcher.Infrastructure.Storage; -using Flow.Launcher.Plugin.PluginsManager.ViewModels; +using Flow.Launcher.Plugin.PluginsManager.ViewModels; using Flow.Launcher.Plugin.PluginsManager.Views; using System.Collections.Generic; using System.Linq; using System.Windows.Controls; using Flow.Launcher.Infrastructure; -using System; using System.Threading.Tasks; using System.Threading; -using System.Windows; namespace Flow.Launcher.Plugin.PluginsManager { diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs index 6fd4e51ac..aa35f02b5 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Settings.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Flow.Launcher.Plugin.PluginsManager +namespace Flow.Launcher.Plugin.PluginsManager { internal class Settings { diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs index 2853ffc9e..792891ad1 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs @@ -1,7 +1,5 @@ -using Flow.Launcher.Infrastructure.Http; -using ICSharpCode.SharpZipLib.Zip; +using ICSharpCode.SharpZipLib.Zip; using System.IO; -using System.Net; namespace Flow.Launcher.Plugin.PluginsManager { diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/ViewModels/SettingsViewModel.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/ViewModels/SettingsViewModel.cs index 11303f472..672884f80 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/ViewModels/SettingsViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/ViewModels/SettingsViewModel.cs @@ -1,7 +1,4 @@ -using Flow.Launcher.Infrastructure.Storage; -using Flow.Launcher.Infrastructure.UserSettings; - -namespace Flow.Launcher.Plugin.PluginsManager.ViewModels +namespace Flow.Launcher.Plugin.PluginsManager.ViewModels { internal class SettingsViewModel { diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs index 19f96aea1..4b2319166 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs @@ -1,12 +1,6 @@ -using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Diagnostics; -using System.Dynamic; -using System.Runtime.InteropServices; using Flow.Launcher.Infrastructure; -using Flow.Launcher.Infrastructure.Logger; namespace Flow.Launcher.Plugin.ProcessKiller { diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index 6da6006ae..4d7eba4a0 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Runtime.InteropServices; using System.Security; using System.Text; using System.Threading.Tasks; diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/Models/ProgramSource.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/Models/ProgramSource.cs index 93c33e9ad..0dc080c8d 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/Models/ProgramSource.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/Models/ProgramSource.cs @@ -1,5 +1,4 @@ -using System; -using System.IO; +using System.IO; using System.Text.Json.Serialization; using Flow.Launcher.Plugin.Program.Programs; diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs index f64f5d376..7faffc543 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs @@ -10,9 +10,7 @@ using WindowsInput; using WindowsInput.Native; using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Infrastructure.Logger; -using Flow.Launcher.Infrastructure.Storage; using Flow.Launcher.Plugin.SharedCommands; -using Application = System.Windows.Application; using Control = System.Windows.Controls.Control; using Keys = System.Windows.Forms.Keys; diff --git a/Plugins/Flow.Launcher.Plugin.Url/Main.cs b/Plugins/Flow.Launcher.Plugin.Url/Main.cs index 4831bac1d..80425a8ff 100644 --- a/Plugins/Flow.Launcher.Plugin.Url/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Url/Main.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using System.Windows.Controls; -using Flow.Launcher.Infrastructure.Storage; -using Flow.Launcher.Plugin.SharedCommands; namespace Flow.Launcher.Plugin.Url { diff --git a/Plugins/Flow.Launcher.Plugin.Url/Settings.cs b/Plugins/Flow.Launcher.Plugin.Url/Settings.cs index 7ac4c371d..a8d89e27f 100644 --- a/Plugins/Flow.Launcher.Plugin.Url/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Url/Settings.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Flow.Launcher.Plugin.Url +namespace Flow.Launcher.Plugin.Url { public class Settings { diff --git a/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs b/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs index dce13c522..f68d1bb2d 100644 --- a/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Controls; +using System.Windows.Controls; namespace Flow.Launcher.Plugin.Url { diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs index 179745e2d..39aa1738f 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs @@ -1,14 +1,11 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; -using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; using System.Windows.Controls; using Flow.Launcher.Infrastructure; -using Flow.Launcher.Infrastructure.Storage; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin.SharedCommands; diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSource.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSource.cs index e489cb19f..9eedd29a3 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSource.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSource.cs @@ -1,9 +1,5 @@ using System.IO; -using System.Windows.Media; using JetBrains.Annotations; -using Flow.Launcher.Infrastructure.Image; -using Flow.Launcher.Infrastructure; -using System.Reflection; using System.Text.Json.Serialization; namespace Flow.Launcher.Plugin.WebSearch diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs index 1b42bf788..105e7dd68 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceViewModel.cs @@ -1,9 +1,10 @@ using Flow.Launcher.Infrastructure.Image; using System; -using System.Drawing; using System.IO; using System.Threading.Tasks; +#pragma warning disable IDE0005 using System.Windows; +#pragma warning restore IDE0005 using System.Windows.Media; namespace Flow.Launcher.Plugin.WebSearch diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs index 44f717c4b..7caa5beb3 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml.cs @@ -1,4 +1,3 @@ -using Microsoft.Win32; using System.Windows; using System.Windows.Controls; using Flow.Launcher.Core.Plugin; diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs index 40379b1ed..51f81b718 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Baidu.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Net; using System.Text.Json; using System.Text.RegularExpressions; using System.Threading.Tasks; diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs index b8ad9a586..640674243 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Bing.cs @@ -2,10 +2,7 @@ using Flow.Launcher.Infrastructure.Logger; using System; using System.Collections.Generic; -using System.IO; using System.Net.Http; -using System.Text; -using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Text.Json; using System.Linq; diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs index 567e896b5..265de4a98 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SuggestionSources/Google.cs @@ -1,14 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Net; using System.Threading.Tasks; using Flow.Launcher.Infrastructure.Http; using Flow.Launcher.Infrastructure.Logger; using System.Net.Http; using System.Threading; using System.Text.Json; -using System.IO; namespace Flow.Launcher.Plugin.WebSearch.SuggestionSources { diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs index e123e2d2f..ea9bb269d 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs @@ -1,9 +1,6 @@ using System; using System.Collections.Generic; using System.Windows; -using Flow.Launcher.Plugin; -using Flow.Launcher.Plugin.WindowsSettings.Classes; -using Flow.Launcher.Plugin.WindowsSettings.Properties; namespace Flow.Launcher.Plugin.WindowsSettings.Helper { diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs index 0bfb00b34..ec9a8224e 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; -using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.WindowsSettings.Classes; using Flow.Launcher.Plugin.WindowsSettings.Properties; diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/TranslationHelper.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/TranslationHelper.cs index 327d70296..52b07e8d9 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/TranslationHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/TranslationHelper.cs @@ -1,6 +1,4 @@ using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Globalization; using System.Linq; using Flow.Launcher.Plugin.WindowsSettings.Classes; using Flow.Launcher.Plugin.WindowsSettings.Properties; diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Log.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Log.cs index 2f6324767..257b0fa8b 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Log.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Log.cs @@ -1,6 +1,5 @@ using System; using System.Runtime.CompilerServices; -using Flow.Launcher.Plugin; namespace Flow.Launcher.Plugin.WindowsSettings { diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Main.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Main.cs index cbcca03ae..ce8709171 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Main.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Globalization; using System.Reflection; -using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.WindowsSettings.Classes; using Flow.Launcher.Plugin.WindowsSettings.Helper; using Flow.Launcher.Plugin.WindowsSettings.Properties; From df5e8ca1327f6500231ade37090676caee88bbee Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Tue, 25 Apr 2023 20:15:48 +0800 Subject: [PATCH 05/23] Remove unused packages --- .../Flow.Launcher.Plugin.BrowserBookmark.csproj | 2 -- .../Flow.Launcher.Plugin.Program.csproj | 1 - 2 files changed, 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj index 25577d96b..5af3457c5 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -57,8 +57,6 @@ - - diff --git a/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj b/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj index 02555cf1f..e9c680824 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj +++ b/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj @@ -59,7 +59,6 @@ - \ No newline at end of file From f019bb22845ed0635c637f7ec4cd13ebfa11b701 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Fri, 19 May 2023 00:55:41 -0400 Subject: [PATCH 06/23] Remove result logic so this method can be reused --- Flow.Launcher/ViewModel/MainViewModel.cs | 49 ++++++++++-------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 27809f67b..5486b41fb 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1114,37 +1114,30 @@ namespace Flow.Launcher.ViewModel { if (string.IsNullOrEmpty(stringToCopy)) { - var result = Results.SelectedItem?.Result; - if (result != null) - { - string copyText = result.CopyText; - var isFile = File.Exists(copyText); - var isFolder = Directory.Exists(copyText); - if (isFile || isFolder) - { - var paths = new StringCollection - { - copyText - }; - - Clipboard.SetFileDropList(paths); - App.API.ShowMsg( - $"{App.API.GetTranslation("copy")} {(isFile ? App.API.GetTranslation("fileTitle") : App.API.GetTranslation("folderTitle"))}", - App.API.GetTranslation("completedSuccessfully")); - } - else - { - Clipboard.SetDataObject(copyText); - App.API.ShowMsg( - $"{App.API.GetTranslation("copy")} {App.API.GetTranslation("textTitle")}", - App.API.GetTranslation("completedSuccessfully")); - } - } - return; } + var isFile = File.Exists(stringToCopy); + var isFolder = Directory.Exists(stringToCopy); + if (isFile || isFolder) + { + var paths = new StringCollection + { + stringToCopy + }; - Clipboard.SetDataObject(stringToCopy); + Clipboard.SetFileDropList(paths); + App.API.ShowMsg( + $"{App.API.GetTranslation("copy")} {(isFile ? App.API.GetTranslation("fileTitle") : App.API.GetTranslation("folderTitle"))}", + App.API.GetTranslation("completedSuccessfully")); + } + else + { + Clipboard.SetDataObject(stringToCopy); + App.API.ShowMsg( + $"{App.API.GetTranslation("copy")} {App.API.GetTranslation("textTitle")}", + App.API.GetTranslation("completedSuccessfully")); + } + return; } #endregion From f992729147b2a415a82526d9479e9fb875c8aa61 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Fri, 19 May 2023 00:56:33 -0400 Subject: [PATCH 07/23] Provide CopyText field instead of empty string --- Flow.Launcher/MainWindow.xaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 43bd9fd35..b334dd0fd 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -59,9 +59,11 @@ namespace Flow.Launcher private void OnCopy(object sender, ExecutedRoutedEventArgs e) { - if (QueryTextBox.SelectionLength == 0) + var result = _viewModel.Results.SelectedItem?.Result; + if (QueryTextBox.SelectionLength == 0 && result != null) { - _viewModel.ResultCopy(string.Empty); + string copyText = result.CopyText; + _viewModel.ResultCopy(copyText); } else if (!string.IsNullOrEmpty(QueryTextBox.Text)) From ed11cc2b22c0b6eaccfa74cef246e17b8289b9d1 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Fri, 19 May 2023 00:57:02 -0400 Subject: [PATCH 08/23] Use ResultCopy to support files --- Flow.Launcher/PublicAPIInstance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 800115bfa..b61e22d5e 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -118,7 +118,7 @@ namespace Flow.Launcher public void CopyToClipboard(string text) { - Clipboard.SetDataObject(text); + _mainVM.ResultCopy(text); } public void StartLoadingBar() => _mainVM.ProgressBarVisibility = Visibility.Visible; From 6bdf6ac1ce3d02e3e04dc31389866f12f2fe75ac Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Sun, 4 Jun 2023 06:20:50 +0300 Subject: [PATCH 09/23] fix kill command to honor "Last Query Style" --- .../Flow.Launcher.Plugin.ProcessKiller/Main.cs | 15 +++++---------- .../ProcessHelper.cs | 3 ++- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs index 3eff7e398..be2a2dd66 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using Flow.Launcher.Infrastructure; -using System.Threading.Tasks; namespace Flow.Launcher.Plugin.ProcessKiller { @@ -89,7 +88,8 @@ namespace Flow.Launcher.Plugin.ProcessKiller Action = (c) => { processHelper.TryKill(p); - _ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list + // Re-query to refresh process list + _context.API.ChangeQuery(query.RawQuery, true); return true; } }); @@ -114,7 +114,8 @@ namespace Flow.Launcher.Plugin.ProcessKiller { processHelper.TryKill(p.Process); } - _ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list + // Re-query to refresh process list + _context.API.ChangeQuery(query.RawQuery, true); return true; } }); @@ -122,11 +123,5 @@ namespace Flow.Launcher.Plugin.ProcessKiller return sortedResults; } - - private static async Task DelayAndReQueryAsync(string query) - { - await Task.Delay(500); - _context.API.ChangeQuery(query, true); - } } } diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs index 0932955d6..0acc39fbb 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs @@ -1,4 +1,4 @@ -using Flow.Launcher.Infrastructure; +using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Logger; using System; using System.Collections.Generic; @@ -75,6 +75,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller if (!p.HasExited) { p.Kill(); + p.WaitForExit(50); } } catch (Exception e) From 488c8e81b8541b48c973c4dc923148fb0d17e23e Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sun, 4 Jun 2023 17:13:48 -0400 Subject: [PATCH 10/23] Update docstring --- Flow.Launcher/ViewModel/MainViewModel.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 5486b41fb..8529df7b3 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1104,12 +1104,11 @@ namespace Flow.Launcher.ViewModel } /// - /// This is the global copy method for an individual result. If no text is passed, - /// the method will work out what is to be copied based on the result, so plugin can offer the text - /// to be copied via the result model. If the text is a directory/file path, - /// then actual file/folder will be copied instead. - /// The result's subtitle text is the default text to be copied + /// Copies the specified file or folder path to the clipboard, or the specified text if it is not a valid file or folder path. + /// Shows a message indicating whether the operation was completed successfully. /// + /// The file or folder path, or text to copy to the clipboard. + /// Nothing. public void ResultCopy(string stringToCopy) { if (string.IsNullOrEmpty(stringToCopy)) From c6318952111bbadf32b20bbeb70ba236f7336d50 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sun, 4 Jun 2023 17:22:49 -0400 Subject: [PATCH 11/23] Copy selected query text if there is a selection --- 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 b334dd0fd..1e7735fb2 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -68,7 +68,7 @@ namespace Flow.Launcher } else if (!string.IsNullOrEmpty(QueryTextBox.Text)) { - _viewModel.ResultCopy(QueryTextBox.SelectedText); + System.Windows.Clipboard.SetText(QueryTextBox.SelectedText); } } From 9a28266e1fac91b481d46398a7c2418299b4cf3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jun 2023 22:59:56 +0000 Subject: [PATCH 12/23] Bump Microsoft.NET.Test.Sdk from 17.4.1 to 17.6.1 Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.4.1 to 17.6.1. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.4.1...v17.6.1) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Flow.Launcher.Test/Flow.Launcher.Test.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index f5d9dea28..d88becad0 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -54,7 +54,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file From 0b05e954e5d2dcf949e4a5d9332849ca90be86b7 Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Tue, 6 Jun 2023 12:57:44 +0300 Subject: [PATCH 13/23] add `Query.IsForced` property When a plugin is processing a query, it can check the `IsForced` property to decide if the results will be served from cache or not. --- Flow.Launcher.Plugin/Query.cs | 6 ++++++ Flow.Launcher/ViewModel/MainViewModel.cs | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs index 95547d273..615729b61 100644 --- a/Flow.Launcher.Plugin/Query.cs +++ b/Flow.Launcher.Plugin/Query.cs @@ -29,6 +29,12 @@ namespace Flow.Launcher.Plugin /// public string RawQuery { get; internal init; } + /// + /// Determines whether the query was forced to execute again. + /// When this property is true, plugins handling this query should avoid serving cached results. + /// + public bool IsForced { get; internal set; } = false; + /// /// Search part of a query. /// This will not include action keyword if exclusive plugin gets it, otherwise it should be same as RawQuery. diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 8529df7b3..5d21341e3 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -512,7 +512,7 @@ namespace Flow.Launcher.ViewModel } else if (reQuery) { - Query(); + Query(reQuery: true); } QueryTextCursorMovedToEnd = true; }); @@ -612,11 +612,11 @@ namespace Flow.Launcher.ViewModel #region Query - public void Query() + public void Query(bool reQuery = false) { if (SelectedIsFromQueryResults()) { - QueryResults(); + QueryResults(reQuery); } else if (ContextMenuSelected()) { @@ -716,7 +716,7 @@ namespace Flow.Launcher.ViewModel private readonly IReadOnlyList _emptyResult = new List(); - private async void QueryResults() + private async void QueryResults(bool reQuery = false) { _updateSource?.Cancel(); @@ -747,6 +747,8 @@ namespace Flow.Launcher.ViewModel if (currentCancellationToken.IsCancellationRequested) return; + // Update the query's IsForced property to true if this is a re-query + query.IsForced = reQuery; // handle the exclusiveness of plugin using action keyword RemoveOldQueryResults(query); From fa783a9cd46c2ab3559aaa297135a845a3287e31 Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Tue, 6 Jun 2023 13:06:39 +0300 Subject: [PATCH 14/23] bind `Ctrl + R` to re-running the current query --- Flow.Launcher/MainWindow.xaml | 4 ++++ Flow.Launcher/ViewModel/MainViewModel.cs | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 4a95834b5..f864815e4 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -86,6 +86,10 @@ Key="O" Command="{Binding LoadContextMenuCommand}" Modifiers="Ctrl" /> + Date: Wed, 7 Jun 2023 23:19:47 +0300 Subject: [PATCH 15/23] Query: rename `IsForced` property to `IsReQuery` --- Flow.Launcher.Plugin/Query.cs | 3 ++- Flow.Launcher/ViewModel/MainViewModel.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs index 615729b61..3ee44f6b6 100644 --- a/Flow.Launcher.Plugin/Query.cs +++ b/Flow.Launcher.Plugin/Query.cs @@ -31,9 +31,10 @@ namespace Flow.Launcher.Plugin /// /// Determines whether the query was forced to execute again. + /// For example, the value will be true when the user presses Ctrl + R. /// When this property is true, plugins handling this query should avoid serving cached results. /// - public bool IsForced { get; internal set; } = false; + public bool IsReQuery { get; internal set; } = false; /// /// Search part of a query. diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index c051cd3d1..a0c1e8479 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -756,8 +756,8 @@ namespace Flow.Launcher.ViewModel if (currentCancellationToken.IsCancellationRequested) return; - // Update the query's IsForced property to true if this is a re-query - query.IsForced = reQuery; + // Update the query's IsReQuery property to true if this is a re-query + query.IsReQuery = reQuery; // handle the exclusiveness of plugin using action keyword RemoveOldQueryResults(query); From 1ff328be031a7b18a2ce6c81b350047b48803d30 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 8 Jun 2023 22:46:37 +1000 Subject: [PATCH 16/23] update copy calls to use API CopyToClipboard method --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 3 ++- Flow.Launcher/MainWindow.xaml.cs | 2 +- Flow.Launcher/ViewModel/MainViewModel.cs | 7 +++--- .../Main.cs | 2 +- .../Flow.Launcher.Plugin.Calculator/Main.cs | 2 +- .../ContextMenu.cs | 2 +- .../Helper/ContextMenuHelper.cs | 22 +------------------ 7 files changed, 11 insertions(+), 29 deletions(-) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index d0fdf136b..24d4c9a73 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -40,7 +40,8 @@ namespace Flow.Launcher.Plugin void ShellRun(string cmd, string filename = "cmd.exe"); /// - /// Copy Text to clipboard + /// If the passed in text is the path to a file or directory, the actual file/directory will + /// be copied to clipboard. Otherwise the text itself will be copied to clipboard. /// /// Text to save on clipboard public void CopyToClipboard(string text); diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 1e7735fb2..6ee0e24c1 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -68,7 +68,7 @@ namespace Flow.Launcher } else if (!string.IsNullOrEmpty(QueryTextBox.Text)) { - System.Windows.Clipboard.SetText(QueryTextBox.SelectedText); + System.Windows.Clipboard.SetDataObject(QueryTextBox.SelectedText); } } diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 8529df7b3..354b625a4 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1112,11 +1112,10 @@ namespace Flow.Launcher.ViewModel public void ResultCopy(string stringToCopy) { if (string.IsNullOrEmpty(stringToCopy)) - { return; - } + var isFile = File.Exists(stringToCopy); - var isFolder = Directory.Exists(stringToCopy); + var isFolder = isFile ? false : Directory.Exists(stringToCopy); // No need to eval directory exists if determined that file exists if (isFile || isFolder) { var paths = new StringCollection @@ -1125,6 +1124,7 @@ namespace Flow.Launcher.ViewModel }; Clipboard.SetFileDropList(paths); + App.API.ShowMsg( $"{App.API.GetTranslation("copy")} {(isFile ? App.API.GetTranslation("fileTitle") : App.API.GetTranslation("folderTitle"))}", App.API.GetTranslation("completedSuccessfully")); @@ -1132,6 +1132,7 @@ namespace Flow.Launcher.ViewModel else { Clipboard.SetDataObject(stringToCopy); + App.API.ShowMsg( $"{App.API.GetTranslation("copy")} {App.API.GetTranslation("textTitle")}", App.API.GetTranslation("completedSuccessfully")); diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs index d9a719272..3ac12dc2e 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs @@ -174,7 +174,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark { try { - Clipboard.SetDataObject(((BookmarkAttributes)selectedResult.ContextData).Url); + context.API.CopyToClipboard(((BookmarkAttributes)selectedResult.ContextData).Url); return true; } diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs index d5dcdacea..e2aa5860c 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs @@ -95,7 +95,7 @@ namespace Flow.Launcher.Plugin.Caculator { try { - Clipboard.SetDataObject(newResult); + Context.API.CopyToClipboard(newResult); return true; } catch (ExternalException) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index f5733bbb5..5e5cab2f5 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -124,7 +124,7 @@ namespace Flow.Launcher.Plugin.Explorer { try { - Clipboard.SetText(record.FullPath); + Clipboard.SetDataObject(record.FullPath); return true; } catch (Exception e) diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs index e123e2d2f..ca09df9de 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs @@ -22,26 +22,6 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper internal static List GetContextMenu(in Result result, in string assemblyName) { return new List(0); - } - - /// - /// Copy the given text to the clipboard - /// - /// The text to copy to the clipboard - /// The text successful copy to the clipboard, otherwise - private static bool TryToCopyToClipBoard(in string text) - { - try - { - Clipboard.Clear(); - Clipboard.SetText(text); - return true; - } - catch (Exception exception) - { - Log.Exception("Can't copy to clipboard", exception, typeof(Main)); - return false; - } - } + } } } From 2b862f702a700e432aba7244117dc5f472eaff2e Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Fri, 9 Jun 2023 19:59:49 +1000 Subject: [PATCH 17/23] Make CopyToClipboard generic --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 10 +++-- Flow.Launcher/MainWindow.xaml.cs | 3 +- Flow.Launcher/PublicAPIInstance.cs | 30 ++++++++++++++- Flow.Launcher/ViewModel/MainViewModel.cs | 37 ------------------- .../ContextMenu.cs | 7 +--- Plugins/Flow.Launcher.Plugin.Explorer/Main.cs | 2 +- Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 2 +- 7 files changed, 39 insertions(+), 52 deletions(-) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index 24d4c9a73..591bbdea3 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -38,13 +38,15 @@ namespace Flow.Launcher.Plugin /// Thrown when unable to find the file specified in the command /// Thrown when error occurs during the execution of the command void ShellRun(string cmd, string filename = "cmd.exe"); - + /// - /// If the passed in text is the path to a file or directory, the actual file/directory will - /// be copied to clipboard. Otherwise the text itself will be copied to clipboard. + /// Copies the passed in text and shows a message indicating whether the operation was completed successfully. + /// When directCopy is set to true and passed in text is the path to a file or directory, + /// the actual file/directory will be copied to clipboard. Otherwise the text itself will still be copied to clipboard. /// /// Text to save on clipboard - public void CopyToClipboard(string text); + /// When true it will directly copy the file/folder from the path specified in text + public void CopyToClipboard(string text, bool directCopy = false); /// /// Save everything, all of Flow Launcher and plugins' data and settings diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 6ee0e24c1..b4417eb59 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -63,8 +63,7 @@ namespace Flow.Launcher if (QueryTextBox.SelectionLength == 0 && result != null) { string copyText = result.CopyText; - _viewModel.ResultCopy(copyText); - + App.API.CopyToClipboard(copyText, directCopy: true); } else if (!string.IsNullOrEmpty(QueryTextBox.Text)) { diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index b61e22d5e..ff1619b0a 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -24,6 +24,7 @@ using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.Storage; using System.Collections.Concurrent; using System.Diagnostics; +using System.Collections.Specialized; namespace Flow.Launcher { @@ -116,10 +117,35 @@ namespace Flow.Launcher ShellCommand.Execute(startInfo); } - public void CopyToClipboard(string text) + public void CopyToClipboard(string stringToCopy, bool directCopy = false) { - _mainVM.ResultCopy(text); + if (string.IsNullOrEmpty(stringToCopy)) + return; + + var isFile = File.Exists(stringToCopy); + if (directCopy && (isFile || Directory.Exists(stringToCopy))) + { + var paths = new StringCollection + { + stringToCopy + }; + + Clipboard.SetFileDropList(paths); + + ShowMsg( + $"{GetTranslation("copy")} {(isFile ? GetTranslation("fileTitle") : GetTranslation("folderTitle"))}", + GetTranslation("completedSuccessfully")); + } + else + { + Clipboard.SetDataObject(stringToCopy); + + ShowMsg( + $"{GetTranslation("copy")} {GetTranslation("textTitle")}", + GetTranslation("completedSuccessfully")); + } } + public void StartLoadingBar() => _mainVM.ProgressBarVisibility = Visibility.Visible; diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 354b625a4..84c13442d 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1103,43 +1103,6 @@ namespace Flow.Launcher.ViewModel Results.AddResults(resultsForUpdates, token); } - /// - /// Copies the specified file or folder path to the clipboard, or the specified text if it is not a valid file or folder path. - /// Shows a message indicating whether the operation was completed successfully. - /// - /// The file or folder path, or text to copy to the clipboard. - /// Nothing. - public void ResultCopy(string stringToCopy) - { - if (string.IsNullOrEmpty(stringToCopy)) - return; - - var isFile = File.Exists(stringToCopy); - var isFolder = isFile ? false : Directory.Exists(stringToCopy); // No need to eval directory exists if determined that file exists - if (isFile || isFolder) - { - var paths = new StringCollection - { - stringToCopy - }; - - Clipboard.SetFileDropList(paths); - - App.API.ShowMsg( - $"{App.API.GetTranslation("copy")} {(isFile ? App.API.GetTranslation("fileTitle") : App.API.GetTranslation("folderTitle"))}", - App.API.GetTranslation("completedSuccessfully")); - } - else - { - Clipboard.SetDataObject(stringToCopy); - - App.API.ShowMsg( - $"{App.API.GetTranslation("copy")} {App.API.GetTranslation("textTitle")}", - App.API.GetTranslation("completedSuccessfully")); - } - return; - } - #endregion } } diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index 5e5cab2f5..4f6e84654 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -124,7 +124,7 @@ namespace Flow.Launcher.Plugin.Explorer { try { - Clipboard.SetDataObject(record.FullPath); + Context.API.CopyToClipboard(record.FullPath); return true; } catch (Exception e) @@ -147,10 +147,7 @@ namespace Flow.Launcher.Plugin.Explorer { try { - Clipboard.SetFileDropList(new System.Collections.Specialized.StringCollection - { - record.FullPath - }); + Context.API.CopyToClipboard(record.FullPath, directCopy: true); return true; } catch (Exception e) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs index 82a5d5441..e4056131d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs @@ -79,7 +79,7 @@ namespace Flow.Launcher.Plugin.Explorer ? action : _ => { - Clipboard.SetDataObject(e.ToString()); + Context.API.CopyToClipboard(e.ToString()); return new ValueTask(true); } } diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs index f64f5d376..46290b345 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs @@ -406,7 +406,7 @@ namespace Flow.Launcher.Plugin.Shell Title = context.API.GetTranslation("flowlauncher_plugin_cmd_copy"), Action = c => { - Clipboard.SetDataObject(selectedResult.Title); + context.API.CopyToClipboard(selectedResult.Title); return true; }, IcoPath = "Images/copy.png", From a35b0011700217232509359bfe57bf529e3662b5 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 11 Jun 2023 16:45:27 +0930 Subject: [PATCH 18/23] Update AppVeyor NuGet API (#2180) --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a3cc8ecfb..2068cd67b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,7 +51,7 @@ deploy: - provider: NuGet artifact: Plugin nupkg api_key: - secure: EwKxUgjI8VGouFq9fdhI68+uj42amAhwE65JixIbqx8VlqLbyEuW97CLjBBOIL0r + secure: Uho7u3gk4RHzyWGgqgXZuOeI55NbqHLQ9tXahL7xmE4av2oiSldrNiyGgy/0AQYw on: APPVEYOR_REPO_TAG: true From 6f7c3eba4dbc6de6bd3d99f46c7b93325b8fe1e1 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 11 Jun 2023 21:59:08 +1000 Subject: [PATCH 19/23] add option to suppress notification when calling copy --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 5 ++++- Flow.Launcher/MainWindow.xaml.cs | 2 +- Flow.Launcher/PublicAPIInstance.cs | 17 +++++++++-------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index 591bbdea3..a07975f3c 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -46,7 +46,10 @@ namespace Flow.Launcher.Plugin /// /// Text to save on clipboard /// When true it will directly copy the file/folder from the path specified in text - public void CopyToClipboard(string text, bool directCopy = false); + /// Whether to show the default notification from this method after copy is done. + /// It will show file/folder/text is copied successfully. + /// Turn this off to show your own notification after copy is done.> + public void CopyToClipboard(string text, bool directCopy = false, bool showDefaultNotification = true); /// /// Save everything, all of Flow Launcher and plugins' data and settings diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index b4417eb59..4adfccff4 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -67,7 +67,7 @@ namespace Flow.Launcher } else if (!string.IsNullOrEmpty(QueryTextBox.Text)) { - System.Windows.Clipboard.SetDataObject(QueryTextBox.SelectedText); + App.API.CopyToClipboard(QueryTextBox.SelectedText, showDefaultNotification: false); } } diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index ff1619b0a..c1a9d8cd2 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -117,7 +117,7 @@ namespace Flow.Launcher ShellCommand.Execute(startInfo); } - public void CopyToClipboard(string stringToCopy, bool directCopy = false) + public void CopyToClipboard(string stringToCopy, bool directCopy = false, bool showDefaultNotification = true) { if (string.IsNullOrEmpty(stringToCopy)) return; @@ -132,20 +132,21 @@ namespace Flow.Launcher Clipboard.SetFileDropList(paths); - ShowMsg( - $"{GetTranslation("copy")} {(isFile ? GetTranslation("fileTitle") : GetTranslation("folderTitle"))}", - GetTranslation("completedSuccessfully")); + if (showDefaultNotification) + ShowMsg( + $"{GetTranslation("copy")} {(isFile ? GetTranslation("fileTitle") : GetTranslation("folderTitle"))}", + GetTranslation("completedSuccessfully")); } else { Clipboard.SetDataObject(stringToCopy); - ShowMsg( - $"{GetTranslation("copy")} {GetTranslation("textTitle")}", - GetTranslation("completedSuccessfully")); + if (showDefaultNotification) + ShowMsg( + $"{GetTranslation("copy")} {GetTranslation("textTitle")}", + GetTranslation("completedSuccessfully")); } } - public void StartLoadingBar() => _mainVM.ProgressBarVisibility = Visibility.Visible; From e078de557bac40db9fba4eb1f822f5c9c6d0f3ba Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 11 Jun 2023 21:59:46 +1000 Subject: [PATCH 20/23] add CopyText for Shell plugin --- Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs index 46290b345..bf8f9f4d0 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs @@ -84,7 +84,8 @@ namespace Flow.Launcher.Plugin.Shell Execute(Process.Start, PrepareProcessStartInfo(m, runAsAdministrator)); return true; - } + }, + CopyText = m })); } } @@ -123,7 +124,8 @@ namespace Flow.Launcher.Plugin.Shell Execute(Process.Start, PrepareProcessStartInfo(m.Key, runAsAdministrator)); return true; - } + }, + CopyText = m.Key }; return ret; }).Where(o => o != null); @@ -152,7 +154,8 @@ namespace Flow.Launcher.Plugin.Shell Execute(Process.Start, PrepareProcessStartInfo(cmd, runAsAdministrator)); return true; - } + }, + CopyText = cmd }; return result; @@ -176,7 +179,8 @@ namespace Flow.Launcher.Plugin.Shell Execute(Process.Start, PrepareProcessStartInfo(m.Key, runAsAdministrator)); return true; - } + }, + CopyText = m.Key }); if (_settings.ShowOnlyMostUsedCMDs) From f22ce3788da38415ebd2e35958a04799e75c8c21 Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Sun, 11 Jun 2023 16:19:41 +0300 Subject: [PATCH 21/23] rename params to isReQuery for consistency --- Flow.Launcher/ViewModel/MainViewModel.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index a0c1e8479..37e993c28 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -210,7 +210,7 @@ namespace Flow.Launcher.ViewModel { if (SelectedIsFromQueryResults()) { - QueryResults(reQuery: true); + QueryResults(isReQuery: true); } } @@ -504,8 +504,8 @@ namespace Flow.Launcher.ViewModel /// but we don't want to move cursor to end when query is updated from TextBox /// /// - /// Force query even when Query Text doesn't change - public void ChangeQueryText(string queryText, bool reQuery = false) + /// Force query even when Query Text doesn't change + public void ChangeQueryText(string queryText, bool isReQuery = false) { Application.Current.Dispatcher.Invoke(() => { @@ -519,9 +519,9 @@ namespace Flow.Launcher.ViewModel QueryTextCursorMovedToEnd = false; } - else if (reQuery) + else if (isReQuery) { - Query(reQuery: true); + Query(isReQuery: true); } QueryTextCursorMovedToEnd = true; }); @@ -621,11 +621,11 @@ namespace Flow.Launcher.ViewModel #region Query - public void Query(bool reQuery = false) + public void Query(bool isReQuery = false) { if (SelectedIsFromQueryResults()) { - QueryResults(reQuery); + QueryResults(isReQuery); } else if (ContextMenuSelected()) { @@ -725,7 +725,7 @@ namespace Flow.Launcher.ViewModel private readonly IReadOnlyList _emptyResult = new List(); - private async void QueryResults(bool reQuery = false) + private async void QueryResults(bool isReQuery = false) { _updateSource?.Cancel(); @@ -757,7 +757,7 @@ namespace Flow.Launcher.ViewModel return; // Update the query's IsReQuery property to true if this is a re-query - query.IsReQuery = reQuery; + query.IsReQuery = isReQuery; // handle the exclusiveness of plugin using action keyword RemoveOldQueryResults(query); From 0d7dbe2bc8e7d085b71817c537f45aef28542b29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jun 2023 14:45:52 +0000 Subject: [PATCH 22/23] Bump Microsoft.VisualStudio.Threading from 17.5.22 to 17.6.40 (#2187) --- .../Flow.Launcher.Infrastructure.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index 1d4db757b..cd78034f7 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -53,7 +53,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + From e1c63af06184d3993128da09373307566265e425 Mon Sep 17 00:00:00 2001 From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sat, 17 Jun 2023 21:33:00 +0800 Subject: [PATCH 23/23] Add quotes surrounding auto startup entry (#2150) * Add quotes surrounding auto startup entry * Add quotes surrounding auto startup entry --- Flow.Launcher/Helper/AutoStartup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/Helper/AutoStartup.cs b/Flow.Launcher/Helper/AutoStartup.cs index 6a7aceb31..bf36b7f6f 100644 --- a/Flow.Launcher/Helper/AutoStartup.cs +++ b/Flow.Launcher/Helper/AutoStartup.cs @@ -47,7 +47,7 @@ namespace Flow.Launcher.Helper try { using var key = Registry.CurrentUser.OpenSubKey(StartupPath, true); - key?.SetValue(Constant.FlowLauncher, Constant.ExecutablePath); + key?.SetValue(Constant.FlowLauncher, $"\"{Constant.ExecutablePath}\""); } catch (Exception e) {