From 9c13416231074f78968640b0a4e87b4a00705651 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Mon, 6 Sep 2021 12:31:07 -0500 Subject: [PATCH 001/206] Fixes Typo TermSeparator & remove the actionkeyword in Terms --- Flow.Launcher.Core/Plugin/QueryBuilder.cs | 24 +++++------- Flow.Launcher.Plugin/Query.cs | 37 +++++++------------ Flow.Launcher/ActionKeywords.xaml.cs | 2 +- Flow.Launcher/ViewModel/PluginViewModel.cs | 2 +- .../Main.cs | 2 +- .../Main.cs | 2 +- Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 2 +- 7 files changed, 28 insertions(+), 43 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/QueryBuilder.cs b/Flow.Launcher.Core/Plugin/QueryBuilder.cs index df336e14b..444335afd 100644 --- a/Flow.Launcher.Core/Plugin/QueryBuilder.cs +++ b/Flow.Launcher.Core/Plugin/QueryBuilder.cs @@ -10,35 +10,31 @@ namespace Flow.Launcher.Core.Plugin public static Query Build(string text, Dictionary nonGlobalPlugins) { // replace multiple white spaces with one white space - var terms = text.Split(new[] { Query.TermSeperater }, StringSplitOptions.RemoveEmptyEntries); - if (terms.Length == 0) + var textSplit = text.Split(Query.TermSeparator, StringSplitOptions.RemoveEmptyEntries); + if (textSplit.Length == 0) { // nothing was typed return null; } - var rawQuery = string.Join(Query.TermSeperater, terms); + var rawQuery = string.Join(Query.TermSeparator, textSplit); string actionKeyword, search; - string possibleActionKeyword = terms[0]; - List actionParameters; + string possibleActionKeyword = textSplit[0]; + string[] terms; + if (nonGlobalPlugins.TryGetValue(possibleActionKeyword, out var pluginPair) && !pluginPair.Metadata.Disabled) { // use non global plugin for query actionKeyword = possibleActionKeyword; - actionParameters = terms.Skip(1).ToList(); - search = actionParameters.Count > 0 ? rawQuery.Substring(actionKeyword.Length + 1) : string.Empty; + search = textSplit.Length > 1 ? rawQuery[(actionKeyword.Length + 1)..] : string.Empty; + terms = textSplit[1..]; } else { // non action keyword actionKeyword = string.Empty; search = rawQuery; + terms = textSplit; } - var query = new Query - { - Terms = terms, - RawQuery = rawQuery, - ActionKeyword = actionKeyword, - Search = search - }; + var query = new Query(rawQuery, search, terms, actionKeyword); return query; } diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs index 1eb5c9c14..05e34b9d9 100644 --- a/Flow.Launcher.Plugin/Query.cs +++ b/Flow.Launcher.Plugin/Query.cs @@ -1,4 +1,5 @@ -using System; +using JetBrains.Annotations; +using System; using System.Collections.Generic; using System.Linq; @@ -23,7 +24,7 @@ namespace Flow.Launcher.Plugin /// Raw query, this includes action keyword if it has /// We didn't recommend use this property directly. You should always use Search property. /// - public string RawQuery { get; internal set; } + public string RawQuery { get; internal init; } /// /// Search part of a query. @@ -31,45 +32,40 @@ namespace Flow.Launcher.Plugin /// Since we allow user to switch a exclusive plugin to generic plugin, /// so this property will always give you the "real" query part of the query /// - public string Search { get; internal set; } + public string Search { get; internal init; } /// /// The raw query splited into a string array. /// - public string[] Terms { get; set; } + public string[] Terms { get; init; } /// /// Query can be splited into multiple terms by whitespace /// - public const string TermSeperater = " "; + public const string TermSeparator = " "; /// /// User can set multiple action keywords seperated by ';' /// - public const string ActionKeywordSeperater = ";"; + public const string ActionKeywordSeparator = ";"; /// /// '*' is used for System Plugin /// public const string GlobalPluginWildcardSign = "*"; - public string ActionKeyword { get; set; } + public string ActionKeyword { get; init; } /// /// Return first search split by space if it has /// public string FirstSearch => SplitSearch(0); + private string _secondToEndSearch; + /// /// strings from second search (including) to last search /// - public string SecondToEndSearch - { - get - { - var index = string.IsNullOrEmpty(ActionKeyword) ? 1 : 2; - return string.Join(TermSeperater, Terms.Skip(index).ToArray()); - } - } + public string SecondToEndSearch => _secondToEndSearch ??= string.Join(' ', Terms.AsMemory(2)); /// /// Return second search split by space if it has @@ -83,16 +79,9 @@ namespace Flow.Launcher.Plugin private string SplitSearch(int index) { - try - { - return string.IsNullOrEmpty(ActionKeyword) ? Terms[index] : Terms[index + 1]; - } - catch (IndexOutOfRangeException) - { - return string.Empty; - } + return index < Terms.Length ? Terms[index] : string.Empty; } public override string ToString() => RawQuery; } -} +} \ No newline at end of file diff --git a/Flow.Launcher/ActionKeywords.xaml.cs b/Flow.Launcher/ActionKeywords.xaml.cs index 4a2368347..281be6e52 100644 --- a/Flow.Launcher/ActionKeywords.xaml.cs +++ b/Flow.Launcher/ActionKeywords.xaml.cs @@ -30,7 +30,7 @@ namespace Flow.Launcher private void ActionKeyword_OnLoaded(object sender, RoutedEventArgs e) { - tbOldActionKeyword.Text = string.Join(Query.ActionKeywordSeperater, plugin.Metadata.ActionKeywords.ToArray()); + tbOldActionKeyword.Text = string.Join(Query.ActionKeywordSeparator, plugin.Metadata.ActionKeywords.ToArray()); tbAction.Focus(); } diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs index 1ac320cf0..b0db8bca0 100644 --- a/Flow.Launcher/ViewModel/PluginViewModel.cs +++ b/Flow.Launcher/ViewModel/PluginViewModel.cs @@ -22,7 +22,7 @@ namespace Flow.Launcher.ViewModel public Visibility ActionKeywordsVisibility => PluginPair.Metadata.ActionKeywords.Count == 1 ? Visibility.Visible : Visibility.Collapsed; public string InitilizaTime => PluginPair.Metadata.InitTime.ToString() + "ms"; public string QueryTime => PluginPair.Metadata.AvgQueryTime + "ms"; - public string ActionKeywordsText => string.Join(Query.ActionKeywordSeperater, PluginPair.Metadata.ActionKeywords); + public string ActionKeywordsText => string.Join(Query.ActionKeywordSeparator, PluginPair.Metadata.ActionKeywords); public int Priority => PluginPair.Metadata.Priority; public void ChangeActionKeyword(string newActionKeyword, string oldActionKeyword) diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs index 190f40a03..a27986e75 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs @@ -27,7 +27,7 @@ namespace Flow.Launcher.Plugin.PluginIndicator IcoPath = metadata.IcoPath, Action = c => { - context.API.ChangeQuery($"{keyword}{Plugin.Query.TermSeperater}"); + context.API.ChangeQuery($"{keyword}{Plugin.Query.TermSeparator}"); return false; } }; diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs index c3d9d1ab2..29d3511eb 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs @@ -25,7 +25,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller { var termToSearch = query.Terms.Length <= 1 ? null - : string.Join(Plugin.Query.TermSeperater, query.Terms.Skip(1)).ToLower(); + : string.Join(Plugin.Query.TermSeparator, query.Terms.Skip(1)).ToLower(); var processlist = processHelper.GetMatchingProcesses(termToSearch); diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs index 58f8538f0..9ccb600e5 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs @@ -297,7 +297,7 @@ namespace Flow.Launcher.Plugin.Shell private void OnWinRPressed() { - context.API.ChangeQuery($"{context.CurrentPluginMetadata.ActionKeywords[0]}{Plugin.Query.TermSeperater}"); + context.API.ChangeQuery($"{context.CurrentPluginMetadata.ActionKeywords[0]}{Plugin.Query.TermSeparator}"); // show the main window and set focus to the query box Window mainWindow = Application.Current.MainWindow; From 812703766ab03693ea1366052f9acb1682f8de41 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Tue, 7 Sep 2021 17:07:21 -0500 Subject: [PATCH 002/206] Mark previous api as obsolete to preserve backward compatibility. --- Flow.Launcher.Core/Plugin/QueryBuilder.cs | 18 +++++++-------- Flow.Launcher.Plugin/Query.cs | 23 +++++++++++++++---- .../Main.cs | 4 ++-- .../Main.cs | 4 +--- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/QueryBuilder.cs b/Flow.Launcher.Core/Plugin/QueryBuilder.cs index 444335afd..ef387b693 100644 --- a/Flow.Launcher.Core/Plugin/QueryBuilder.cs +++ b/Flow.Launcher.Core/Plugin/QueryBuilder.cs @@ -10,31 +10,31 @@ namespace Flow.Launcher.Core.Plugin public static Query Build(string text, Dictionary nonGlobalPlugins) { // replace multiple white spaces with one white space - var textSplit = text.Split(Query.TermSeparator, StringSplitOptions.RemoveEmptyEntries); - if (textSplit.Length == 0) + var terms = text.Split(Query.TermSeparator, StringSplitOptions.RemoveEmptyEntries); + if (terms.Length == 0) { // nothing was typed return null; } - var rawQuery = string.Join(Query.TermSeparator, textSplit); + var rawQuery = string.Join(Query.TermSeparator, terms); string actionKeyword, search; - string possibleActionKeyword = textSplit[0]; - string[] terms; + string possibleActionKeyword = terms[0]; + string[] searchTerms; if (nonGlobalPlugins.TryGetValue(possibleActionKeyword, out var pluginPair) && !pluginPair.Metadata.Disabled) { // use non global plugin for query actionKeyword = possibleActionKeyword; - search = textSplit.Length > 1 ? rawQuery[(actionKeyword.Length + 1)..] : string.Empty; - terms = textSplit[1..]; + search = terms.Length > 1 ? rawQuery[(actionKeyword.Length + 1)..] : string.Empty; + searchTerms = terms[1..]; } else { // non action keyword actionKeyword = string.Empty; search = rawQuery; - terms = textSplit; + searchTerms = terms; } - var query = new Query(rawQuery, search, terms, actionKeyword); + var query = new Query(rawQuery, search,terms, searchTerms, actionKeyword); return query; } diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs index 05e34b9d9..12681388e 100644 --- a/Flow.Launcher.Plugin/Query.cs +++ b/Flow.Launcher.Plugin/Query.cs @@ -12,11 +12,11 @@ namespace Flow.Launcher.Plugin /// /// to allow unit tests for plug ins /// - public Query(string rawQuery, string search, string[] terms, string actionKeyword = "") + public Query(string rawQuery, string search, string[] terms, string[] searchTerms, string actionKeyword = "") { Search = search; RawQuery = rawQuery; - Terms = terms; + SearchTerms = searchTerms; ActionKeyword = actionKeyword; } @@ -35,18 +35,31 @@ namespace Flow.Launcher.Plugin public string Search { get; internal init; } /// - /// The raw query splited into a string array. + /// The search string split into a string array. /// + public string[] SearchTerms { get; init; } + + /// + /// The raw query split into a string array + /// + [Obsolete("It may or may not include action keyword, which can be confusing. Use SearchTerms instead")] public string[] Terms { get; init; } /// /// Query can be splited into multiple terms by whitespace /// public const string TermSeparator = " "; + + [Obsolete("Typo")] + public const string TermSeperater = TermSeparator; /// /// User can set multiple action keywords seperated by ';' /// public const string ActionKeywordSeparator = ";"; + + [Obsolete("Typo")] + public const string ActionKeywordSeperater = ActionKeywordSeparator; + /// /// '*' is used for System Plugin @@ -65,7 +78,7 @@ namespace Flow.Launcher.Plugin /// /// strings from second search (including) to last search /// - public string SecondToEndSearch => _secondToEndSearch ??= string.Join(' ', Terms.AsMemory(2)); + public string SecondToEndSearch => _secondToEndSearch ??= string.Join(' ', SearchTerms.AsMemory(2)); /// /// Return second search split by space if it has @@ -79,7 +92,7 @@ namespace Flow.Launcher.Plugin private string SplitSearch(int index) { - return index < Terms.Length ? Terms[index] : string.Empty; + return index < SearchTerms.Length ? SearchTerms[index] : string.Empty; } public override string ToString() => RawQuery; diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs index a27986e75..b046b2beb 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Main.cs @@ -12,11 +12,11 @@ namespace Flow.Launcher.Plugin.PluginIndicator { // if query contains more than one word, eg. github tips // user has decided to type something else rather than wanting to see the available action keywords - if (query.Terms.Length > 1) + if (query.SearchTerms.Length > 1) return new List(); var results = from keyword in PluginManager.NonGlobalPlugins.Keys - where keyword.StartsWith(query.Terms[0]) + where keyword.StartsWith(query.SearchTerms[0]) let metadata = PluginManager.NonGlobalPlugins[keyword].Metadata where !metadata.Disabled select new Result diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs index 29d3511eb..31b4a67ed 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs @@ -23,9 +23,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller public List Query(Query query) { - var termToSearch = query.Terms.Length <= 1 - ? null - : string.Join(Plugin.Query.TermSeparator, query.Terms.Skip(1)).ToLower(); + var termToSearch = query.Search; var processlist = processHelper.GetMatchingProcesses(termToSearch); From 9b84f6c559a1ac46fed6fd41c1dc3558dd63d289 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sat, 11 Sep 2021 09:41:39 -0500 Subject: [PATCH 003/206] fix an issue of joining string --- Flow.Launcher.Plugin/Query.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs index 12681388e..84dbb3b36 100644 --- a/Flow.Launcher.Plugin/Query.cs +++ b/Flow.Launcher.Plugin/Query.cs @@ -78,7 +78,7 @@ namespace Flow.Launcher.Plugin /// /// strings from second search (including) to last search /// - public string SecondToEndSearch => _secondToEndSearch ??= string.Join(' ', SearchTerms.AsMemory(2)); + public string SecondToEndSearch => _secondToEndSearch ??= string.Join(' ', SearchTerms[1..]); /// /// Return second search split by space if it has From 6a0b190120a37309573e710bdcfb07b8fde1f744 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Mon, 20 Sep 2021 21:51:07 -0500 Subject: [PATCH 004/206] Fix Unassigned Terms --- Flow.Launcher.Plugin/Query.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs index 84dbb3b36..a4a806a62 100644 --- a/Flow.Launcher.Plugin/Query.cs +++ b/Flow.Launcher.Plugin/Query.cs @@ -16,6 +16,9 @@ namespace Flow.Launcher.Plugin { Search = search; RawQuery = rawQuery; +#pragma warning disable 618 Legacy Support + Terms = terms; +#pragma warning restore 618 SearchTerms = searchTerms; ActionKeyword = actionKeyword; } @@ -38,7 +41,7 @@ namespace Flow.Launcher.Plugin /// The search string split into a string array. /// public string[] SearchTerms { get; init; } - + /// /// The raw query split into a string array /// @@ -56,7 +59,7 @@ namespace Flow.Launcher.Plugin /// User can set multiple action keywords seperated by ';' /// public const string ActionKeywordSeparator = ";"; - + [Obsolete("Typo")] public const string ActionKeywordSeperater = ActionKeywordSeparator; From 7ff9b688c91af89a49b94ea1b67c09f9462241cd Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Tue, 21 Sep 2021 13:50:51 -0500 Subject: [PATCH 005/206] Refactor Bookmark plugin --- .../Bookmark.cs | 47 ++-------- .../ChromeBookmarkLoader.cs | 26 ++++++ .../ChromeBookmarks.cs | 87 ------------------- .../ChromiumBookmarkLoader.cs | 62 +++++++++++++ .../Commands/Bookmarks.cs | 6 +- .../EdgeBookmarkLoader.cs | 30 +++++++ .../EdgeBookmarks.cs | 87 ------------------- ...xBookmarks.cs => FirefoxBookmarkLoader.cs} | 33 +++---- .../IBookmarkLoader.cs | 9 ++ 9 files changed, 156 insertions(+), 231 deletions(-) create mode 100644 Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs delete mode 100644 Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarks.cs create mode 100644 Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs create mode 100644 Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs delete mode 100644 Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarks.cs rename Plugins/Flow.Launcher.Plugin.BrowserBookmark/{FirefoxBookmarks.cs => FirefoxBookmarkLoader.cs} (85%) create mode 100644 Plugins/Flow.Launcher.Plugin.BrowserBookmark/IBookmarkLoader.cs diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Bookmark.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Bookmark.cs index 790c03686..185cf1620 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Bookmark.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Bookmark.cs @@ -7,50 +7,19 @@ using System.Text; namespace Flow.Launcher.Plugin.BrowserBookmark { - public class Bookmark : IEquatable, IEqualityComparer + // Source may be important in the future + public record Bookmark(string Name, string Url, string Source = "") { - private string m_Name; - public string Name + public override int GetHashCode() { - get - { - return m_Name; - } - set - { - m_Name = value; - } - } - public string Url { get; set; } - public string Source { get; set; } - public int Score { get; set; } - - /* TODO: since Source maybe unimportant, we just need to compare Name and Url */ - public bool Equals(Bookmark other) - { - return Equals(this, other); - } - - public bool Equals(Bookmark x, Bookmark y) - { - if (Object.ReferenceEquals(x, y)) return true; - if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null)) - return false; - - return x.Name == y.Name && x.Url == y.Url; - } - - public int GetHashCode(Bookmark bookmark) - { - if (Object.ReferenceEquals(bookmark, null)) return 0; - int hashName = bookmark.Name == null ? 0 : bookmark.Name.GetHashCode(); - int hashUrl = bookmark.Url == null ? 0 : bookmark.Url.GetHashCode(); + var hashName = Name?.GetHashCode() ?? 0; + var hashUrl = Url?.GetHashCode() ?? 0; return hashName ^ hashUrl; } - public override int GetHashCode() + public virtual bool Equals(Bookmark other) { - return GetHashCode(this); + return other != null && Name == other.Name && Url == other.Url; } } -} +} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs new file mode 100644 index 000000000..7fdb86f31 --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; + +namespace Flow.Launcher.Plugin.BrowserBookmark +{ + public class ChromeBookmarkLoader : ChromiumBookmarkLoader + { + public override List GetBookmarks() + { + return LoadChromeBookmarks(); + } + + private List LoadChromeBookmarks() + { + var bookmarks = new List(); + String platformPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + bookmarks.AddRange(LoadBookmarks(Path.Combine(platformPath, @"Google\Chrome\User Data"), "Google Chrome")); + bookmarks.AddRange(LoadBookmarks(Path.Combine(platformPath, @"Google\Chrome SxS\User Data"), "Google Chrome Canary")); + bookmarks.AddRange(LoadBookmarks(Path.Combine(platformPath, @"Chromium\User Data"), "Chromium")); + return bookmarks; + } + } +} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarks.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarks.cs deleted file mode 100644 index def7f3abe..000000000 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarks.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; - -namespace Flow.Launcher.Plugin.BrowserBookmark -{ - public class ChromeBookmarks - { - private List bookmarks = new List(); - - public List GetBookmarks() - { - bookmarks.Clear(); - LoadChromeBookmarks(); - - return bookmarks; - } - - private void ParseChromeBookmarks(String path, string source) - { - if (!File.Exists(path)) return; - - string all = File.ReadAllText(path); - Regex nameRegex = new Regex("\"name\": \"(?.*?)\""); - MatchCollection nameCollection = nameRegex.Matches(all); - Regex typeRegex = new Regex("\"type\": \"(?.*?)\""); - MatchCollection typeCollection = typeRegex.Matches(all); - Regex urlRegex = new Regex("\"url\": \"(?.*?)\""); - MatchCollection urlCollection = urlRegex.Matches(all); - - List names = (from Match match in nameCollection select match.Groups["name"].Value).ToList(); - List types = (from Match match in typeCollection select match.Groups["type"].Value).ToList(); - List urls = (from Match match in urlCollection select match.Groups["url"].Value).ToList(); - - int urlIndex = 0; - for (int i = 0; i < names.Count; i++) - { - string name = DecodeUnicode(names[i]); - string type = types[i]; - if (type == "url") - { - string url = urls[urlIndex]; - urlIndex++; - - if (url == null) continue; - if (url.StartsWith("javascript:", StringComparison.OrdinalIgnoreCase)) continue; - if (url.StartsWith("vbscript:", StringComparison.OrdinalIgnoreCase)) continue; - - bookmarks.Add(new Bookmark() - { - Name = name, - Url = url, - Source = source - }); - } - } - } - - private void LoadChromeBookmarks(string path, string name) - { - if (!Directory.Exists(path)) return; - var paths = Directory.GetDirectories(path); - - foreach (var profile in paths) - { - if (File.Exists(Path.Combine(profile, "Bookmarks"))) - ParseChromeBookmarks(Path.Combine(profile, "Bookmarks"), name + (Path.GetFileName(profile) == "Default" ? "" : (" (" + Path.GetFileName(profile) + ")"))); - } - } - - private void LoadChromeBookmarks() - { - String platformPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - LoadChromeBookmarks(Path.Combine(platformPath, @"Google\Chrome\User Data"), "Google Chrome"); - LoadChromeBookmarks(Path.Combine(platformPath, @"Google\Chrome SxS\User Data"), "Google Chrome Canary"); - LoadChromeBookmarks(Path.Combine(platformPath, @"Chromium\User Data"), "Chromium"); - } - - private String DecodeUnicode(String dataStr) - { - Regex reg = new Regex(@"(?i)\\[uU]([0-9a-f]{4})"); - return reg.Replace(dataStr, m => ((char)Convert.ToInt32(m.Groups[1].Value, 16)).ToString()); - } - } -} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs new file mode 100644 index 000000000..7be66eea5 --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs @@ -0,0 +1,62 @@ +using Microsoft.AspNetCore.Authentication; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +namespace Flow.Launcher.Plugin.BrowserBookmark +{ + public abstract class ChromiumBookmarkLoader : IBookmarkLoader + { + public abstract List GetBookmarks(); + protected List LoadBookmarks(string browserDataPath, string name) + { + var bookmarks = new List(); + if (!Directory.Exists(browserDataPath)) return bookmarks; + var paths = Directory.GetDirectories(browserDataPath); + + foreach (var profile in paths) + { + var bookmarkPath = Path.Combine(profile, "Bookmarks"); + if (!File.Exists(bookmarkPath)) + continue; + + var source = name + (Path.GetFileName(profile) == "Default" ? "" : $" ({Path.GetFileName(profile)})"); + bookmarks.AddRange(LoadBookmarksFromFile(bookmarkPath, source)); + } + return bookmarks; + } + + protected List LoadBookmarksFromFile(string path, string source) + { + var bookmarks = new List(); + using var jsonDocument = JsonDocument.Parse(File.ReadAllText(path)); + if (!jsonDocument.RootElement.TryGetProperty("roots", out var rootElement)) + return new(); + foreach (var folder in rootElement.EnumerateObject()) + { + EnumerateFolderBookmark(folder.Value, bookmarks, source); + } + return bookmarks; + } + + private void EnumerateFolderBookmark(JsonElement folderElement, List bookmarks, string source) + { + foreach (var subElement in folderElement.GetProperty("children").EnumerateArray()) + { + switch (subElement.GetProperty("type").GetString()) + { + case "folder": + EnumerateFolderBookmark(subElement, bookmarks, source); + break; + default: + bookmarks.Add(new Bookmark( + subElement.GetProperty("name").GetString(), + subElement.GetProperty("url").GetString(), + source)); + break; + } + } + + } + } +} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/Bookmarks.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/Bookmarks.cs index 60c4a0ee6..c7cf4867d 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/Bookmarks.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/Bookmarks.cs @@ -20,9 +20,9 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Commands { var allbookmarks = new List(); - var chromeBookmarks = new ChromeBookmarks(); - var mozBookmarks = new FirefoxBookmarks(); - var edgeBookmarks = new EdgeBookmarks(); + var chromeBookmarks = new ChromeBookmarkLoader(); + var mozBookmarks = new FirefoxBookmarkLoader(); + var edgeBookmarks = new EdgeBookmarkLoader(); //TODO: Let the user select which browser's bookmarks are displayed // Add Firefox bookmarks diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs new file mode 100644 index 000000000..d3f109445 --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs @@ -0,0 +1,30 @@ +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 +{ + public class EdgeBookmarkLoader : ChromiumBookmarkLoader + { + + private readonly List _bookmarks = new(); + + private void LoadEdgeBookmarks() + { + var platformPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + LoadBookmarks(Path.Combine(platformPath, @"Microsoft\Edge\User Data"), "Microsoft Edge"); + LoadBookmarks(Path.Combine(platformPath, @"Microsoft\Edge Dev\User Data"), "Microsoft Edge Dev"); + LoadBookmarks(Path.Combine(platformPath, @"Microsoft\Edge SxS\User Data"), "Microsoft Edge Canary"); + } + + public override List GetBookmarks() + { + _bookmarks.Clear(); + LoadEdgeBookmarks(); + return _bookmarks; + } + } +} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarks.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarks.cs deleted file mode 100644 index 376808549..000000000 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarks.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; - -namespace Flow.Launcher.Plugin.BrowserBookmark -{ - public class EdgeBookmarks - { - private List bookmarks = new List(); - - public List GetBookmarks() - { - bookmarks.Clear(); - LoadEdgeBookmarks(); - - return bookmarks; - } - - private void ParseEdgeBookmarks(string path, string source) - { - if (!File.Exists(path)) return; - - string all = File.ReadAllText(path); - Regex nameRegex = new Regex("\"name\": \"(?.*?)\""); - MatchCollection nameCollection = nameRegex.Matches(all); - Regex typeRegex = new Regex("\"type\": \"(?.*?)\""); - MatchCollection typeCollection = typeRegex.Matches(all); - Regex urlRegex = new Regex("\"url\": \"(?.*?)\""); - MatchCollection urlCollection = urlRegex.Matches(all); - - List names = (from Match match in nameCollection select match.Groups["name"].Value).ToList(); - List types = (from Match match in typeCollection select match.Groups["type"].Value).ToList(); - List urls = (from Match match in urlCollection select match.Groups["url"].Value).ToList(); - - int urlIndex = 0; - for (int i = 0; i < names.Count; i++) - { - string name = DecodeUnicode(names[i]); - string type = types[i]; - if (type == "url") - { - string url = urls[urlIndex]; - urlIndex++; - - if (url == null) continue; - if (url.StartsWith("javascript:", StringComparison.OrdinalIgnoreCase)) continue; - if (url.StartsWith("vbscript:", StringComparison.OrdinalIgnoreCase)) continue; - - bookmarks.Add(new Bookmark() - { - Name = name, - Url = url, - Source = source - }); - } - } - } - - private void LoadEdgeBookmarks(string path, string name) - { - if (!Directory.Exists(path)) return; - var paths = Directory.GetDirectories(path); - - foreach (var profile in paths) - { - if (File.Exists(Path.Combine(profile, "Bookmarks"))) - ParseEdgeBookmarks(Path.Combine(profile, "Bookmarks"), name + (Path.GetFileName(profile) == "Default" ? "" : (" (" + Path.GetFileName(profile) + ")"))); - } - } - - private void LoadEdgeBookmarks() - { - string platformPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - LoadEdgeBookmarks(Path.Combine(platformPath, @"Microsoft\Edge\User Data"), "Microsoft Edge"); - LoadEdgeBookmarks(Path.Combine(platformPath, @"Microsoft\Edge Dev\User Data"), "Microsoft Edge Dev"); - LoadEdgeBookmarks(Path.Combine(platformPath, @"Microsoft\Edge SxS\User Data"), "Microsoft Edge Canary"); - } - - private string DecodeUnicode(string dataStr) - { - Regex reg = new Regex(@"(?i)\\[uU]([0-9a-f]{4})"); - return reg.Replace(dataStr, m => ((char)Convert.ToInt32(m.Groups[1].Value, 16)).ToString()); - } - } -} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarks.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs similarity index 85% rename from Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarks.cs rename to Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs index b718da3cf..5d47c80e3 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarks.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs @@ -6,7 +6,7 @@ using System.Linq; namespace Flow.Launcher.Plugin.BrowserBookmark { - public class FirefoxBookmarks + public class FirefoxBookmarkLoader : IBookmarkLoader { private const string queryAllBookmarks = @"SELECT moz_places.url, moz_bookmarks.title FROM moz_places @@ -27,10 +27,10 @@ namespace Flow.Launcher.Plugin.BrowserBookmark if (string.IsNullOrEmpty(PlacesPath) || !File.Exists(PlacesPath)) return new List(); - var bookmarList = new List(); + var bookmarkList = new List(); // create the connection string and init the connection - string dbPath = string.Format(dbPathFormat, PlacesPath); + string dbPath = string.Format(dbPathFormat, PlacesPath); using (var dbConnection = new SQLiteConnection(dbPath)) { // Open connection to the database file and execute the query @@ -38,14 +38,13 @@ namespace Flow.Launcher.Plugin.BrowserBookmark var reader = new SQLiteCommand(queryAllBookmarks, dbConnection).ExecuteReader(); // return results in List format - bookmarList = reader.Select(x => new Bookmark() - { - Name = (x["title"] is DBNull) ? string.Empty : x["title"].ToString(), - Url = x["url"].ToString() - }).ToList(); + bookmarkList = reader.Select( + x => new Bookmark(x["title"] is DBNull ? string.Empty : x["title"].ToString(), + x["url"].ToString()) + ).ToList(); } - return bookmarList; + return bookmarkList; } /// @@ -63,7 +62,8 @@ namespace Flow.Launcher.Plugin.BrowserBookmark // get firefox default profile directory from profiles.ini string ini; - using (var sReader = new StreamReader(profileIni)) { + using (var sReader = new StreamReader(profileIni)) + { ini = sReader.ReadToEnd(); } @@ -95,7 +95,10 @@ namespace Flow.Launcher.Plugin.BrowserBookmark Version=2 */ - var lines = ini.Split(new string[] { "\r\n" }, StringSplitOptions.None).ToList(); + var lines = ini.Split(new string[] + { + "\r\n" + }, StringSplitOptions.None).ToList(); var defaultProfileFolderNameRaw = lines.Where(x => x.Contains("Default=") && x != "Default=1").FirstOrDefault() ?? string.Empty; @@ -104,14 +107,14 @@ namespace Flow.Launcher.Plugin.BrowserBookmark var defaultProfileFolderName = defaultProfileFolderNameRaw.Split('=').Last(); - var indexOfDefaultProfileAtttributePath = lines.IndexOf("Path="+ defaultProfileFolderName); + var indexOfDefaultProfileAtttributePath = lines.IndexOf("Path=" + defaultProfileFolderName); // Seen in the example above, the IsRelative attribute is always above the Path attribute var relativeAttribute = lines[indexOfDefaultProfileAtttributePath - 1]; return relativeAttribute == "0" // See above, the profile is located in a custom location, path is not relative, so IsRelative=0 - ? defaultProfileFolderName + @"\places.sqlite" - : Path.Combine(profileFolderPath, defaultProfileFolderName) + @"\places.sqlite"; + ? defaultProfileFolderName + @"\places.sqlite" + : Path.Combine(profileFolderPath, defaultProfileFolderName) + @"\places.sqlite"; } } } @@ -126,4 +129,4 @@ namespace Flow.Launcher.Plugin.BrowserBookmark } } } -} +} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/IBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/IBookmarkLoader.cs new file mode 100644 index 000000000..1dbd8b6bf --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/IBookmarkLoader.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace Flow.Launcher.Plugin.BrowserBookmark +{ + public interface IBookmarkLoader + { + public List GetBookmarks(); + } +} \ No newline at end of file From d51579967bad180e9bc3da557674cfe1d40fa0c1 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 22 Sep 2021 18:09:30 -0500 Subject: [PATCH 006/206] Further Refactor & add CustomBrowsers UI --- .../ChromeBookmarkLoader.cs | 3 +- .../ChromiumBookmarkLoader.cs | 5 +- .../{Bookmarks.cs => BookmarkLoader.cs} | 16 ++++--- .../CustomChromiumBookmarkLoader.cs | 14 ++++++ .../EdgeBookmarkLoader.cs | 1 + .../FirefoxBookmarkLoader.cs | 1 + ...low.Launcher.Plugin.BrowserBookmark.csproj | 4 ++ .../IBookmarkLoader.cs | 3 +- .../Main.cs | 6 +-- .../{ => Models}/Bookmark.cs | 11 ++--- .../Models/CustomBrowser.cs | 8 ++++ .../Models/Settings.cs | 20 +++++++- .../Views/CustomBrowserSetting.xaml | 36 +++++++++++++++ .../Views/CustomBrowserSetting.xaml.cs | 45 ++++++++++++++++++ .../Views/SettingsControl.xaml | 46 +++++++++++++++---- .../Views/SettingsControl.xaml.cs | 40 +++++++++++----- 16 files changed, 218 insertions(+), 41 deletions(-) rename Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/{Bookmarks.cs => BookmarkLoader.cs} (71%) create mode 100644 Plugins/Flow.Launcher.Plugin.BrowserBookmark/CustomChromiumBookmarkLoader.cs rename Plugins/Flow.Launcher.Plugin.BrowserBookmark/{ => Models}/Bookmark.cs (73%) create mode 100644 Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs create mode 100644 Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml create mode 100644 Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml.cs diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs index 7fdb86f31..d7cfcaf6a 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromeBookmarkLoader.cs @@ -1,4 +1,5 @@ -using System; +using Flow.Launcher.Plugin.BrowserBookmark.Models; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs index 7be66eea5..a6edf3302 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Authentication; +using Flow.Launcher.Plugin.BrowserBookmark.Models; +using Microsoft.AspNetCore.Authentication; using System.Collections.Generic; using System.IO; using System.Text.Json; @@ -28,6 +29,8 @@ namespace Flow.Launcher.Plugin.BrowserBookmark protected List LoadBookmarksFromFile(string path, string source) { + if (!File.Exists(path)) + return new(); var bookmarks = new List(); using var jsonDocument = JsonDocument.Parse(File.ReadAllText(path)); if (!jsonDocument.RootElement.TryGetProperty("roots", out var rootElement)) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/Bookmarks.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs similarity index 71% rename from Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/Bookmarks.cs rename to Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs index c7cf4867d..b4c6235e0 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/Bookmarks.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Commands/BookmarkLoader.cs @@ -1,11 +1,12 @@ using System.Collections.Generic; using System.Linq; using Flow.Launcher.Infrastructure; +using Flow.Launcher.Plugin.BrowserBookmark.Models; using Flow.Launcher.Plugin.SharedModels; namespace Flow.Launcher.Plugin.BrowserBookmark.Commands { - internal static class Bookmarks + internal static class BookmarkLoader { internal static MatchResult MatchProgram(Bookmark bookmark, string queryString) { @@ -18,23 +19,24 @@ namespace Flow.Launcher.Plugin.BrowserBookmark.Commands internal static List LoadAllBookmarks() { - var allbookmarks = new List(); var chromeBookmarks = new ChromeBookmarkLoader(); var mozBookmarks = new FirefoxBookmarkLoader(); var edgeBookmarks = new EdgeBookmarkLoader(); + var allBookmarks = new List(); + //TODO: Let the user select which browser's bookmarks are displayed // Add Firefox bookmarks - mozBookmarks.GetBookmarks().ForEach(x => allbookmarks.Add(x)); + allBookmarks.AddRange(mozBookmarks.GetBookmarks()); // Add Chrome bookmarks - chromeBookmarks.GetBookmarks().ForEach(x => allbookmarks.Add(x)); + allBookmarks.AddRange(chromeBookmarks.GetBookmarks()); // Add Edge (Chromium) bookmarks - edgeBookmarks.GetBookmarks().ForEach(x => allbookmarks.Add(x)); + allBookmarks.AddRange(edgeBookmarks.GetBookmarks()); - return allbookmarks.Distinct().ToList(); + return allBookmarks.Distinct().ToList(); } } -} +} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/CustomChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/CustomChromiumBookmarkLoader.cs new file mode 100644 index 000000000..91189ace7 --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/CustomChromiumBookmarkLoader.cs @@ -0,0 +1,14 @@ +using Flow.Launcher.Plugin.BrowserBookmark.Models; +using System.Collections.Generic; + +namespace Flow.Launcher.Plugin.BrowserBookmark +{ + public class CustomChromiumBookmarkLoader : ChromiumBookmarkLoader + { + public string BrowserDataPath { get; init; } + public string BookmarkFilePath { get; init; } + public string BrowserName { get; init; } + + public override List GetBookmarks() => BrowserDataPath != null ? LoadBookmarks(BrowserDataPath, BrowserName) : LoadBookmarksFromFile(BookmarkFilePath, BrowserName); + } +} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs index d3f109445..d982ee99e 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/EdgeBookmarkLoader.cs @@ -1,3 +1,4 @@ +using Flow.Launcher.Plugin.BrowserBookmark.Models; using System; using System.Collections.Generic; using System.IO; diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs index 5d47c80e3..3df034781 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs @@ -1,3 +1,4 @@ +using Flow.Launcher.Plugin.BrowserBookmark.Models; using System; using System.Collections.Generic; using System.Data.SQLite; 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 acfc79d7a..46313d38f 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -69,4 +69,8 @@ + + + + \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/IBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/IBookmarkLoader.cs index 1dbd8b6bf..2c48cfd55 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/IBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/IBookmarkLoader.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using Flow.Launcher.Plugin.BrowserBookmark.Models; +using System.Collections.Generic; namespace Flow.Launcher.Plugin.BrowserBookmark { diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs index a0b443e75..eaf14d5c2 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs @@ -26,7 +26,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark _settings = context.API.LoadSettingJsonStorage(); - cachedBookmarks = Bookmarks.LoadAllBookmarks(); + cachedBookmarks = BookmarkLoader.LoadAllBookmarks(); } public List Query(Query query) @@ -45,7 +45,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark Title = c.Name, SubTitle = c.Url, IcoPath = @"Images\bookmark.png", - Score = Bookmarks.MatchProgram(c, param).Score, + Score = BookmarkLoader.MatchProgram(c, param).Score, Action = _ => { if (_settings.OpenInNewBrowserWindow) @@ -93,7 +93,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark { cachedBookmarks.Clear(); - cachedBookmarks = Bookmarks.LoadAllBookmarks(); + cachedBookmarks = BookmarkLoader.LoadAllBookmarks(); } public string GetTranslatedPluginTitle() diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Bookmark.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Bookmark.cs similarity index 73% rename from Plugins/Flow.Launcher.Plugin.BrowserBookmark/Bookmark.cs rename to Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Bookmark.cs index 185cf1620..c2fa9d977 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Bookmark.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Bookmark.cs @@ -1,11 +1,6 @@ -using BinaryAnalysis.UnidecodeSharp; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Collections.Generic; - -namespace Flow.Launcher.Plugin.BrowserBookmark +namespace Flow.Launcher.Plugin.BrowserBookmark.Models { // Source may be important in the future public record Bookmark(string Name, string Url, string Source = "") @@ -21,5 +16,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark { return other != null && Name == other.Name && Url == other.Url; } + + public List CustomBrowsers { get; set; }= new(); } } \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs new file mode 100644 index 000000000..1ddeab5df --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs @@ -0,0 +1,8 @@ +namespace Flow.Launcher.Plugin.BrowserBookmark.Models +{ + public class CustomBrowser : BaseModel + { + public string Name { get; set; } + public string Path { get; set; } + } +} \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs index dc444fd73..e63b90dbc 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Settings.cs @@ -1,9 +1,27 @@ -namespace Flow.Launcher.Plugin.BrowserBookmark.Models +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Text.Json.Serialization; + +namespace Flow.Launcher.Plugin.BrowserBookmark.Models { public class Settings : BaseModel { public bool OpenInNewBrowserWindow { get; set; } = true; public string BrowserPath { get; set; } + + public ObservableCollection CustomBrowsers { get; set; } = new() + { + new CustomBrowser + { + Name="awefawef", + Path="awefawef" + }, + new CustomBrowser + { + Name = "awefawefawefawef", + Path = "aweawefawfawef" + } + }; } } \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml new file mode 100644 index 000000000..2370789f1 --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + Date: Sat, 9 Oct 2021 20:58:22 +0900 Subject: [PATCH 025/206] - Remove Expander Button's Circle and adjust arrow size --- Flow.Launcher/App.xaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Flow.Launcher/App.xaml b/Flow.Launcher/App.xaml index 1311de968..13d88e1c6 100644 --- a/Flow.Launcher/App.xaml +++ b/Flow.Launcher/App.xaml @@ -71,8 +71,8 @@ - - + + @@ -82,11 +82,11 @@ - + - + @@ -160,8 +160,8 @@ - - + + @@ -170,11 +170,11 @@ - + - + From 762df7fdd380926eaced688b2d2bfef713602f85 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sat, 9 Oct 2021 22:22:47 +0900 Subject: [PATCH 026/206] - Remove colon Action keyword String - Fix layout for init/query time/version/plugin store - change action keyword to button - add listbox bottom margin - add margin when select list item for easy to distinguish. --- Flow.Launcher/Languages/en.xaml | 2 +- Flow.Launcher/SettingWindow.xaml | 80 +++++++++++++++++------------ Flow.Launcher/SettingWindow.xaml.cs | 14 +++-- 3 files changed, 58 insertions(+), 38 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 60605df30..79b8ce669 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -46,7 +46,7 @@ Find more plugins On Off - Action keyword: + Action keyword Current action keyword: New action keyword: Current Priority: diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 02de47fe7..47df70561 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -229,7 +229,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -257,13 +257,6 @@ - @@ -542,7 +535,7 @@ Margin="0, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{StaticResource PluginList}" ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False" - Padding="0" Width="Auto" HorizontalAlignment="Stretch"> + Padding="0 0 0 18" Width="Auto" HorizontalAlignment="Stretch"> @@ -618,22 +611,36 @@ - - - + + + - + + + + @@ -652,29 +659,36 @@ - + Padding="0 12 0 0" > - - + + + - + - + - - + HorizontalAlignment="Right" FontSize="12" VerticalAlignment="Center"/> + + diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 08d0eb88a..9b5c34c44 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -193,14 +193,13 @@ namespace Flow.Launcher } - private void OnPluginActionKeywordsClick(object sender, MouseButtonEventArgs e) + private void OnPluginActionKeywordsClick(object sender, RoutedEventArgs e) { - if (e.ChangedButton == MouseButton.Left) - { + var id = viewModel.SelectedPlugin.PluginPair.Metadata.ID; ActionKeywords changeKeywordsWindow = new ActionKeywords(id, settings, viewModel.SelectedPlugin); changeKeywordsWindow.ShowDialog(); - } + } private void OnPluginNameClick(object sender, MouseButtonEventArgs e) @@ -266,6 +265,13 @@ namespace Flow.Launcher FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), Constant.Themes)); } + /* + private void OnPluginActionKeywordsClick(object sender, RoutedEventArgs e) + { + + } + */ + /*private void OnPluginPriorityClick(object sender, RoutedEventArgs e) { From 4a4f0bbefbd24a0e2209b742934c4736dd573dcf Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sat, 9 Oct 2021 22:27:09 +0900 Subject: [PATCH 027/206] - Add plugin page title - Adjust listbox Margin for fit other setting page list. --- Flow.Launcher/SettingWindow.xaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 47df70561..38c739fb2 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -527,12 +527,20 @@ - - - + + + + + + + + + + + From 0d11b79ee31d21aacb6717e5b6a160e90ee5063d Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 00:02:41 +0900 Subject: [PATCH 028/206] - Adjust Shell, Calc, WebSearch Setting Margin --- .../Views/CalculatorSettings.xaml | 2 +- Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml | 2 +- Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml b/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml index 1330247b2..374bccf62 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml @@ -15,7 +15,7 @@ - + diff --git a/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml b/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml index 4cd4d8fa3..d9b1942f1 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml @@ -6,7 +6,7 @@ mc:Ignorable="d" Loaded="CMDSetting_OnLoaded" d:DesignHeight="300" d:DesignWidth="300"> - + diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml index c2f64bc7e..cb0b50069 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml @@ -32,7 +32,7 @@ - + From 2dc8bb386e41dbfb1b7d41c7f28726084cebc8e1 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 00:33:11 +0900 Subject: [PATCH 029/206] - Add Automatically Hide Plugin Info Border by SettingControl Height --- Flow.Launcher/SettingWindow.xaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 38c739fb2..769da568a 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -655,13 +655,23 @@ - - + + + From 2af186736a12f0d691c89475ec2e0a065cf3d431 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sat, 9 Oct 2021 11:34:41 -0500 Subject: [PATCH 030/206] Rename with async suffix and add lock to prevent concurrent update check --- Flow.Launcher.Core/Updater.cs | 37 +++++++++++-------- Flow.Launcher/App.xaml.cs | 4 +- .../ViewModel/SettingWindowViewModel.cs | 2 +- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/Flow.Launcher.Core/Updater.cs b/Flow.Launcher.Core/Updater.cs index 76713ce2a..e09c6380c 100644 --- a/Flow.Launcher.Core/Updater.cs +++ b/Flow.Launcher.Core/Updater.cs @@ -16,6 +16,7 @@ using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; using System.Text.Json.Serialization; +using System.Threading; namespace Flow.Launcher.Core { @@ -28,21 +29,21 @@ namespace Flow.Launcher.Core GitHubRepository = gitHubRepository; } - public async Task UpdateApp(IPublicAPI api, bool silentUpdate = true) + private SemaphoreSlim UpdateLock { get; } = new SemaphoreSlim(1); + + public async Task UpdateAppAsync(IPublicAPI api, bool silentUpdate = true) { + await UpdateLock.WaitAsync(); try { - UpdateInfo newUpdateInfo; - if (!silentUpdate) api.ShowMsg(api.GetTranslation("pleaseWait"), - api.GetTranslation("update_flowlauncher_update_check")); + api.GetTranslation("update_flowlauncher_update_check")); using var updateManager = await GitHubUpdateManager(GitHubRepository).ConfigureAwait(false); - // UpdateApp CheckForUpdate will return value only if the app is squirrel installed - newUpdateInfo = await updateManager.CheckForUpdate().NonNull().ConfigureAwait(false); + var newUpdateInfo = await updateManager.CheckForUpdate().NonNull().ConfigureAwait(false); var newReleaseVersion = Version.Parse(newUpdateInfo.FutureReleaseEntry.Version.ToString()); var currentVersion = Version.Parse(Constant.Version); @@ -58,7 +59,7 @@ namespace Flow.Launcher.Core if (!silentUpdate) api.ShowMsg(api.GetTranslation("update_flowlauncher_update_found"), - api.GetTranslation("update_flowlauncher_updating")); + api.GetTranslation("update_flowlauncher_updating")); await updateManager.DownloadReleases(newUpdateInfo.ReleasesToApply).ConfigureAwait(false); @@ -70,8 +71,8 @@ namespace Flow.Launcher.Core FilesFolders.CopyAll(DataLocation.PortableDataPath, targetDestination); if (!FilesFolders.VerifyBothFolderFilesEqual(DataLocation.PortableDataPath, targetDestination)) MessageBox.Show(string.Format(api.GetTranslation("update_flowlauncher_fail_moving_portable_user_profile_data"), - DataLocation.PortableDataPath, - targetDestination)); + DataLocation.PortableDataPath, + targetDestination)); } else { @@ -87,12 +88,15 @@ namespace Flow.Launcher.Core UpdateManager.RestartApp(Constant.ApplicationFileName); } } - catch (Exception e) when (e is HttpRequestException || e is WebException || e is SocketException || e.InnerException is TimeoutException) + catch (Exception e) when (e is HttpRequestException or WebException or SocketException || e.InnerException is TimeoutException) { Log.Exception($"|Updater.UpdateApp|Check your connection and proxy settings to github-cloud.s3.amazonaws.com.", e); api.ShowMsg(api.GetTranslation("update_flowlauncher_fail"), - api.GetTranslation("update_flowlauncher_check_connection")); - return; + api.GetTranslation("update_flowlauncher_check_connection")); + } + finally + { + UpdateLock.Release(); } } @@ -115,13 +119,16 @@ namespace Flow.Launcher.Core var uri = new Uri(repository); var api = $"https://api.github.com/repos{uri.AbsolutePath}/releases"; - var jsonStream = await Http.GetStreamAsync(api).ConfigureAwait(false); + await using var jsonStream = await Http.GetStreamAsync(api).ConfigureAwait(false); var releases = await System.Text.Json.JsonSerializer.DeserializeAsync>(jsonStream).ConfigureAwait(false); var latest = releases.Where(r => !r.Prerelease).OrderByDescending(r => r.PublishedAt).First(); var latestUrl = latest.HtmlUrl.Replace("/tag/", "/download/"); - - var client = new WebClient { Proxy = Http.WebProxy }; + + var client = new WebClient + { + Proxy = Http.WebProxy + }; var downloader = new FileDownloader(client); var manager = new UpdateManager(latestUrl, urlDownloader: downloader); diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index c2a32100d..8c869e941 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -129,12 +129,12 @@ namespace Flow.Launcher var timer = new Timer(1000 * 60 * 60 * 5); timer.Elapsed += async (s, e) => { - await _updater.UpdateApp(API); + await _updater.UpdateAppAsync(API); }; timer.Start(); // check updates on startup - await _updater.UpdateApp(API); + await _updater.UpdateAppAsync(API); } }); } diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index d3a4f9a83..e85d01b1b 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -46,7 +46,7 @@ namespace Flow.Launcher.ViewModel public async void UpdateApp() { - await _updater.UpdateApp(App.API, false); + await _updater.UpdateAppAsync(App.API, false); } public bool AutoUpdates From 234816df4ba28485565ebb3d1c47fe743c355b97 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 00:33:11 +0900 Subject: [PATCH 031/206] - Add Automatically Hide Plugin Info Border by SettingControl Height --- Flow.Launcher/SettingWindow.xaml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 38c739fb2..07882445c 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -636,7 +636,7 @@ ToolTip="Change Action Keywords" Margin="5 0 0 0" Cursor="Hand" FontWeight="Bold" Click="OnPluginActionKeywordsClick" HorizontalAlignment="Right" - Width="100" Height="32"> + Width="100" Height="40"> + + + + + From 2d98dcbfd8faa19706382febef4fda096a57c81c Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 06:19:15 +0900 Subject: [PATCH 032/206] - Add Author name in plugin list --- Flow.Launcher/Languages/en.xaml | 2 +- Flow.Launcher/SettingWindow.xaml | 226 +++++++++++++++++++++++++++++++ 2 files changed, 227 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 79b8ce669..9d9e69785 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -53,7 +53,7 @@ New Priority: Priority Plugin Directory - Author + Author: Init time: Query time: diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index b0f596372..c875d652c 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -806,6 +806,232 @@ --> + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 579f8c8b9eed6324b9924f6f35d1d9956e322658 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 06:19:15 +0900 Subject: [PATCH 033/206] - Add Author name in plugin list --- Flow.Launcher/Languages/en.xaml | 2 +- Flow.Launcher/SettingWindow.xaml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 79b8ce669..9d9e69785 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -53,7 +53,7 @@ New Priority: Priority Plugin Directory - Author + Author: Init time: Query time: diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index b0f596372..7b45c7448 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -690,9 +690,16 @@ Padding="0 12 0 0" > - + + + + + From 8174d54de659ec4f1fb850c195114fbee1cdfba2 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sat, 9 Oct 2021 17:58:40 -0500 Subject: [PATCH 034/206] Fix PriorityClick Logic Use sender to find actual pluginviewmodel instead of use selected --- Flow.Launcher/SettingWindow.xaml.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 9b5c34c44..4d36ec5da 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -13,6 +13,7 @@ using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedCommands; using Flow.Launcher.ViewModel; using Flow.Launcher.Helper; +using System.Windows.Controls; namespace Flow.Launcher { @@ -186,20 +187,18 @@ namespace Flow.Launcher private void OnPluginPriorityClick(object sender, RoutedEventArgs e) { - - - PriorityChangeWindow priorityChangeWindow = new PriorityChangeWindow(viewModel.SelectedPlugin.PluginPair.Metadata.ID, settings, viewModel.SelectedPlugin); + if (sender is Control { DataContext: PluginViewModel pluginViewModel }) + { + PriorityChangeWindow priorityChangeWindow = new PriorityChangeWindow(pluginViewModel.PluginPair.Metadata.ID, settings, pluginViewModel); priorityChangeWindow.ShowDialog(); - + } } private void OnPluginActionKeywordsClick(object sender, RoutedEventArgs e) { - - var id = viewModel.SelectedPlugin.PluginPair.Metadata.ID; - ActionKeywords changeKeywordsWindow = new ActionKeywords(id, settings, viewModel.SelectedPlugin); - changeKeywordsWindow.ShowDialog(); - + var id = viewModel.SelectedPlugin.PluginPair.Metadata.ID; + ActionKeywords changeKeywordsWindow = new ActionKeywords(id, settings, viewModel.SelectedPlugin); + changeKeywordsWindow.ShowDialog(); } private void OnPluginNameClick(object sender, MouseButtonEventArgs e) From 1e479edead18c1290327a908c49c34d5c326d852 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 12:39:58 +0900 Subject: [PATCH 035/206] - Add plugin store tab (WIP) --- Flow.Launcher/SettingWindow.xaml | 87 +++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index bedad7f91..f58b17963 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -229,7 +229,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -257,6 +257,14 @@ + + @@ -741,6 +749,81 @@ + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From a3a436c58bf0d41629ad20992542d8a4b81c8a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Kubala?= <37414585+kubalav@users.noreply.github.com> Date: Sun, 10 Oct 2021 09:27:10 +0200 Subject: [PATCH 036/206] Update Slovak translation --- Flow.Launcher/Languages/sk.xaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index 5e63020a8..b766ccfa2 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -82,6 +82,8 @@ Ste si istý, že chcete odstrániť klávesovú skratku {0} pre plugin? Tieňový efekt v poli vyhľadávania Tieňový efekt významne využíva GPU. Neodporúča sa, ak je výkon počítača obmedzený. + Použiť ikony Segoe Fluent + Použiť ikony Segoe Fluent, ak sú podporované HTTP Proxy @@ -178,4 +180,4 @@ Aktualizovať súbory Aktualizovať popis - \ No newline at end of file + From 876d477f25cde4ee00c10ce56efd87e0aaa12df2 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 10 Oct 2021 22:21:32 +0900 Subject: [PATCH 037/206] - Add install button with hover --- Flow.Launcher/SettingWindow.xaml | 154 +++++++++++++++++++++++++++---- 1 file changed, 134 insertions(+), 20 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index f58b17963..cb2146c53 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -260,10 +260,70 @@ @@ -785,34 +845,88 @@ Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch"> - + - - - - - - + + + + + + + - + + + - - + + + + - + - - + - + + + + + + + + + + + + + + + + + + From 4164b46f728cd413224f2811bf61996e88e14d29 Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Mon, 11 Oct 2021 02:22:39 +0900 Subject: [PATCH 038/206] Add author and version in hover menu. --- Flow.Launcher/SettingWindow.xaml | 37 ++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index cb2146c53..260ab4280 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -852,7 +852,7 @@ - + @@ -905,21 +905,30 @@ - + - + - From ccb565e70a39541d1032bef97d3e6fe235bab72e Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Mon, 11 Oct 2021 04:54:04 +0900 Subject: [PATCH 039/206] Responsive Width in Plugin Store List (WIP --- Flow.Launcher/SettingWindow.xaml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 260ab4280..c02c487a6 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -263,7 +263,9 @@ - + + + @@ -837,7 +839,7 @@ - - + + + + - + @@ -887,12 +892,12 @@ - + - - + + - - - - + + + + - - + + + - - - - + From 1317077dd8ab1102c97d93ad0477c255e4aa112b Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 17 Oct 2021 10:57:50 +0900 Subject: [PATCH 069/206] - Change the popup to windows notification --- Flow.Launcher/Msg.xaml.cs | 66 ++++++++++++--------------------------- 1 file changed, 20 insertions(+), 46 deletions(-) diff --git a/Flow.Launcher/Msg.xaml.cs b/Flow.Launcher/Msg.xaml.cs index 6bb2fc2dc..c6b26ccd5 100644 --- a/Flow.Launcher/Msg.xaml.cs +++ b/Flow.Launcher/Msg.xaml.cs @@ -5,59 +5,30 @@ using System.Windows.Forms; using System.Windows.Input; using System.Windows.Media.Animation; using System.Windows.Media.Imaging; +using System.Windows.Media; using Flow.Launcher.Helper; using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Image; +using Windows.UI; +using Windows.Data; +using Windows.Data.Xml.Dom; +using Windows.UI.Notifications; namespace Flow.Launcher { public partial class Msg : Window { - Storyboard fadeOutStoryboard = new Storyboard(); - private bool closing; public Msg() { InitializeComponent(); - var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position); - var dipWorkingArea = WindowsInteropHelper.TransformPixelsToDIP(this, - screen.WorkingArea.Width, - screen.WorkingArea.Height); - Left = dipWorkingArea.X - Width; - Top = dipWorkingArea.Y; - showAnimation.From = dipWorkingArea.Y; - showAnimation.To = dipWorkingArea.Y - Height; - // Create the fade out storyboard - fadeOutStoryboard.Completed += fadeOutStoryboard_Completed; - DoubleAnimation fadeOutAnimation = new DoubleAnimation(dipWorkingArea.Y - Height, dipWorkingArea.Y, new Duration(TimeSpan.FromSeconds(5))) - { - AccelerationRatio = 0.2 - }; - Storyboard.SetTarget(fadeOutAnimation, this); - Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(TopProperty)); - fadeOutStoryboard.Children.Add(fadeOutAnimation); - - imgClose.Source = ImageLoader.Load(Path.Combine(Infrastructure.Constant.ProgramDirectory, "Images\\close.png")); - imgClose.MouseUp += imgClose_MouseUp; - } - - void imgClose_MouseUp(object sender, MouseButtonEventArgs e) - { - if (!closing) - { - closing = true; - fadeOutStoryboard.Begin(); - } - } - - private void fadeOutStoryboard_Completed(object sender, EventArgs e) - { - Close(); } public void Show(string title, string subTitle, string iconPath) { + + tbTitle.Text = title; tbSubTitle.Text = subTitle; if (string.IsNullOrEmpty(subTitle)) @@ -68,20 +39,23 @@ namespace Flow.Launcher { imgIco.Source = ImageLoader.Load(Path.Combine(Constant.ProgramDirectory, "Images\\app.png")); } - else { + else + { imgIco.Source = ImageLoader.Load(iconPath); } - Show(); + /* Using Windows Notification System */ + var ToastTitle = title; + var ToastsubTitle = subTitle; + var Icon = imgIco.Source; + var xml = $"\"meziantou\"/{ToastTitle}" + + $"{ToastsubTitle}"; + var toastXml = new XmlDocument(); + toastXml.LoadXml(xml); + var toast = new ToastNotification(toastXml); + ToastNotificationManager.CreateToastNotifier("Flow Launcher").Show(toast); - Dispatcher.InvokeAsync(async () => - { - if (!closing) - { - closing = true; - await Dispatcher.InvokeAsync(fadeOutStoryboard.Begin); - } - }); } + } } From 52b357952527ed9c1836b91ac2ac9cd53b229042 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sat, 16 Oct 2021 21:28:55 -0500 Subject: [PATCH 070/206] Implement Install & Refresh Button - Add ShowMainWindow API for IPublicAPI --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 5 +++ Flow.Launcher/PublicAPIInstance.cs | 2 + Flow.Launcher/SettingWindow.xaml | 40 ++++++++++--------- Flow.Launcher/SettingWindow.xaml.cs | 17 ++++++++ .../ViewModel/SettingWindowViewModel.cs | 7 ++++ 5 files changed, 53 insertions(+), 18 deletions(-) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index d9cdf5581..974eafa96 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -59,6 +59,11 @@ namespace Flow.Launcher.Plugin /// Optional message subtitle void ShowMsgError(string title, string subTitle = ""); + /// + /// Show the MainWindow when hiding + /// + void ShowMainWindow(); + /// /// Show message box /// diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 6f995671d..70d54619d 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -68,6 +68,8 @@ namespace Flow.Launcher public void RestarApp() => RestartApp(); + public void ShowMainWindow() => _mainVM.MainWindowVisibility = Visibility.Visible; + public void CheckForNewUpdate() => _settingsVM.UpdateApp(); public void SaveAppAllSettings() diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8a5feb866..8aaef7054 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -37,7 +37,7 @@ - + - @@ -998,7 +999,10 @@ - @@ -1079,7 +1083,7 @@ + Visibility="Visible" /> @@ -1112,7 +1116,7 @@ - + diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 4d36ec5da..4b58b9c6a 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -14,6 +14,7 @@ using Flow.Launcher.Plugin.SharedCommands; using Flow.Launcher.ViewModel; using Flow.Launcher.Helper; using System.Windows.Controls; +using Flow.Launcher.Core.ExternalPlugins; namespace Flow.Launcher { @@ -264,6 +265,22 @@ namespace Flow.Launcher FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), Constant.Themes)); } + private void OnPluginStoreRefreshClick(object sender, RoutedEventArgs e) + { + _ = viewModel.RefreshExternalPluginsAsync(); + } + + private void OnExternalPluginInstallClick(object sender, RoutedEventArgs e) + { + if(sender is Button { DataContext: UserPlugin plugin }) + { + var pluginsManagerPlugin = PluginManager.GetPluginForId("9f8f9b14-2518-4907-b211-35ab6290dee7"); + var actionKeywrod = pluginsManagerPlugin.Metadata.ActionKeywords.Count == 0 ? "" : pluginsManagerPlugin.Metadata.ActionKeywords[0]; + API.ChangeQuery($"{actionKeywrod} install {plugin.Name}"); + API.ShowMainWindow(); + } + } + /* private void OnPluginActionKeywordsClick(object sender, RoutedEventArgs e) { diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 7f16da8ae..6bbf22c41 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; +using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Media; @@ -265,6 +266,12 @@ namespace Flow.Launcher.ViewModel } } + public async Task RefreshExternalPluginsAsync() + { + await PluginsManifest.UpdateManifestAsync(); + OnPropertyChanged(nameof(ExternalPlugins)); + } + #endregion From da12a0616f461567bce4429a986ac3b10753669e Mon Sep 17 00:00:00 2001 From: Dobin Park Date: Sun, 17 Oct 2021 11:44:25 +0900 Subject: [PATCH 071/206] Add style for toggle button --- Flow.Launcher/SettingWindow.xaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8aaef7054..e6612e4dc 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -37,7 +37,6 @@ - + + diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index e85d01b1b..cbb99962b 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -304,6 +304,12 @@ namespace Flow.Launcher.ViewModel } } + public double WindowWidthSize + { + get { return Settings.WindowSize; } + set { Settings.WindowSize = value; } + } + public bool UseGlyphIcons { get { return Settings.UseGlyphIcons; } From a452feb4c678ab1d8e8f9bce3919e91ef08edc22 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 21 Oct 2021 10:17:37 +0900 Subject: [PATCH 079/206] change plugin/plugin store scrollbar to autohidescrollbar. --- Flow.Launcher/SettingWindow.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index e6612e4dc..c8b454ebf 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -651,7 +651,7 @@ Margin="5, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{StaticResource PluginList}" ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False" - Padding="0 0 7 0" Width="Auto" HorizontalAlignment="Stretch" SnapsToDevicePixels="True"> + Padding="0 0 7 0" Width="Auto" HorizontalAlignment="Stretch" SnapsToDevicePixels="True" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"> @@ -905,7 +905,7 @@ Margin="6, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{StaticResource StoreList}" SelectionMode="Single" ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False" - Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch"> + Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"> From d106f065012c740a2b36810718117ec0bb1dc8c0 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 21 Oct 2021 13:36:45 +0900 Subject: [PATCH 080/206] - Add a string where there's no string in setting window. - Add some subtext in setting. (English needs to be corrected.) - Add Korean translation - Add Main window close string --- Flow.Launcher/Languages/en.xaml | 19 ++++++++-- Flow.Launcher/Languages/ko.xaml | 62 +++++++++++++++++++++++++++++--- Flow.Launcher/MainWindow.xaml | 2 +- Flow.Launcher/SettingWindow.xaml | 37 +++++++++++++------ 4 files changed, 102 insertions(+), 18 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 4d24a7c33..9f2366f3e 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -13,30 +13,35 @@ Settings About Exit + Close Flow Launcher Settings General Portable Mode + All setting into single folder. You can use with USB drive or cloud. Start Flow Launcher on system startup Hide Flow Launcher when focus is lost Do not show new version notifications Remember last launch location Language Last Query Style + When you open Query box, decide what to do. Preserve Last Query Select last Query Empty last Query Maximum results shown Ignore hotkeys in fullscreen mode + If you're a gamer, We recommend turning it on. Python Directory Auto Update - Auto Hide Scroll Bar - Automatically hides the Settings window scroll bar and show when hover the mouse over it + Auto Hide Scroll Bar in Setting + If you feel the scroll bar in the setting window is small, We recommend turning it off. Select Hide Flow Launcher on startup Hide tray icon Query Search Precision + Search results become more accurate. Should Use Pinyin Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese Shadow effect is not allowed while current theme has blur effect enabled @@ -57,6 +62,11 @@ Init time: Query time: + + + Plugin Store + Refresh + Theme Browse for more themes @@ -67,12 +77,17 @@ Opacity Theme {0} not exists, fallback to default theme Fail to load theme {0}, fallback to default theme + Theme Folder + Open Theme Folder Hotkey Flow Launcher Hotkey + Enter the shortcut that open the Flow Launcher. Open Result Modifiers + Shortcuts to select the result list. Show Hotkey + Display Shortcut in Result list . Custom Query Hotkey Query Delete diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml index 6c755dbae..a9fdede73 100644 --- a/Flow.Launcher/Languages/ko.xaml +++ b/Flow.Launcher/Languages/ko.xaml @@ -13,55 +13,87 @@ 설정 정보 종료 + 닫기 Flow Launcher 설정 일반 + 포터블 모드 + 모든 설정이 폴더안에 들어갑니다. USB 드라이브나 클라우드로 사용 가능합니다. 시스템 시작 시 Flow Launcher 실행 포커스 잃으면 Flow Launcher 숨김 새 버전 알림 끄기 마지막 실행 위치 기억 언어 마지막 쿼리 스타일 + 쿼리박스를 열었을 때 쿼리 처리 방식 직전 쿼리에 계속 입력 직전 쿼리 내용 선택 직전 쿼리 지우기 표시할 결과 수 전체화면 모드에서는 핫키 무시 + 게이머라면 켜는 것을 추천합니다. Python 디렉토리 자동 업데이트 + 설정 창 스크롤바 숨기기 + 설정 창 스크롤바가 작다면 끄는 것을 추천합니다. 선택 시작 시 Flow Launcher 숨김 + 트레이 아이콘 숨기기 + 쿼리 검색 정확도 + 검색 결과가 좀 더 정확해집니다. + 항상 Pinyin 사용 + Pinyin을 사용하여 검색할 수 있습니다. Pinyin(병음)은 로마자 중국어 입력 방식입니다. + 반투명 흐림 효과를 사용하는 경우, 그림자 효과를 쓸 수 없습니다. 플러그인 플러그인 더 찾아보기 - 비활성화 + On + Off 액션 키워드 플러그인 디렉토리 저자 초기화 시간: 쿼리 시간: + + + 플러그인 스토어 + 새로고침 + 테마 테마 더 찾아보기 + Hi There 쿼리 상자 글꼴 결과 항목 글꼴 윈도우 모드 투명도 + {0} 테마가 존재하지 않습니다. 기본 테마로 변경합니다. + {0} 테마 로드에 실패했습니다. 기본 테마로 변경합니다. + 테마 폴더 + 테마 폴더 열기 핫키 Flow Launcher 핫키 - 결과 수정 자 열기 - 사용자지정 쿼리 핫키 + Flow Launcher를 열 때 사용할 단축키를 입력합니다. + 결과 선택 단축키 + 결과 목록을 선택하는 단축키입니다. 단축키 표시 + 결과창에서 결과 선택 단축키를 표시합니다. + 사용자지정 쿼리 핫키 + Query 삭제 편집 추가 항목을 선택하세요. {0} 플러그인 핫키를 삭제하시겠습니까? + 그림자 효과 + 그림자 효과는 GPU를 사용합니다. 컴퓨터 퍼포먼스가 제한적인 경우 사용을 추천하지 않습니다. + 플루언트 아이콘 사용 + 결과 및 일부 메뉴에서 플루언트 아이콘을 사용합니다. HTTP 프록시 @@ -86,8 +118,17 @@ Flow Launcher를 {0}번 실행했습니다. 업데이트 확인 새 버전({0})이 있습니다. Flow Launcher를 재시작하세요. + 업데이트 확인을 실패했습니다. api.github.com로의 연결 또는 프록시 설정을 확인해주세요. + + 업데이트 다운로드에 실패했습니다. github-cloud.s3.amazonaws.com의 연결 또는 프록시 설정을 확인해주세요. + 수동 다운로드를 하려면 https://github.com/Flow-Launcher/Flow.Launcher/releases 으로 방문하세요. + 릴리즈 노트: + 사용 팁: + + 높은 수를 넣을수록 상위 결과에 표시됩니다. 5를 시도해보세요. 다른 플러그인 보다 결과를 낮추고 싶다면, 그보다 낮은 수를 입력하세요. + 중요도에 올바른 정수를 입력하세요. 예전 액션 키워드 새 액션 키워드 @@ -97,9 +138,11 @@ 새 액션 키워드를 입력하세요. 새 액션 키워드가 할당된 플러그인이 이미 있습니다. 다른 액션 키워드를 입력하세요. 성공 + 성공적으로 완료했습니다. 액션 키워드를 지정하지 않으려면 *를 사용하세요. + 커스텀 플러그인 핫키 미리보기 핫키를 사용할 수 없습니다. 다른 핫키를 입력하세요. 플러그인 핫키가 유효하지 않습니다. @@ -123,12 +166,23 @@ 보고서를 정상적으로 보냈습니다. 보고서를 보내지 못했습니다. Flow Launcher에 문제가 발생했습니다. - + + + 잠시 기다려주세요... + 새 업데이트 확인 중 새 Flow Launcher 버전({0})을 사용할 수 있습니다. + 이미 가장 최신 버전의 Flow Launcher를 사용중입니다. + 업데이트 발견 + 업데이트 중... + Flow Launcher가 유저 정보 데이터를 새버전으로 옮길 수 없습니다. + 프로필 데이터 폴더를 수동으로 {0} 에서 {1}로 옮겨주세요. + 새 업데이트 소프트웨어 업데이트를 설치하는 중에 오류가 발생했습니다. 업데이트 취소 + 업데이트 실패 + Check your connection and try updating proxy settings to github-cloud.s3.amazonaws.com. 업데이트를 위해 Flow Launcher를 재시작합니다. 아래 파일들이 업데이트됩니다. 업데이트 파일 diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 73b13be8c..b517faf19 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -92,7 +92,7 @@ - + diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index c8b454ebf..95ff0a7ba 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -478,6 +478,8 @@ + @@ -526,6 +528,8 @@ + @@ -540,8 +544,12 @@ - + + + - + + +  - + @@ -885,10 +897,10 @@ - + - @@ -1339,7 +1350,7 @@ - + - + + @@ -1376,7 +1391,7 @@ - Date: Thu, 21 Oct 2021 13:36:45 +0900 Subject: [PATCH 081/206] - Add a string where there's no string in setting window. - Add some subtext in setting. (English needs to be corrected.) - Add Korean translation - Add Main window close string --- Flow.Launcher/Languages/en.xaml | 20 +++++++++- Flow.Launcher/Languages/ko.xaml | 63 ++++++++++++++++++++++++++++++-- Flow.Launcher/MainWindow.xaml | 2 +- Flow.Launcher/SettingWindow.xaml | 39 ++++++++++++++------ 4 files changed, 105 insertions(+), 19 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 4d24a7c33..ce451841c 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -13,30 +13,35 @@ Settings About Exit + Close Flow Launcher Settings General Portable Mode + All setting into single folder. You can use with USB drive or cloud. Start Flow Launcher on system startup Hide Flow Launcher when focus is lost Do not show new version notifications Remember last launch location Language Last Query Style + When you open Query box, decide what to do. Preserve Last Query Select last Query Empty last Query Maximum results shown Ignore hotkeys in fullscreen mode + If you're a gamer, We recommend turning it on. Python Directory Auto Update - Auto Hide Scroll Bar - Automatically hides the Settings window scroll bar and show when hover the mouse over it + Auto Hide Scroll Bar in Setting + If you feel the scroll bar in the setting window is small, We recommend turning it off. Select Hide Flow Launcher on startup Hide tray icon Query Search Precision + Search results become more accurate. Should Use Pinyin Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese Shadow effect is not allowed while current theme has blur effect enabled @@ -57,6 +62,12 @@ Init time: Query time: + + + Plugin Store + Refresh + Install + Theme Browse for more themes @@ -67,12 +78,17 @@ Opacity Theme {0} not exists, fallback to default theme Fail to load theme {0}, fallback to default theme + Theme Folder + Open Theme Folder Hotkey Flow Launcher Hotkey + Enter the shortcut that open the Flow Launcher. Open Result Modifiers + Shortcuts to select the result list. Show Hotkey + Display Shortcut in Result list . Custom Query Hotkey Query Delete diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml index 6c755dbae..6f2881668 100644 --- a/Flow.Launcher/Languages/ko.xaml +++ b/Flow.Launcher/Languages/ko.xaml @@ -13,55 +13,88 @@ 설정 정보 종료 + 닫기 Flow Launcher 설정 일반 + 포터블 모드 + 모든 설정이 폴더안에 들어갑니다. USB 드라이브나 클라우드로 사용 가능합니다. 시스템 시작 시 Flow Launcher 실행 포커스 잃으면 Flow Launcher 숨김 새 버전 알림 끄기 마지막 실행 위치 기억 언어 마지막 쿼리 스타일 + 쿼리박스를 열었을 때 쿼리 처리 방식 직전 쿼리에 계속 입력 직전 쿼리 내용 선택 직전 쿼리 지우기 표시할 결과 수 전체화면 모드에서는 핫키 무시 + 게이머라면 켜는 것을 추천합니다. Python 디렉토리 자동 업데이트 + 설정 창 스크롤바 숨기기 + 설정 창 스크롤바가 작다면 끄는 것을 추천합니다. 선택 시작 시 Flow Launcher 숨김 + 트레이 아이콘 숨기기 + 쿼리 검색 정확도 + 검색 결과가 좀 더 정확해집니다. + 항상 Pinyin 사용 + Pinyin을 사용하여 검색할 수 있습니다. Pinyin(병음)은 로마자 중국어 입력 방식입니다. + 반투명 흐림 효과를 사용하는 경우, 그림자 효과를 쓸 수 없습니다. 플러그인 플러그인 더 찾아보기 - 비활성화 + On + Off 액션 키워드 플러그인 디렉토리 저자 초기화 시간: 쿼리 시간: + + + 플러그인 스토어 + 새로고침 + 설치 + 테마 테마 더 찾아보기 + Hi There 쿼리 상자 글꼴 결과 항목 글꼴 윈도우 모드 투명도 + {0} 테마가 존재하지 않습니다. 기본 테마로 변경합니다. + {0} 테마 로드에 실패했습니다. 기본 테마로 변경합니다. + 테마 폴더 + 테마 폴더 열기 핫키 Flow Launcher 핫키 - 결과 수정 자 열기 - 사용자지정 쿼리 핫키 + Flow Launcher를 열 때 사용할 단축키를 입력합니다. + 결과 선택 단축키 + 결과 목록을 선택하는 단축키입니다. 단축키 표시 + 결과창에서 결과 선택 단축키를 표시합니다. + 사용자지정 쿼리 핫키 + Query 삭제 편집 추가 항목을 선택하세요. {0} 플러그인 핫키를 삭제하시겠습니까? + 그림자 효과 + 그림자 효과는 GPU를 사용합니다. 컴퓨터 퍼포먼스가 제한적인 경우 사용을 추천하지 않습니다. + 플루언트 아이콘 사용 + 결과 및 일부 메뉴에서 플루언트 아이콘을 사용합니다. HTTP 프록시 @@ -86,8 +119,17 @@ Flow Launcher를 {0}번 실행했습니다. 업데이트 확인 새 버전({0})이 있습니다. Flow Launcher를 재시작하세요. + 업데이트 확인을 실패했습니다. api.github.com로의 연결 또는 프록시 설정을 확인해주세요. + + 업데이트 다운로드에 실패했습니다. github-cloud.s3.amazonaws.com의 연결 또는 프록시 설정을 확인해주세요. + 수동 다운로드를 하려면 https://github.com/Flow-Launcher/Flow.Launcher/releases 으로 방문하세요. + 릴리즈 노트: + 사용 팁: + + 높은 수를 넣을수록 상위 결과에 표시됩니다. 5를 시도해보세요. 다른 플러그인 보다 결과를 낮추고 싶다면, 그보다 낮은 수를 입력하세요. + 중요도에 올바른 정수를 입력하세요. 예전 액션 키워드 새 액션 키워드 @@ -97,9 +139,11 @@ 새 액션 키워드를 입력하세요. 새 액션 키워드가 할당된 플러그인이 이미 있습니다. 다른 액션 키워드를 입력하세요. 성공 + 성공적으로 완료했습니다. 액션 키워드를 지정하지 않으려면 *를 사용하세요. + 커스텀 플러그인 핫키 미리보기 핫키를 사용할 수 없습니다. 다른 핫키를 입력하세요. 플러그인 핫키가 유효하지 않습니다. @@ -123,12 +167,23 @@ 보고서를 정상적으로 보냈습니다. 보고서를 보내지 못했습니다. Flow Launcher에 문제가 발생했습니다. - + + + 잠시 기다려주세요... + 새 업데이트 확인 중 새 Flow Launcher 버전({0})을 사용할 수 있습니다. + 이미 가장 최신 버전의 Flow Launcher를 사용중입니다. + 업데이트 발견 + 업데이트 중... + Flow Launcher가 유저 정보 데이터를 새버전으로 옮길 수 없습니다. + 프로필 데이터 폴더를 수동으로 {0} 에서 {1}로 옮겨주세요. + 새 업데이트 소프트웨어 업데이트를 설치하는 중에 오류가 발생했습니다. 업데이트 취소 + 업데이트 실패 + Check your connection and try updating proxy settings to github-cloud.s3.amazonaws.com. 업데이트를 위해 Flow Launcher를 재시작합니다. 아래 파일들이 업데이트됩니다. 업데이트 파일 diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 73b13be8c..b517faf19 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -92,7 +92,7 @@ - + diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index c8b454ebf..a28886094 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -478,6 +478,8 @@ + @@ -526,6 +528,8 @@ + @@ -540,8 +544,12 @@ - + + + - + + +  - + @@ -885,10 +897,10 @@ - + - @@ -1339,7 +1350,7 @@ - + - + + @@ -1376,7 +1391,7 @@ - Date: Thu, 21 Oct 2021 14:55:54 +0900 Subject: [PATCH 082/206] - Redesign Priority Change Window - Add Priority Window Title String --- Flow.Launcher/Languages/en.xaml | 1 + Flow.Launcher/Languages/ko.xaml | 5 +++ Flow.Launcher/PriorityChangeWindow.xaml | 52 ++++++++++++++++--------- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index ce451841c..1dd6d3889 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -133,6 +133,7 @@ Usage Tips: + Change Priority Greater the number, the higher the result will be ranked. Try setting it as 5. If you want the results to be lower than any other plugin's, provide a negative number Please provide an valid integer for Priority! diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml index 6f2881668..6a145d670 100644 --- a/Flow.Launcher/Languages/ko.xaml +++ b/Flow.Launcher/Languages/ko.xaml @@ -52,11 +52,15 @@ On Off 액션 키워드 + 현재 중요도: + 새 중요도: + 중요도 플러그인 디렉토리 저자 초기화 시간: 쿼리 시간: + 플러그인 스토어 새로고침 @@ -128,6 +132,7 @@ 사용 팁: + 중요도 변경 높은 수를 넣을수록 상위 결과에 표시됩니다. 5를 시도해보세요. 다른 플러그인 보다 결과를 낮추고 싶다면, 그보다 낮은 수를 입력하세요. 중요도에 올바른 정수를 입력하세요. diff --git a/Flow.Launcher/PriorityChangeWindow.xaml b/Flow.Launcher/PriorityChangeWindow.xaml index 68b5a49b7..60a289e61 100644 --- a/Flow.Launcher/PriorityChangeWindow.xaml +++ b/Flow.Launcher/PriorityChangeWindow.xaml @@ -7,37 +7,51 @@ Loaded="PriorityChangeWindow_Loaded" mc:Ignorable="d" WindowStartupLocation="CenterScreen" - Title="PriorityChangeWindow" Height="250" Width="300"> + Title="{DynamicResource changePriorityWindow}" Height="400" Width="350" ResizeMode="NoResize" Background="#f3f3f3"> - - + + - - - - - - - + + +  + - + + + + + + + - - From 6af1262ca6255ec7ad58b6e86d3fbb0abc5873f9 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 21 Oct 2021 18:16:05 +0900 Subject: [PATCH 083/206] Adjust Width in Theme.cs --- Flow.Launcher.Core/Resource/Theme.cs | 7 ++++--- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 1 + Flow.Launcher/SettingWindow.xaml | 2 +- Flow.Launcher/Themes/Base.xaml | 4 ++-- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 4648aef63..d934491be 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -191,7 +191,7 @@ namespace Flow.Launcher.Core.Resource } var windowStyle = dict["WindowStyle"] as Style; - + /* var width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") .Select(x => x.Value).FirstOrDefault(); @@ -202,9 +202,10 @@ namespace Flow.Launcher.Core.Resource width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") .Select(x => x.Value).FirstOrDefault(); } - + */ + var width = Settings.WindowSize; + windowStyle.Setters.Add(new Setter(Window.WidthProperty, width)); mainWindowWidth = (double)width; - return dict; } diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 99879e64e..3bae6a24c 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -21,6 +21,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings windowsize = value; OnPropertyChanged(); } + } public string Language diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8873d8aae..403e6adaf 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -683,7 +683,7 @@ Click="OpenPluginFolder" Grid.Column="2">Open Theme Folder--> - +  diff --git a/Flow.Launcher/Themes/Base.xaml b/Flow.Launcher/Themes/Base.xaml index d7df48d93..ad13e0101 100644 --- a/Flow.Launcher/Themes/Base.xaml +++ b/Flow.Launcher/Themes/Base.xaml @@ -1,7 +1,7 @@  + xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"> diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index cbb99962b..b5fc2d803 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -307,7 +307,7 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get { return Settings.WindowSize; } - set { Settings.WindowSize = value; } + set { Settings.WindowSize = value;} } public bool UseGlyphIcons From 5e0172cbf6e4852c3d3970c352d7f5827a65cf7e Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 21 Oct 2021 18:31:14 +0900 Subject: [PATCH 084/206] - Remove Comment - Add String "Window Width Size" --- Flow.Launcher.Core/Resource/Theme.cs | 14 +------------- .../UserSettings/Settings.cs | 2 +- Flow.Launcher/Languages/en.xaml | 1 + Flow.Launcher/SettingWindow.xaml | 6 ++---- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 2 +- 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index d934491be..efd311acb 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -189,20 +189,8 @@ namespace Flow.Launcher.Core.Resource new[] { resultItemStyle, resultSubItemStyle, resultItemSelectedStyle, resultSubItemSelectedStyle, resultHotkeyItemStyle, resultHotkeyItemSelectedStyle }, o => Array.ForEach(setters, p => o.Setters.Add(p))); } - + /* Ignore Theme Window Width and use setting */ var windowStyle = dict["WindowStyle"] as Style; - /* - var width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") - .Select(x => x.Value).FirstOrDefault(); - - if (width == null) - { - windowStyle = dict["BaseWindowStyle"] as Style; - - width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") - .Select(x => x.Value).FirstOrDefault(); - } - */ var width = Settings.WindowSize; windowStyle.Setters.Add(new Setter(Window.WidthProperty, width)); mainWindowWidth = (double)width; diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 3bae6a24c..1d4100138 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -4,7 +4,7 @@ using System.Drawing; using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedModels; - +using Flow.Launcher; namespace Flow.Launcher.Infrastructure.UserSettings { public class Settings : BaseModel diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 4a9b92700..bbb56b9ec 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -82,6 +82,7 @@ Are you sure you want to delete {0} plugin hotkey? Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. + Window Width Size Use Segoe Fluent Icons Use Segoe Fluent Icons for query results where supported diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 403e6adaf..e74cfff79 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -677,13 +677,11 @@ - + - - +  diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index b5fc2d803..0fb6e6969 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -307,7 +307,7 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get { return Settings.WindowSize; } - set { Settings.WindowSize = value;} + set { Settings.WindowSize = value; ThemeManager.Instance.ChangeTheme(Settings.Theme); } } public bool UseGlyphIcons From 6b37adaf0797a407696032cfa3692caac8bca22f Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 21 Oct 2021 18:31:14 +0900 Subject: [PATCH 085/206] - Remove Comment - Add String "Window Width Size" --- Flow.Launcher.Core/Resource/Theme.cs | 14 +------------- .../UserSettings/Settings.cs | 2 +- Flow.Launcher/Languages/en.xaml | 1 + Flow.Launcher/SettingWindow.xaml | 6 ++---- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 6 +++++- 5 files changed, 10 insertions(+), 19 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index d934491be..efd311acb 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -189,20 +189,8 @@ namespace Flow.Launcher.Core.Resource new[] { resultItemStyle, resultSubItemStyle, resultItemSelectedStyle, resultSubItemSelectedStyle, resultHotkeyItemStyle, resultHotkeyItemSelectedStyle }, o => Array.ForEach(setters, p => o.Setters.Add(p))); } - + /* Ignore Theme Window Width and use setting */ var windowStyle = dict["WindowStyle"] as Style; - /* - var width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") - .Select(x => x.Value).FirstOrDefault(); - - if (width == null) - { - windowStyle = dict["BaseWindowStyle"] as Style; - - width = windowStyle?.Setters.OfType().Where(x => x.Property.Name == "Width") - .Select(x => x.Value).FirstOrDefault(); - } - */ var width = Settings.WindowSize; windowStyle.Setters.Add(new Setter(Window.WidthProperty, width)); mainWindowWidth = (double)width; diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 3bae6a24c..1d4100138 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -4,7 +4,7 @@ using System.Drawing; using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedModels; - +using Flow.Launcher; namespace Flow.Launcher.Infrastructure.UserSettings { public class Settings : BaseModel diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 4a9b92700..bbb56b9ec 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -82,6 +82,7 @@ Are you sure you want to delete {0} plugin hotkey? Query window shadow effect Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited. + Window Width Size Use Segoe Fluent Icons Use Segoe Fluent Icons for query results where supported diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 403e6adaf..8e20232ac 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -677,13 +677,11 @@ - + - - +  diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index b5fc2d803..67d167113 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -307,7 +307,11 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get { return Settings.WindowSize; } - set { Settings.WindowSize = value;} + set + { + Settings.WindowSize = value; + ThemeManager.Instance.ChangeTheme(Settings.Theme); + } } public bool UseGlyphIcons From f6d4736f1ab8766822f1d394d7dc3b3f4418110a Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 22 Oct 2021 08:11:53 +1100 Subject: [PATCH 086/206] add scroll movement with drag --- Flow.Launcher/SettingWindow.xaml | 444 ++++++++++++++++--------------- 1 file changed, 225 insertions(+), 219 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index a28886094..7c09a8d0f 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -658,103 +658,105 @@ - + - - - - - - - - + + + + + + + + - - + - - - - - - - - + + + + + + + - - - - + + - + - - - - + + + - - - - - + + + + + + + + + + + - + - + - - - - + + + - - - + + - - - + + + + - - - + + + - + - - - - - - - - + + + + + + - + - + - - + - - + - - - - - - - - - - - - + - - + - - + + + - - - + + - - - + + + + @@ -912,125 +915,128 @@ BorderThickness="1 1 1 2"/> - + - - - - - - - - + Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch"> + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + - - - - - - + + + + + - + - + - - - - - + + + + + - - - - - - - + + + + + + + - - - + + - - - - + + + - + + - - - - - - - + + + + + - - - - + + + + + From 3bacb3fc0753ccb0c77814de465e120826df3063 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 21 Oct 2021 22:29:03 -0500 Subject: [PATCH 087/206] Revert "add scroll movement with drag" This reverts commit f6d4736f1ab8766822f1d394d7dc3b3f4418110a. --- Flow.Launcher/SettingWindow.xaml | 444 +++++++++++++++---------------- 1 file changed, 219 insertions(+), 225 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 7c09a8d0f..a28886094 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -658,105 +658,103 @@ - - - - - - - - - - + + + + + + + + - - + - - - - - - - - + + + + + + + - - - - + + - + - - - - + + + - - - - - + + + + + + + + + + + - + - + - - - - + + + - - - + + - - - + + + + - - - + + + - + - - - - - - - - + + + + + + - + - + - - + - - + - - - - - - - - - - - - + - - + - - + + - - - + + + - - - - + + + @@ -915,128 +912,125 @@ BorderThickness="1 1 1 2"/> - - - - - - - - - - + ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False" + Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"> + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + - - - - - - + + + + + - + - + - - - - - + + + + + - - - - - - - + + + + + + + - - - + + - - - - + + + - - + - - - - - - + + + + + - - - - - + + + + From 82464b79c511030713f21af05b1f2a171282f36b Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 21 Oct 2021 22:31:33 -0500 Subject: [PATCH 088/206] Remove deferred scroll option to enable direct scrolling --- Flow.Launcher/SettingWindow.xaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index a28886094..2dcc2fa02 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -662,7 +662,6 @@ ItemsSource="{Binding PluginViewModels}" Margin="5, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{StaticResource PluginList}" - ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False" Padding="0 0 7 0" Width="Auto" HorizontalAlignment="Stretch" SnapsToDevicePixels="True" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"> @@ -916,7 +915,6 @@ ItemsSource="{Binding ExternalPlugins}" Margin="6, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemContainerStyle="{StaticResource StoreList}" SelectionMode="Single" - ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False" Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" ui:ScrollViewerHelper.AutoHideScrollBars="{Binding AutoHideScrollBar, Mode=OneWay}"> From 5be44b68eadc64238bb8c9c1b0764440668a0491 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 21 Oct 2021 23:31:51 -0500 Subject: [PATCH 089/206] Add fody and use binding to change width --- Flow.Launcher.Core/Resource/Theme.cs | 1 - .../Flow.Launcher.Infrastructure.csproj | 5 +++++ .../UserSettings/Settings.cs | 17 +++++--------- Flow.Launcher/MainWindow.xaml | 1 + Flow.Launcher/MainWindow.xaml.cs | 5 +++++ Flow.Launcher/ViewModel/MainViewModel.cs | 10 +++++++++ .../ViewModel/SettingWindowViewModel.cs | 22 +++++++++---------- 7 files changed, 36 insertions(+), 25 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index efd311acb..3abb426cb 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -365,7 +365,6 @@ namespace Flow.Launcher.Core.Resource var windowHelper = new WindowInteropHelper(w); // this determines the width of the main query window - w.Width = mainWindowWidth; windowHelper.EnsureHandle(); var accent = new AccentPolicy { AccentState = state }; diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index ef76fd617..e01bc1efd 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -50,10 +50,15 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 1d4100138..614fc1de8 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -5,28 +5,21 @@ using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedModels; using Flow.Launcher; + namespace Flow.Launcher.Infrastructure.UserSettings { public class Settings : BaseModel { private string language = "en"; - public double windowsize = 580; public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}"; public string OpenResultModifiers { get; set; } = KeyConstant.Alt; public bool ShowOpenResultHotkey { get; set; } = true; - public double WindowSize - { - get => windowsize; set - { - windowsize = value; - OnPropertyChanged(); - } - - } + public double WindowSize { get; set; } = 580; public string Language { - get => language; set + get => language; + set { language = value; OnPropertyChanged(); @@ -62,7 +55,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings try { var precisionScore = (SearchPrecisionScore)Enum - .Parse(typeof(SearchPrecisionScore), value); + .Parse(typeof(SearchPrecisionScore), value); QuerySearchPrecision = precisionScore; StringMatcher.Instance.UserSettingSearchPrecision = precisionScore; diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 73b13be8c..dbf329b58 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -26,6 +26,7 @@ LocationChanged="OnLocationChanged" Deactivated="OnDeactivated" PreviewKeyDown="OnKeyDown" + Width="{Binding MainWindowWidth, Mode=OneTime}" Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" d:DataContext="{d:DesignInstance vm:MainViewModel}"> diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 057c3f07d..79682806c 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -19,6 +19,7 @@ using DragEventArgs = System.Windows.DragEventArgs; using KeyEventArgs = System.Windows.Input.KeyEventArgs; using MessageBox = System.Windows.MessageBox; using NotifyIcon = System.Windows.Forms.NotifyIcon; +using System.Windows.Interop; namespace Flow.Launcher { @@ -131,6 +132,10 @@ namespace Flow.Launcher _viewModel.QueryTextCursorMovedToEnd = false; } break; + case nameof(MainViewModel.MainWindowWidth): + MinWidth = _viewModel.MainWindowWidth; + MaxWidth = _viewModel.MainWindowWidth; + break; } }; _settings.PropertyChanged += (o, e) => diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index e54014110..522d10b3a 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -22,6 +22,7 @@ using System.Threading.Channels; using ISavable = Flow.Launcher.Plugin.ISavable; using System.Windows.Threading; using NHotkey; +using Windows.Web.Syndication; namespace Flow.Launcher.ViewModel @@ -63,6 +64,13 @@ namespace Flow.Launcher.ViewModel _lastQuery = new Query(); _settings = settings; + _settings.PropertyChanged += (_, args) => + { + if (args.PropertyName == nameof(Settings.WindowSize)) + { + OnPropertyChanged(nameof(MainWindowWidth)); + } + }; _historyItemsStorage = new FlowLauncherJsonStorage(); _userSelectedRecordStorage = new FlowLauncherJsonStorage(); @@ -378,6 +386,8 @@ namespace Flow.Launcher.ViewModel public Visibility ProgressBarVisibility { get; set; } public Visibility MainWindowVisibility { get; set; } + public double MainWindowWidth => _settings.WindowSize; + public ICommand EscCommand { get; set; } public ICommand SelectNextItemCommand { get; set; } public ICommand SelectPrevItemCommand { get; set; } diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 67d167113..e2c1d9700 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -35,9 +35,11 @@ namespace Flow.Launcher.ViewModel Settings = _storage.Load(); Settings.PropertyChanged += (s, e) => { - if (e.PropertyName == nameof(Settings.ActivateTimes)) + switch (e.PropertyName) { - OnPropertyChanged(nameof(ActivatedTimes)); + case nameof(Settings.ActivateTimes): + OnPropertyChanged(nameof(ActivatedTimes)); + break; } }; } @@ -51,7 +53,7 @@ namespace Flow.Launcher.ViewModel public bool AutoUpdates { - get { return Settings.AutoUpdates; } + get => Settings.AutoUpdates; set { Settings.AutoUpdates = value; @@ -71,7 +73,7 @@ namespace Flow.Launcher.ViewModel private bool _portableMode = DataLocation.PortableDataLocationInUse(); public bool PortableMode { - get { return _portableMode; } + get => _portableMode; set { if (!_portable.CanUpdatePortability()) @@ -306,18 +308,14 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { - get { return Settings.WindowSize; } - set - { - Settings.WindowSize = value; - ThemeManager.Instance.ChangeTheme(Settings.Theme); - } + get => Settings.WindowSize; + set => Settings.WindowSize = value; } public bool UseGlyphIcons { - get { return Settings.UseGlyphIcons; } - set { Settings.UseGlyphIcons = value; } + get => Settings.UseGlyphIcons; + set => Settings.UseGlyphIcons = value; } public Brush PreviewBackground From 674d6154a2156282b9c8bba03e18d5078d308429 Mon Sep 17 00:00:00 2001 From: DB p Date: Fri, 22 Oct 2021 14:39:26 +0900 Subject: [PATCH 090/206] Display Querybox when Using Width slider. --- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index e2c1d9700..c869f5601 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -309,7 +309,11 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get => Settings.WindowSize; - set => Settings.WindowSize = value; + set + { + Settings.WindowSize = value; + Application.Current.MainWindow.Visibility = Visibility.Visible; + } } public bool UseGlyphIcons From 08c643adcc58f90843ddaa9badc2e21ec4c1ca9e Mon Sep 17 00:00:00 2001 From: DB p Date: Fri, 22 Oct 2021 16:41:35 +0900 Subject: [PATCH 091/206] Add "IsMoveToPointEnabled" property --- Flow.Launcher/SettingWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8e20232ac..9126ab4a1 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -681,7 +681,7 @@ - +  From 64a489b3129914543befa8ad4eeae4fc535d97e0 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 22 Oct 2021 13:41:36 -0500 Subject: [PATCH 092/206] Use Hacky way to show up windows when width change. Clear query to prevent large area of window preventing user change width. --- Flow.Launcher/ViewModel/MainViewModel.cs | 15 +++++++++++++-- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 6 +----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 522d10b3a..cd6392cb6 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -52,6 +52,7 @@ namespace Flow.Launcher.ViewModel private ChannelWriter _resultsUpdateChannelWriter; private Task _resultsViewUpdateTask; + private bool _keepVisibility = false; #endregion @@ -64,10 +65,20 @@ namespace Flow.Launcher.ViewModel _lastQuery = new Query(); _settings = settings; - _settings.PropertyChanged += (_, args) => + _settings.PropertyChanged += async (_, args) => { if (args.PropertyName == nameof(Settings.WindowSize)) { + ChangeQueryText(""); + if (MainWindowVisibility == Visibility.Collapsed) + { + ToggleFlowLauncher(); + _keepVisibility = true; + await Task.Delay(1000); + _keepVisibility = false; + Application.Current.MainWindow.Activate(); + } + OnPropertyChanged(nameof(MainWindowWidth)); } }; @@ -742,7 +753,7 @@ namespace Flow.Launcher.ViewModel public void Hide() { - if (MainWindowVisibility != Visibility.Collapsed) + if (MainWindowVisibility != Visibility.Collapsed && !_keepVisibility) { ToggleFlowLauncher(); } diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index c869f5601..e2c1d9700 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -309,11 +309,7 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get => Settings.WindowSize; - set - { - Settings.WindowSize = value; - Application.Current.MainWindow.Visibility = Visibility.Visible; - } + set => Settings.WindowSize = value; } public bool UseGlyphIcons From a83f9df19c978787220cf0f57167ee1b33176d00 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 22 Oct 2021 13:57:22 -0500 Subject: [PATCH 093/206] Revert "Use Hacky way to show up windows when width change." This reverts commit 64a489b3129914543befa8ad4eeae4fc535d97e0. --- Flow.Launcher/ViewModel/MainViewModel.cs | 15 ++------------- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 6 +++++- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index cd6392cb6..522d10b3a 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -52,7 +52,6 @@ namespace Flow.Launcher.ViewModel private ChannelWriter _resultsUpdateChannelWriter; private Task _resultsViewUpdateTask; - private bool _keepVisibility = false; #endregion @@ -65,20 +64,10 @@ namespace Flow.Launcher.ViewModel _lastQuery = new Query(); _settings = settings; - _settings.PropertyChanged += async (_, args) => + _settings.PropertyChanged += (_, args) => { if (args.PropertyName == nameof(Settings.WindowSize)) { - ChangeQueryText(""); - if (MainWindowVisibility == Visibility.Collapsed) - { - ToggleFlowLauncher(); - _keepVisibility = true; - await Task.Delay(1000); - _keepVisibility = false; - Application.Current.MainWindow.Activate(); - } - OnPropertyChanged(nameof(MainWindowWidth)); } }; @@ -753,7 +742,7 @@ namespace Flow.Launcher.ViewModel public void Hide() { - if (MainWindowVisibility != Visibility.Collapsed && !_keepVisibility) + if (MainWindowVisibility != Visibility.Collapsed) { ToggleFlowLauncher(); } diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index e2c1d9700..c869f5601 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -309,7 +309,11 @@ namespace Flow.Launcher.ViewModel public double WindowWidthSize { get => Settings.WindowSize; - set => Settings.WindowSize = value; + set + { + Settings.WindowSize = value; + Application.Current.MainWindow.Visibility = Visibility.Visible; + } } public bool UseGlyphIcons From 9d3096050f51c6a9876234fc8a15b01ac204d4e4 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 22 Oct 2021 15:26:13 -0500 Subject: [PATCH 094/206] Bind width to preview --- Flow.Launcher/SettingWindow.xaml | 250 +++++++++--------- .../ViewModel/SettingWindowViewModel.cs | 6 +- 2 files changed, 124 insertions(+), 132 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 9126ab4a1..a696aefdd 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -68,7 +68,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -432,7 +432,7 @@ - + @@ -457,32 +457,32 @@ - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + - - @@ -494,63 +494,63 @@ - - - + - - - + + - - - - - - - + + + + - - - - - + + + + - + - - - - - - - + + + + + + + - - + + @@ -561,7 +561,7 @@ - + @@ -587,7 +587,7 @@ - + @@ -600,6 +600,35 @@ + + + + + + + + + +  + + + + + + + + + + + + + +  + + + + + - - - - - - - - - - -  - - - - - - - - - - - - - - - - -  - - - - - @@ -789,8 +785,8 @@ - - + + @@ -895,8 +891,8 @@ - - + + @@ -910,7 +906,7 @@ - + @@ -977,53 +973,53 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - + + + - - diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 1d270e42f..120fd328c 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -596,8 +596,17 @@ Style="{DynamicResource SettingSubTitleLabel}" /> - Date: Sun, 31 Oct 2021 08:09:12 +0900 Subject: [PATCH 123/206] - Remove URL - Add Icon --- .../SettingsControl.xaml | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml index 54ef8d8e4..68f5adc3b 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml @@ -56,7 +56,6 @@ - + - + + + Width="130"> - + - + + + + + + + + From 102e7cb1b93c4d29bdd891291b2cf88e770c778c Mon Sep 17 00:00:00 2001 From: DB p Date: Sun, 31 Oct 2021 17:18:03 +0900 Subject: [PATCH 124/206] Fix HideonStartup (#783) --- Flow.Launcher/ViewModel/MainViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 4588a677f..2e0eb4924 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -729,7 +729,7 @@ namespace Flow.Launcher.ViewModel { if (MainWindowVisibility != Visibility.Collapsed) { - ToggleFlowLauncher(); + MainWindowVisibility = Visibility.Collapsed; } } From 58c599e748860e48fefea59b3a30fb8bbddfbe3f Mon Sep 17 00:00:00 2001 From: DB p Date: Mon, 1 Nov 2021 04:35:58 +0900 Subject: [PATCH 125/206] Move "HideEmptyQuery" from toggleflow to hide. --- Flow.Launcher/ViewModel/MainViewModel.cs | 39 +++++++++++------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 4588a677f..fde5bb467 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -704,33 +704,30 @@ namespace Flow.Launcher.ViewModel } else { - switch (_settings.LastQueryMode) - { - case LastQueryMode.Empty: - ChangeQueryText(string.Empty); - Application.Current.MainWindow.Opacity = 0; // Trick for no delay - await Task.Delay(100); - Application.Current.MainWindow.Opacity = 1; - break; - case LastQueryMode.Preserved: - LastQuerySelected = true; - break; - case LastQueryMode.Selected: - LastQuerySelected = false; - break; - default: - throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>"); - } - MainWindowVisibility = Visibility.Collapsed; + Hide(); } } - public void Hide() + public async void Hide() { - if (MainWindowVisibility != Visibility.Collapsed) + switch (_settings.LastQueryMode) { - ToggleFlowLauncher(); + case LastQueryMode.Empty: + ChangeQueryText(string.Empty); + Application.Current.MainWindow.Opacity = 0; // Trick for no delay + await Task.Delay(100); + Application.Current.MainWindow.Opacity = 1; + break; + case LastQueryMode.Preserved: + LastQuerySelected = true; + break; + case LastQueryMode.Selected: + LastQuerySelected = false; + break; + default: + throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>"); } + MainWindowVisibility = Visibility.Collapsed; } #endregion From 5aeab2456b8aceb150f7756d6c32cb86287a3cfb Mon Sep 17 00:00:00 2001 From: DB p Date: Mon, 1 Nov 2021 07:33:59 +0900 Subject: [PATCH 126/206] add force closin --- Flow.Launcher/MainWindow.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 057c3f07d..16c9fd05c 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -53,7 +53,7 @@ namespace Flow.Launcher _viewModel.Save(); e.Cancel = true; await PluginManager.DisposePluginsAsync(); - Application.Current.Shutdown(); + Environment.Exit(0); } private void OnInitialized(object sender, EventArgs e) @@ -185,7 +185,7 @@ namespace Flow.Launcher var setting = items.Add(InternationalizationManager.Instance.GetTranslation("iconTraySettings")); setting.Click += (o, e) => App.API.OpenSettingDialog(); var exit = items.Add(InternationalizationManager.Instance.GetTranslation("iconTrayExit")); - exit.Click += (o, e) => Close(); + exit.Click += (o, e) => Environment.Exit(0); _notifyIcon.ContextMenuStrip = menu; _notifyIcon.MouseClick += (o, e) => From e04284a013d681a3f1fc6d9e5f22819219807e35 Mon Sep 17 00:00:00 2001 From: DB p Date: Mon, 1 Nov 2021 07:33:59 +0900 Subject: [PATCH 127/206] add force closing --- Flow.Launcher/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 057c3f07d..b0e3492d2 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -53,7 +53,7 @@ namespace Flow.Launcher _viewModel.Save(); e.Cancel = true; await PluginManager.DisposePluginsAsync(); - Application.Current.Shutdown(); + Environment.Exit(0); } private void OnInitialized(object sender, EventArgs e) From 323c2422ef1bdaad8cfea04f9116738c3fd4df75 Mon Sep 17 00:00:00 2001 From: kubalav Date: Tue, 2 Nov 2021 19:51:28 +0100 Subject: [PATCH 128/206] Update Slovak translation --- Flow.Launcher/Languages/sk.xaml | 35 ++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index 70a5d3b7c..51b03db5d 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -13,47 +13,58 @@ Nastavenia O aplikácii Ukončiť + Zavrieť Nastavenia Flow Launchera Všeobecné Prenosný režim + Uloží všetky nastavenia a používateľské údaje do jedného centrálneho priečinka (Užitočné pri vyberateľných diskoch a cloudových službách). Spustiť Flow Launcher po štarte systému Schovať Flow Launcher po strate fokusu Nezobrazovať upozornenia na novú verziu Zapamätať si posledné umiestnenie Jazyk Posledné vyhľadávanie + Zobrazí/skryje predchádzajúce výsledky pri opätovnej aktivácii Flow Launchera. Ponechať Označiť Vymazať Max. výsledkov Ignorovať klávesové skratky v režime na celú obrazovku + Zakázať aktiváciu Flow Launchera, keď je aktívna aplikácia na celú obrazovku (odporúčané pre hry). Priečinok s Pythonom Automatická aktualizácia Vybrať Schovať Flow Launcher po spustení Schovať ikonu z oblasti oznámení Presnosť vyhľadávania + Mení minimálne skóre zhody potrebné na zobrazenie výsledkov. Použiť Pinyin Umožňuje vyhľadávanie pomocou Pinyin. Pinyin je štandardný systém romanizovaného pravopisu pre transliteráciu čínštiny Efekt tieňa nie je povolený, kým má aktuálny motív povolený efekt rozostrenia - + - Plugin + Pluginy Nájsť ďalšie pluginy - Povolené - Zakázané + Zap. + Vyp. Skratka akcie Aktuálna akcia skratky: Nová akcia skratky: Aktuálna priorita: Nová priorita: - Priorita: + Priorita Priečinok s pluginmi - Autor + Autor: Príprava: Čas dopytu: + + + + Repozitár pluginov + Obnoviť + Inštalovať Motív @@ -65,12 +76,17 @@ Nepriehľadnosť Motív {0} neexistuje, návrat na predvolený motív Nepodarilo sa nečítať motív {0}, návrat na predvolený motív + Priečinok s motívmi + Otvoriť priečinok s motívmi Klávesové skratky Klávesová skratka pre Flow Launcher - Modifikáčné klávesy na otvorenie výsledkov + Zadajte skratku na zobrazenie/skrytie Flow Launchera. + Otvoriť výsledok modifikačným klávesom + Vyberte modifikačný kláves na otvorenie výsledku pomocou klávesnice. Zobraziť klávesovú skratku + Zobrazí klávesovú skratku spolu s výsledkami. Vlastná klávesová skratka na vyhľadávanie Dopyt Odstrániť @@ -115,6 +131,7 @@ Tipy na používanie: + Zmena priority Vyššie číslo znamená, že výsledok bude vyššie. Skúste nastaviť napr. 5. Ak chcete, aby boli výsledky nižšie ako ktorékoľvek iné doplnky, zadajte záporné číslo Prosím, zadajte platné číslo pre prioritu! @@ -160,8 +177,8 @@ Čakajte, prosím… - Kontrolujú sa akutalizácie - Už máte najnovšiu verizu Flow Launchera + Kontrolujú sa aktualizácie + Už máte najnovšiu verziu Flow Launchera Bola nájdená aktualizácia Aktualizuje sa… Flow Launcher nedokázal presunúť používateľské údaje do aktualizovanej verzie. From 6f004a4774718c83e81a5c1a3c5974710788de3b Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Tue, 2 Nov 2021 15:07:11 -0500 Subject: [PATCH 129/206] Custom Explorer Binding (Part 1) --- .../UserSettings/CustomExplorerViewModel.cs | 17 ++ .../UserSettings/Settings.cs | 25 +++ Flow.Launcher/App.xaml.cs | 2 +- Flow.Launcher/Languages/en.xaml | 3 +- Flow.Launcher/SelectFileManagerWindow.xaml | 208 +++++++++++------- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 9 +- Flow.Launcher/SettingWindow.xaml.cs | 2 +- 7 files changed, 181 insertions(+), 85 deletions(-) create mode 100644 Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs diff --git a/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs new file mode 100644 index 000000000..4fd5e317a --- /dev/null +++ b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Flow.Launcher.ViewModel +{ + public class CustomExplorerViewModel + { + public string Name { get; set; } + public string Path { get; set; } + public string FileArgument { get; set; } = "\"%d\""; + public string DirectoryArgument { get; set; } = "\"%d\""; + public bool Editable { get; init; } = true; + } +} diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 102446158..f1c5fd442 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -1,9 +1,11 @@ using System; +using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedModels; +using Flow.Launcher.ViewModel; namespace Flow.Launcher.Infrastructure.UserSettings { @@ -34,6 +36,29 @@ namespace Flow.Launcher.Infrastructure.UserSettings public string ResultFontStretch { get; set; } public bool UseGlyphIcons { get; set; } = true; + public CustomExplorerViewModel CustomExplorer { get; set; } + public List CustomExplorerList { get; set; } = new() + { + new() + { + Name = "Explorer", + Path = "explorer", + FileArgument = "/select, \"%f\"", + DirectoryArgument = "\"%d\"", + Editable = false + }, + new() + { + Name = "Total Commander", + Path = @"C:\Program Files\TOTALCMD\totalcommander.exe" + }, + new() + { + Name = "Dopus", + Path = @"c:\programe files\dopus\dopus.exe" + } + }; + /// /// when false Alphabet static service will always return empty results diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 8c869e941..75925b1e0 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -101,7 +101,7 @@ namespace Flow.Launcher API.SaveAppAllSettings(); - _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible; + _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Collapsed : Visibility.Visible; Log.Info("|App.OnStartup|End Flow Launcher startup ---------------------------------------------------- "); }); } diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 15954c896..84f7c06b1 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -135,7 +135,8 @@ Please specify the file location of the file manager you using and add arguments (optional) if necessary. File Manager Path - Argument + Argument For Directory + Argument For File Parent Directory Change Priority diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml index 9fb9ee1cd..55eceae27 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -2,112 +2,154 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Flow.Launcher" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.modernwpf.com/2019" - xmlns:local="clr-namespace:Flow.Launcher" - mc:Ignorable="d" + Title="{DynamicResource fileManagerWindow}" + Width="500" + Height="420" + Background="#f3f3f3" + DataContext="{Binding RelativeSource={RelativeSource Self}}" + ResizeMode="NoResize" WindowStartupLocation="CenterScreen" - Title="{DynamicResource fileManagerWindow}" Height="420" Width="500" ResizeMode="NoResize" Background="#f3f3f3"> + mc:Ignorable="d"> - + - + - - + + - + - - - - - - - - + + + + + + + + - - + + - + - + - - + + - - - - - - + + + + + + + + @@ -116,10 +158,16 @@ - - diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index 6fcf6feef..429ccec49 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -1,4 +1,6 @@ -using System; +using Flow.Launcher.Infrastructure.UserSettings; +using Flow.Launcher.ViewModel; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -19,8 +21,11 @@ namespace Flow.Launcher /// public partial class SelectFileManagerWindow : Window { - public SelectFileManagerWindow() + public Settings Settings { get; } + + public SelectFileManagerWindow(Settings settings) { + Settings = settings; InitializeComponent(); } } diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 80f82e8ed..3066778c1 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -117,7 +117,7 @@ namespace Flow.Launcher private void OnSelectFileManagerClick(object sender, RoutedEventArgs e) { - SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow(); + SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow(settings); fileManagerChangeWindow.ShowDialog(); } From c2a633097b16e51e5242eeb5b69e6b125c0a3874 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Wed, 3 Nov 2021 08:17:57 +1100 Subject: [PATCH 130/206] update wording and bump WebSearch version --- Flow.Launcher/CustomQueryHotkeySetting.xaml.cs | 1 - Flow.Launcher/HotkeyControl.xaml.cs | 2 -- Flow.Launcher/SettingWindow.xaml.cs | 2 +- Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml | 4 ++-- Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs index 6d50ab2b0..0109474e1 100644 --- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs +++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs @@ -9,7 +9,6 @@ using System.Windows; using System.Windows.Input; using System.Windows.Controls; - namespace Flow.Launcher { public partial class CustomQueryHotkeySetting : Window diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs index 43aaa4889..2b6e275df 100644 --- a/Flow.Launcher/HotkeyControl.xaml.cs +++ b/Flow.Launcher/HotkeyControl.xaml.cs @@ -81,8 +81,6 @@ namespace Flow.Launcher } } - - public void SetHotkey(string keyStr, bool triggerValidate = true) { SetHotkey(new HotkeyModel(keyStr), triggerValidate); diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index c8b5e29ec..203248ad6 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -281,6 +281,7 @@ namespace Flow.Launcher API.ShowMainWindow(); } } + private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */ { TextBox textBox = Keyboard.FocusedElement as TextBox; @@ -290,6 +291,5 @@ namespace Flow.Launcher textBox.MoveFocus(tRequest); } } - } } \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml index cc19b57ca..632b6d3a3 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml @@ -19,9 +19,9 @@ Autocomplete Data from: Please select a web search Are you sure you want to delete {0}? - If you have a web search on the service you want to use, you can add it to the Flow. For example, You can check the following formats in the address bar when you search 'casino' on Netflix . "https://www.netflix.com/search?q=Casino" So, you change the search word area as follows. + If you have a web search service you want to use, you can add it to Flow. For example, you can follow the url format in the address bar if you want to search 'casino' on Netflix: "https://www.netflix.com/search?q=Casino". To do this, change the search term 'Casino' as follows. https://www.netflix.com/search?q={q} - And add it to the place URL in this window, then you can search Netflix in Flow. + Add it to the URL section below. You can now search Netflix with Flow using any search terms. diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json index 679f976d3..f83b1e40b 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json @@ -26,7 +26,7 @@ "Name": "Web Searches", "Description": "Provide the web search ability", "Author": "qianlifeng", - "Version": "1.4.0", + "Version": "1.4.1", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.WebSearch.dll", From ad88e3fb34ef7d3e53916d64ac95650ff83ad8e7 Mon Sep 17 00:00:00 2001 From: kubalav Date: Wed, 3 Nov 2021 09:21:10 +0100 Subject: [PATCH 131/206] Update Slovak translation + bump version --- Flow.Launcher/Languages/sk.xaml | 11 +++++++---- Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml | 2 ++ Plugins/Flow.Launcher.Plugin.Sys/plugin.json | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index 51b03db5d..4014d215f 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -49,6 +49,7 @@ Nájsť ďalšie pluginy Zap. Vyp. + Nastavenie kľúčového slova akcie Skratka akcie Aktuálna akcia skratky: Nová akcia skratky: @@ -68,7 +69,8 @@ Motív - Prehliadať viac motívov + Galéria motívov + Ako vytvoriť motív Ahojte Písmo vyhľadávacieho poľa Písmo výsledkov @@ -104,7 +106,7 @@ Povoliť HTTP Proxy HTTP Server Port - Použív. meno + Používateľské meno Heslo Test Proxy Uložiť @@ -145,10 +147,11 @@ Nová skratka pre akciu bola priradená pre iný plugin, prosím, zvoľte inú skratku Úspešné Úspešne dokončené - Použite * ak nechcete určiť skratku pre akciu + Zadajte skratku akcie, ktorá je potrebná na spustenie pluginu. Ak nechcete zadať skratku akcie, použite *. V tom prípade plugin funguje bez kľúčových slov. - Vlastná klávesová skratka pre plugin + Klávesová skratka pre vlastné vyhľadávanie + Stlačením klávesovej skratky sa automaticky vloží zadaný výraz. Náhľad Klávesová skratka je nedostupná, prosím, zadajte novú Neplatná klávesová skratka pluginu diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml index 1b64699cd..f58574854 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml +++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml @@ -8,6 +8,7 @@ Vypnúť počítač Reštartovať počítač + Reštartovať počítač s rozšírenými možnosťami spúšťania pre núdzový režim a režim ladenia, ako aj s ďalšími možnosťami Odhlásiť Zamknúť počítač Zavrieť Flow Launcher @@ -29,6 +30,7 @@ Všetky dáta pluginov aktualizované Naozaj chcete počítač vypnúť? Naozaj chcete počítač reštartovať? + Naozaj chcete počítač reštartovať s pokročilými možnosťami spúšťania? Systémové príkazy Poskytuje príkazy súvisiace so systémom ako je vypnutie, uzamknutie počítača atď. diff --git a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json index 1bfcd92a5..826a1b756 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json @@ -4,7 +4,7 @@ "Name": "System Commands", "Description": "Provide System related commands. e.g. shutdown,lock, setting etc.", "Author": "qianlifeng", - "Version": "1.4.0", + "Version": "1.4.1", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll", From 58ee77f40f2819ee00e0a1f975b86d58b34c9e4e Mon Sep 17 00:00:00 2001 From: kubalav Date: Wed, 3 Nov 2021 09:29:33 +0100 Subject: [PATCH 132/206] Removed extra spaces before chevrons --- Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml | 2 +- Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml index 62f95534a..cb52898f2 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Languages/sk.xaml @@ -14,7 +14,7 @@ Prehliadať Kopírovať URL Kopírovať URL záložky do schránky - Načítať prehliadač z: + Načítať prehliadač z: Názov prehliadača Umiestnenie priečinka Data Pridať diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml index f58574854..42bfcab44 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml +++ b/Plugins/Flow.Launcher.Plugin.Sys/Languages/sk.xaml @@ -8,7 +8,7 @@ Vypnúť počítač Reštartovať počítač - Reštartovať počítač s rozšírenými možnosťami spúšťania pre núdzový režim a režim ladenia, ako aj s ďalšími možnosťami + Reštartovať počítač s rozšírenými možnosťami spúšťania pre núdzový režim a režim ladenia, ako aj s ďalšími možnosťami Odhlásiť Zamknúť počítač Zavrieť Flow Launcher From 0a74766b9a7ee2f727e86c0b9301a640d840560f Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Fri, 5 Nov 2021 07:39:10 +1100 Subject: [PATCH 133/206] remove obsolete comment --- Flow.Launcher.Core/Resource/Theme.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 3abb426cb..6561419a1 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -364,7 +364,6 @@ namespace Flow.Launcher.Core.Resource { var windowHelper = new WindowInteropHelper(w); - // this determines the width of the main query window windowHelper.EnsureHandle(); var accent = new AccentPolicy { AccentState = state }; From 17f8ffed2d8acfa440d606028bb6daa31fb7e86c Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Fri, 5 Nov 2021 08:00:01 +1100 Subject: [PATCH 134/206] version bump BrowserBookmarks plugin --- Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json index 7d124169b..d72db3a90 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json @@ -4,7 +4,7 @@ "Name": "Browser Bookmarks", "Description": "Search your browser bookmarks", "Author": "qianlifeng, Ioannis G.", - "Version": "1.5.2", + "Version": "1.5.3", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.BrowserBookmark.dll", From 6498c6bd53cf87188bcf4782a5841132664c749d Mon Sep 17 00:00:00 2001 From: DB p Date: Fri, 5 Nov 2021 10:12:35 +0900 Subject: [PATCH 135/206] Merge dev for fix conflict --- Flow.Launcher/SettingWindow.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index ad77dee55..f90ebf4f9 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1114,7 +1114,7 @@ - + @@ -1131,7 +1131,7 @@ - Date: Fri, 5 Nov 2021 12:23:46 -0500 Subject: [PATCH 136/206] Reformat xaml code --- Flow.Launcher/SettingWindow.xaml | 1503 ++++++++++++++++++------------ 1 file changed, 900 insertions(+), 603 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index f90ebf4f9..433feeb9f 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1,28 +1,29 @@ - + Icon="Images\app.ico" + Loaded="OnLoaded" + MouseDown="window_MouseDown" + ResizeMode="CanResizeWithGrip" + WindowStartupLocation="CenterScreen" + mc:Ignorable="d"> @@ -32,7 +33,7 @@ - + @@ -46,9 +47,9 @@ - + - + @@ -60,25 +61,25 @@ - - + + - - + - - @@ -768,10 +829,13 @@ - - + + - + - + - - - + + + - - + + - + - - + + @@ -1185,47 +1395,56 @@ - - + + - - + + - + - - + + - - + + - - + + - - - - + + + + @@ -1239,26 +1458,32 @@ - + - - + + - - - - + + + + @@ -1272,8 +1497,11 @@ - + @@ -1282,17 +1510,23 @@ - + - + - - + Click="OpenPluginFolder" + Content="{DynamicResource OpenThemeFolder}" + DockPanel.Dock="Top" /> + @@ -1312,17 +1546,21 @@ - + - + - + @@ -1331,83 +1569,99 @@ - + - + - - + + - + - + - + - + - - + + - + SelectedItem="{Binding Settings.OpenResultModifiers}" /> - - + + - - - + + + - + - - + + Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"> - + - + @@ -1417,21 +1671,31 @@ - - + Margin="5,0,0,0" + Content="{DynamicResource done}" + Click="btnDone_Click" + /> diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index 429ccec49..7ac8dc1cf 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -2,6 +2,7 @@ using Flow.Launcher.ViewModel; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -19,14 +20,43 @@ namespace Flow.Launcher /// /// SelectFileManagerWindow.xaml에 대한 상호 작용 논리 /// - public partial class SelectFileManagerWindow : Window + public partial class SelectFileManagerWindow : Window, INotifyPropertyChanged { + private int selectedCustomExplorerIndex; + + public event PropertyChangedEventHandler PropertyChanged; + public Settings Settings { get; } + public int SelectedCustomExplorerIndex + { + get => selectedCustomExplorerIndex; set + { + selectedCustomExplorerIndex = value; + PropertyChanged?.Invoke(this, new(nameof(CustomExplorer))); + } + } + public List CustomExplorers { get; set; } + + public CustomExplorerViewModel CustomExplorer => CustomExplorers[SelectedCustomExplorerIndex]; public SelectFileManagerWindow(Settings settings) { Settings = settings; + CustomExplorers = Settings.CustomExplorerList.Select(x => x.Copy()).ToList(); + SelectedCustomExplorerIndex = Settings.CustomExplorerIndex; InitializeComponent(); } + + private void btnCancel_Click(object sender, RoutedEventArgs e) + { + Close(); + } + + private void btnDone_Click(object sender, RoutedEventArgs e) + { + Settings.CustomExplorerIndex = SelectedCustomExplorerIndex; + Settings.CustomExplorerList = CustomExplorers; + Close(); + } } } diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8e9bc8042..e8064a421 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -618,7 +618,7 @@ diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml index 9db840ad4..d4cf96e86 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml @@ -1,79 +1,164 @@ - - + + - - - + + + - - - - - + + + + + - - - + + Visibility="{Binding ActionKeywordsVisibility}" /> @@ -1455,8 +1455,8 @@ - + @@ -1840,11 +1840,18 @@ BorderThickness="0" Style="{DynamicResource SettingGroupBox}"> - - + + - + @@ -2060,10 +2067,7 @@ - + Date: Mon, 8 Nov 2021 10:53:13 +0900 Subject: [PATCH 158/206] Change the text to string --- Flow.Launcher/Languages/en.xaml | 2 + Flow.Launcher/SettingWindow.xaml | 2011 +++++++++++++++++------------- 2 files changed, 1174 insertions(+), 839 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 3884d6997..289aec337 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -34,6 +34,8 @@ Maximum results shown Ignore hotkeys in fullscreen mode Disable Flow Launcher activation when a full screen application is active (Recommended for games). + Default File Manager + Select the file manager to use when opening the folder. Python Directory Auto Update Select diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index e8064a421..c567812f8 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -1,29 +1,30 @@ - + @@ -47,9 +48,15 @@ - + - + @@ -115,20 +122,25 @@ - - - + + + @@ -154,20 +166,25 @@ - - - + + + @@ -203,19 +220,21 @@ - - + + @@ -273,19 +292,21 @@ - - + + @@ -341,15 +362,17 @@ - - + + @@ -361,10 +384,11 @@ - + @@ -373,19 +397,22 @@ - - - + + + @@ -397,39 +424,46 @@ - + - + - + - - + + @@ -441,11 +475,12 @@ - + @@ -486,11 +521,12 @@ - + @@ -502,12 +538,16 @@ - - + + @@ -518,15 +558,17 @@ - - + + @@ -538,69 +580,100 @@ - - + + - + - + - + - + - - + + - + - + - - + + - - - + + + @@ -608,43 +681,61 @@ - + - - + + - - -  + +  - + - - + Content="{Binding Settings.CustomExplorer.Name}" /> Date: Mon, 8 Nov 2021 23:26:24 +0900 Subject: [PATCH 165/206] - Adjust Priority Button --- Flow.Launcher/SettingWindow.xaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 049b0aa0c..5c9e80a5a 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -827,7 +827,7 @@ + TextWrapping="WrapWithOverflow"> @@ -838,10 +838,10 @@ VerticalAlignment="Center" FontSize="12" Text="{DynamicResource priority}" /> - + diff --git a/Flow.Launcher/PriorityChangeWindow.xaml.cs b/Flow.Launcher/PriorityChangeWindow.xaml.cs index 0adb1f080..8f392f0a3 100644 --- a/Flow.Launcher/PriorityChangeWindow.xaml.cs +++ b/Flow.Launcher/PriorityChangeWindow.xaml.cs @@ -26,7 +26,6 @@ namespace Flow.Launcher private Settings settings; private readonly Internationalization translater = InternationalizationManager.Instance; private readonly PluginViewModel pluginViewModel; - public PriorityChangeWindow(string pluginId, Settings settings, PluginViewModel pluginViewModel) { InitializeComponent(); @@ -62,8 +61,18 @@ namespace Flow.Launcher private void PriorityChangeWindow_Loaded(object sender, RoutedEventArgs e) { - OldPriority.Text = pluginViewModel.Priority.ToString(); + tbAction.Text = pluginViewModel.Priority.ToString(); + //OldPriority.Text = pluginViewModel.Priority.ToString(); tbAction.Focus(); } + private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */ + { + TextBox textBox = Keyboard.FocusedElement as TextBox; + if (textBox != null) + { + TraversalRequest tRequest = new TraversalRequest(FocusNavigationDirection.Next); + textBox.MoveFocus(tRequest); + } + } } } \ No newline at end of file diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml index 70fb18e2d..cd956d265 100644 --- a/Flow.Launcher/Resources/CustomControlTemplate.xaml +++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml @@ -4,6 +4,535 @@ xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:ui="http://schemas.modernwpf.com/2019"> + + + + + + + + + + + + + + + + + + + + + + + + + + result = dlg.ShowDialog(); + + if (result == true) + { + TextBox path = (TextBox)(((FrameworkElement)sender).Parent as FrameworkElement).FindName("PathTextBox"); + path.Text = dlg.FileName; + path.Focus(); + ((Button)sender).Focus(); + } + } } } From c6054d4c56bdfa6a56193bb920a5a333915eb171 Mon Sep 17 00:00:00 2001 From: DB p Date: Sun, 31 Oct 2021 03:49:23 +0900 Subject: [PATCH 171/206] Add File Manager Item and popup window --- Flow.Launcher/SelectFileManagerWindow.xaml | 58 +++++++++++++++++++ Flow.Launcher/SelectFileManagerWindow.xaml.cs | 27 +++++++++ Flow.Launcher/SettingWindow.xaml | 22 ++++++- Flow.Launcher/SettingWindow.xaml.cs | 6 ++ 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 Flow.Launcher/SelectFileManagerWindow.xaml create mode 100644 Flow.Launcher/SelectFileManagerWindow.xaml.cs diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml new file mode 100644 index 000000000..1a846710f --- /dev/null +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs new file mode 100644 index 000000000..6fcf6feef --- /dev/null +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace Flow.Launcher +{ + /// + /// SelectFileManagerWindow.xaml에 대한 상호 작용 논리 + /// + public partial class SelectFileManagerWindow : Window + { + public SelectFileManagerWindow() + { + InitializeComponent(); + } + } +} diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 433feeb9f..55c650378 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -608,7 +608,27 @@ - + + + + + + + + diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 55c650378..8e9bc8042 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -617,8 +617,17 @@ Style="{DynamicResource SettingSubTitleLabel}" /> - Date: Tue, 2 Nov 2021 15:07:11 -0500 Subject: [PATCH 173/206] Custom Explorer Binding (Part 1) --- .../UserSettings/CustomExplorerViewModel.cs | 17 ++ .../UserSettings/Settings.cs | 25 +++ Flow.Launcher/App.xaml.cs | 2 +- Flow.Launcher/Languages/en.xaml | 3 +- Flow.Launcher/SelectFileManagerWindow.xaml | 208 +++++++++++------- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 9 +- Flow.Launcher/SettingWindow.xaml.cs | 2 +- 7 files changed, 181 insertions(+), 85 deletions(-) create mode 100644 Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs diff --git a/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs new file mode 100644 index 000000000..4fd5e317a --- /dev/null +++ b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Flow.Launcher.ViewModel +{ + public class CustomExplorerViewModel + { + public string Name { get; set; } + public string Path { get; set; } + public string FileArgument { get; set; } = "\"%d\""; + public string DirectoryArgument { get; set; } = "\"%d\""; + public bool Editable { get; init; } = true; + } +} diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 5f9082fe9..53ced1524 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -1,10 +1,12 @@ using System; +using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; using System.Text.Json.Serialization; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedModels; using Flow.Launcher; +using Flow.Launcher.ViewModel; namespace Flow.Launcher.Infrastructure.UserSettings { @@ -37,6 +39,29 @@ namespace Flow.Launcher.Infrastructure.UserSettings public string ResultFontStretch { get; set; } public bool UseGlyphIcons { get; set; } = true; + public CustomExplorerViewModel CustomExplorer { get; set; } + public List CustomExplorerList { get; set; } = new() + { + new() + { + Name = "Explorer", + Path = "explorer", + FileArgument = "/select, \"%f\"", + DirectoryArgument = "\"%d\"", + Editable = false + }, + new() + { + Name = "Total Commander", + Path = @"C:\Program Files\TOTALCMD\totalcommander.exe" + }, + new() + { + Name = "Dopus", + Path = @"c:\programe files\dopus\dopus.exe" + } + }; + /// /// when false Alphabet static service will always return empty results diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 8c869e941..75925b1e0 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -101,7 +101,7 @@ namespace Flow.Launcher API.SaveAppAllSettings(); - _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible; + _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Collapsed : Visibility.Visible; Log.Info("|App.OnStartup|End Flow Launcher startup ---------------------------------------------------- "); }); } diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 9d8e0caa0..e8469763f 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -138,7 +138,8 @@ Please specify the file location of the file manager you using and add arguments (optional) if necessary. File Manager Path - Argument + Argument For Directory + Argument For File Parent Directory Change Priority diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml index 9fb9ee1cd..55eceae27 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -2,112 +2,154 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Flow.Launcher" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ui="http://schemas.modernwpf.com/2019" - xmlns:local="clr-namespace:Flow.Launcher" - mc:Ignorable="d" + Title="{DynamicResource fileManagerWindow}" + Width="500" + Height="420" + Background="#f3f3f3" + DataContext="{Binding RelativeSource={RelativeSource Self}}" + ResizeMode="NoResize" WindowStartupLocation="CenterScreen" - Title="{DynamicResource fileManagerWindow}" Height="420" Width="500" ResizeMode="NoResize" Background="#f3f3f3"> + mc:Ignorable="d"> - + - + - - + + - + - - - - - - - - + + + + + + + + - - + + - + - + - - + + - - - - - - + + + + + + + + @@ -116,10 +158,16 @@ - - diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index 6fcf6feef..429ccec49 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -1,4 +1,6 @@ -using System; +using Flow.Launcher.Infrastructure.UserSettings; +using Flow.Launcher.ViewModel; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -19,8 +21,11 @@ namespace Flow.Launcher /// public partial class SelectFileManagerWindow : Window { - public SelectFileManagerWindow() + public Settings Settings { get; } + + public SelectFileManagerWindow(Settings settings) { + Settings = settings; InitializeComponent(); } } diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index 62ef96b38..38ede8076 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -117,7 +117,7 @@ namespace Flow.Launcher private void OnSelectFileManagerClick(object sender, RoutedEventArgs e) { - SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow(); + SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow(settings); fileManagerChangeWindow.ShowDialog(); } From 6bfebe9fbd77acdfe2075ee644ecfc7addae0b3f Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 5 Nov 2021 12:53:53 -0500 Subject: [PATCH 174/206] Revert a test change --- Flow.Launcher/App.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 75925b1e0..8c869e941 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -101,7 +101,7 @@ namespace Flow.Launcher API.SaveAppAllSettings(); - _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Collapsed : Visibility.Visible; + _mainVM.MainWindowVisibility = _settings.HideOnStartup ? Visibility.Hidden : Visibility.Visible; Log.Info("|App.OnStartup|End Flow Launcher startup ---------------------------------------------------- "); }); } From a69f4a7ea636fd8acc4f2117886bb574f20586d3 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 5 Nov 2021 14:16:20 -0500 Subject: [PATCH 175/206] File Explore Binding (Part 2) --- .../UserSettings/CustomExplorerViewModel.cs | 17 ++++++++-- .../UserSettings/Settings.cs | 8 ++++- Flow.Launcher/SelectFileManagerWindow.xaml | 17 +++++----- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 32 ++++++++++++++++++- Flow.Launcher/SettingWindow.xaml | 2 +- 5 files changed, 63 insertions(+), 13 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs index 4fd5e317a..7806debe1 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/CustomExplorerViewModel.cs @@ -1,4 +1,5 @@ -using System; +using Flow.Launcher.Plugin; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,12 +7,24 @@ using System.Threading.Tasks; namespace Flow.Launcher.ViewModel { - public class CustomExplorerViewModel + public class CustomExplorerViewModel : BaseModel { public string Name { get; set; } public string Path { get; set; } public string FileArgument { get; set; } = "\"%d\""; public string DirectoryArgument { get; set; } = "\"%d\""; public bool Editable { get; init; } = true; + + public CustomExplorerViewModel Copy() + { + return new CustomExplorerViewModel + { + Name = Name, + Path = Path, + FileArgument = FileArgument, + DirectoryArgument = DirectoryArgument, + Editable = Editable + }; + } } } diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 53ced1524..f753a4a1a 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -39,7 +39,13 @@ namespace Flow.Launcher.Infrastructure.UserSettings public string ResultFontStretch { get; set; } public bool UseGlyphIcons { get; set; } = true; - public CustomExplorerViewModel CustomExplorer { get; set; } + public int CustomExplorerIndex { get; set; } = 0; + public CustomExplorerViewModel CustomExplorer + { + get => CustomExplorerList[CustomExplorerIndex]; + set => CustomExplorerList[CustomExplorerIndex] = value; + } + public List CustomExplorerList { get; set; } = new() { new() diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml index 55eceae27..ff472f007 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -53,9 +53,8 @@ Margin="14,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" - ItemsSource="{Binding Settings.CustomExplorerList}" - SelectedIndex="0" - SelectedItem="{Binding Settings.CustomExplorer}"> + ItemsSource="{Binding CustomExplorers}" + SelectedIndex="{Binding SelectedCustomExplorerIndex}"> @@ -66,7 +65,7 @@ @@ -163,13 +162,15 @@ Width="100" Height="30" Margin="0,0,5,0" - Content="{DynamicResource cancel}" /> + Content="{DynamicResource cancel}" + Click="btnCancel_Click"/> + Margin="5,0,0,0" + Content="{DynamicResource done}" + Click="btnDone_Click" + /> diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index 429ccec49..7ac8dc1cf 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -2,6 +2,7 @@ using Flow.Launcher.ViewModel; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -19,14 +20,43 @@ namespace Flow.Launcher /// /// SelectFileManagerWindow.xaml에 대한 상호 작용 논리 /// - public partial class SelectFileManagerWindow : Window + public partial class SelectFileManagerWindow : Window, INotifyPropertyChanged { + private int selectedCustomExplorerIndex; + + public event PropertyChangedEventHandler PropertyChanged; + public Settings Settings { get; } + public int SelectedCustomExplorerIndex + { + get => selectedCustomExplorerIndex; set + { + selectedCustomExplorerIndex = value; + PropertyChanged?.Invoke(this, new(nameof(CustomExplorer))); + } + } + public List CustomExplorers { get; set; } + + public CustomExplorerViewModel CustomExplorer => CustomExplorers[SelectedCustomExplorerIndex]; public SelectFileManagerWindow(Settings settings) { Settings = settings; + CustomExplorers = Settings.CustomExplorerList.Select(x => x.Copy()).ToList(); + SelectedCustomExplorerIndex = Settings.CustomExplorerIndex; InitializeComponent(); } + + private void btnCancel_Click(object sender, RoutedEventArgs e) + { + Close(); + } + + private void btnDone_Click(object sender, RoutedEventArgs e) + { + Settings.CustomExplorerIndex = SelectedCustomExplorerIndex; + Settings.CustomExplorerList = CustomExplorers; + Close(); + } } } diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 8e9bc8042..e8064a421 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -618,7 +618,7 @@ diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml index 9db840ad4..d4cf96e86 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml @@ -1,79 +1,164 @@ - - + + - - - + + + - - - - - + + + + + - - - -  + +  - + - - + Content="{Binding Settings.CustomExplorer.Name}" /> Date: Wed, 10 Nov 2021 08:30:10 +0900 Subject: [PATCH 194/206] Add File Select Dialogue --- Flow.Launcher/SelectFileManagerWindow.xaml | 41 ++++++++++++++----- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 14 +++++++ 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml index 85d0d14ce..68e7b93b2 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -88,7 +88,7 @@ Orientation="Horizontal"> - + @@ -123,16 +123,35 @@ VerticalAlignment="Center" FontSize="14" Text="{DynamicResource fileManager_path}" /> - + + + + result = dlg.ShowDialog(); + + if (result == true) + { + TextBox path = (TextBox)(((FrameworkElement)sender).Parent as FrameworkElement).FindName("PathTextBox"); + path.Text = dlg.FileName; + path.Focus(); + ((Button)sender).Focus(); + } + } } } From b15ec0f83b01c21cc58d61e038c29ed5a81fde17 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 10 Nov 2021 13:39:15 -0600 Subject: [PATCH 195/206] Json Ignore CustomExplorer Property because we don't use that to store value --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index ce07dc0ea..34e86a3ed 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -40,6 +40,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings public bool UseGlyphIcons { get; set; } = true; public int CustomExplorerIndex { get; set; } = 0; + + [JsonIgnore] public CustomExplorerViewModel CustomExplorer { get => CustomExplorerList[CustomExplorerIndex < CustomExplorerList.Count ? CustomExplorerIndex : 0]; From 2ecf57e980c18f940c760e26bf02aebd13b7d498 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 11 Nov 2021 07:17:45 +1100 Subject: [PATCH 196/206] change the default theme for fresh install --- Flow.Launcher.Infrastructure/Constant.cs | 2 +- Flow.Launcher/App.xaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index a5b89c300..564e03638 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -33,7 +33,7 @@ namespace Flow.Launcher.Infrastructure public static readonly string QueryTextBoxIconImagePath = $"{ProgramDirectory}\\Images\\mainsearch.svg"; - public const string DefaultTheme = "Darker"; + public const string DefaultTheme = "Win11Light"; public const string Themes = "Themes"; diff --git a/Flow.Launcher/App.xaml b/Flow.Launcher/App.xaml index 13d88e1c6..34097aa86 100644 --- a/Flow.Launcher/App.xaml +++ b/Flow.Launcher/App.xaml @@ -230,7 +230,7 @@ - + From 000a15e5747bed9d5984e40a74d0428f0ace280e Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 11 Nov 2021 08:06:37 +1100 Subject: [PATCH 197/206] remove commented out code --- Flow.Launcher/PriorityChangeWindow.xaml.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Flow.Launcher/PriorityChangeWindow.xaml.cs b/Flow.Launcher/PriorityChangeWindow.xaml.cs index 8f392f0a3..fe846e78b 100644 --- a/Flow.Launcher/PriorityChangeWindow.xaml.cs +++ b/Flow.Launcher/PriorityChangeWindow.xaml.cs @@ -62,7 +62,6 @@ namespace Flow.Launcher private void PriorityChangeWindow_Loaded(object sender, RoutedEventArgs e) { tbAction.Text = pluginViewModel.Priority.ToString(); - //OldPriority.Text = pluginViewModel.Priority.ToString(); tbAction.Focus(); } private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */ From d3ece3a2e7e23abbb05cca68890faf3986b0dfcc Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 11 Nov 2021 08:15:13 +1100 Subject: [PATCH 198/206] revert changes to sln --- Flow.Launcher.sln | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.sln b/Flow.Launcher.sln index 8e44ab421..21c3b47dc 100644 --- a/Flow.Launcher.sln +++ b/Flow.Launcher.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29806.167 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Test", "Flow.Launcher.Test\Flow.Launcher.Test.csproj", "{FF742965-9A80-41A5-B042-D6C7D3A21708}" ProjectSection(ProjectDependencies) = postProject @@ -163,11 +163,13 @@ Global {403B57F2-1856-4FC7-8A24-36AB346B763E}.Release|x86.ActiveCfg = Release|Any CPU {403B57F2-1856-4FC7-8A24-36AB346B763E}.Release|x86.Build.0 = Release|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|Any CPU.Build.0 = Debug|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x64.ActiveCfg = Debug|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x64.Build.0 = Debug|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x86.ActiveCfg = Debug|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Debug|x86.Build.0 = Debug|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|Any CPU.Build.0 = Release|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x64.ActiveCfg = Release|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x64.Build.0 = Release|Any CPU {1EE20B48-82FB-48A2-8086-675D6DDAB4F0}.Release|x86.ActiveCfg = Release|Any CPU @@ -210,11 +212,13 @@ Global {A3DCCBCA-ACC1-421D-B16E-210896234C26}.Release|x86.ActiveCfg = Release|Any CPU {A3DCCBCA-ACC1-421D-B16E-210896234C26}.Release|x86.Build.0 = Release|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|Any CPU.Build.0 = Debug|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.ActiveCfg = Debug|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.Build.0 = Debug|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x86.ActiveCfg = Debug|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x86.Build.0 = Debug|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|Any CPU.Build.0 = Release|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.ActiveCfg = Release|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.Build.0 = Release|Any CPU {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x86.ActiveCfg = Release|Any CPU @@ -232,11 +236,13 @@ Global {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|x86.ActiveCfg = Release|Any CPU {9B130CC5-14FB-41FF-B310-0A95B6894C37}.Release|x86.Build.0 = Release|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|Any CPU.Build.0 = Debug|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.ActiveCfg = Debug|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.Build.0 = Debug|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x86.ActiveCfg = Debug|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x86.Build.0 = Debug|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|Any CPU.Build.0 = Release|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.ActiveCfg = Release|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.Build.0 = Release|Any CPU {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x86.ActiveCfg = Release|Any CPU From 07905e8d9ce6c9976cbbd8b3a804a7fb0f9ba31f Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 11 Nov 2021 08:40:15 +1100 Subject: [PATCH 199/206] update api description comment --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index 066188882..3abdaf01f 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -192,7 +192,7 @@ namespace Flow.Launcher.Plugin void SaveSettingJsonStorage() where T : new(); /// - /// Open Directory in explorer configured by user + /// Open directory in an explorer configured by user via Flow's Settings. The default is Windows Explorer /// /// Directory Path to open /// Extra FileName Info From d8b4050dd6a6350758fb889168dee30b66602a29 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 11 Nov 2021 08:42:16 +1100 Subject: [PATCH 200/206] remove summary --- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index c648f86ac..4f6fb3439 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -18,9 +18,6 @@ using System.Windows.Shapes; namespace Flow.Launcher { - /// - /// SelectFileManagerWindow.xaml에 대한 상호 작용 논리 - /// public partial class SelectFileManagerWindow : Window, INotifyPropertyChanged { private int selectedCustomExplorerIndex; From e09248fe0a11e498d841f1d472a7583c1d67f2ee Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 11 Nov 2021 08:50:02 +1100 Subject: [PATCH 201/206] bump version for plugins --- Plugins/Flow.Launcher.Plugin.Explorer/plugin.json | 2 +- Plugins/Flow.Launcher.Plugin.Program/plugin.json | 2 +- Plugins/Flow.Launcher.Plugin.Sys/plugin.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json index c525c001b..8d5d97af1 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Explorer/plugin.json @@ -10,7 +10,7 @@ "Name": "Explorer", "Description": "Search and manage files and folders. Explorer utilises Windows Index Search", "Author": "Jeremy Wu", - "Version": "1.9.1", + "Version": "1.10.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Program/plugin.json b/Plugins/Flow.Launcher.Plugin.Program/plugin.json index 5f762f7b6..cbcc00f2b 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Program/plugin.json @@ -4,7 +4,7 @@ "Name": "Program", "Description": "Search programs in Flow.Launcher", "Author": "qianlifeng", - "Version": "1.6.1", + "Version": "1.7.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Program.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json index 826a1b756..42e8058e5 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Sys/plugin.json @@ -4,7 +4,7 @@ "Name": "System Commands", "Description": "Provide System related commands. e.g. shutdown,lock, setting etc.", "Author": "qianlifeng", - "Version": "1.4.1", + "Version": "1.5.0", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Sys.dll", From 994d7eba47500f840b48ecdd5bc139f7b885e3c7 Mon Sep 17 00:00:00 2001 From: DB p Date: Thu, 11 Nov 2021 23:53:54 +0900 Subject: [PATCH 202/206] - Add "%f" tip text and adjust string - Adjust Window Size --- Flow.Launcher/Languages/en.xaml | 5 +++-- Flow.Launcher/SelectFileManagerWindow.xaml | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 289aec337..64f87759d 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -139,11 +139,12 @@ Select File Manager Please specify the file location of the file manager you using and add arguments if necessary. The default arguments is "%d", and a path is entered at that location. For example, If a command is required such as "totalcmd.exe /A c:\windows", Argument is /A "%d". + "%f" is an argument that represent the file path. It is used to emphasize the file/folder name when opening a specific file location in 3rd party file manager. This Argument is only available in the "Arg for File" item. If the file manager does not have that function, you can use "%d". File Manager Profile Name File Manager Path - Arguments For Folder - Arguments For File + Arg For Folder + Arg For File Change Priority diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml b/Flow.Launcher/SelectFileManagerWindow.xaml index 68e7b93b2..eba794c96 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml +++ b/Flow.Launcher/SelectFileManagerWindow.xaml @@ -42,6 +42,12 @@ Text="{DynamicResource fileManager_tips}" TextAlignment="Left" TextWrapping="WrapWithOverflow" /> + + + @@ -88,7 +94,7 @@ Orientation="Horizontal"> - + @@ -126,7 +132,7 @@ + Text="{DynamicResource fileManager_directory_arg}" + TextWrapping="WrapWithOverflow" /> + Text="{DynamicResource fileManager_file_arg}" + TextWrapping="WrapWithOverflow" /> Date: Fri, 12 Nov 2021 07:30:47 +1100 Subject: [PATCH 203/206] update wording --- Flow.Launcher/Languages/en.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 64f87759d..5ca6bdbfd 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -138,8 +138,8 @@ Select File Manager - Please specify the file location of the file manager you using and add arguments if necessary. The default arguments is "%d", and a path is entered at that location. For example, If a command is required such as "totalcmd.exe /A c:\windows", Argument is /A "%d". - "%f" is an argument that represent the file path. It is used to emphasize the file/folder name when opening a specific file location in 3rd party file manager. This Argument is only available in the "Arg for File" item. If the file manager does not have that function, you can use "%d". + Please specify the file location of the file manager you using and add arguments if necessary. The default arguments is "%d", and a path is entered at that location. For example, If a command is required such as "totalcmd.exe /A c:\windows", argument is /A "%d". + "%f" is an argument that represent the file path. It is used to emphasize the file/folder name when opening a specific file location in 3rd party file manager. This argument is only available in the "Arg for File" item. If the file manager does not have that function, you can use "%d". File Manager Profile Name File Manager Path From 30964e1fa6e6faf1e3b755c9ed2316fde4dc9ca1 Mon Sep 17 00:00:00 2001 From: kubalav Date: Fri, 12 Nov 2021 13:27:49 +0100 Subject: [PATCH 204/206] Update Slovak translation --- Flow.Launcher/Languages/sk.xaml | 60 +++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml index 4014d215f..8c0a96f98 100644 --- a/Flow.Launcher/Languages/sk.xaml +++ b/Flow.Launcher/Languages/sk.xaml @@ -1,7 +1,8 @@ - - + Nepodarilo sa registrovať klávesovú skratku {0} Nepodarilo sa spustiť {0} Neplatný formát súboru pre plugin Flow Launchera @@ -15,11 +16,11 @@ Ukončiť Zavrieť - + Nastavenia Flow Launchera Všeobecné Prenosný režim - Uloží všetky nastavenia a používateľské údaje do jedného centrálneho priečinka (Užitočné pri vyberateľných diskoch a cloudových službách). + Uloží všetky nastavenia a používateľské údaje do jedného priečinka (Užitočné pri vyberateľných diskoch a cloudových službách). Spustiť Flow Launcher po štarte systému Schovať Flow Launcher po strate fokusu Nezobrazovať upozornenia na novú verziu @@ -33,6 +34,8 @@ Max. výsledkov Ignorovať klávesové skratky v režime na celú obrazovku Zakázať aktiváciu Flow Launchera, keď je aktívna aplikácia na celú obrazovku (odporúčané pre hry). + Predvolený správca súborov + Vyberte správcu súborov, ktorý sa má použiť pri otváraní priečinka. Priečinok s Pythonom Automatická aktualizácia Vybrať @@ -44,7 +47,7 @@ Umožňuje vyhľadávanie pomocou Pinyin. Pinyin je štandardný systém romanizovaného pravopisu pre transliteráciu čínštiny Efekt tieňa nie je povolený, kým má aktuálny motív povolený efekt rozostrenia - + Pluginy Nájsť ďalšie pluginy Zap. @@ -62,12 +65,12 @@ Čas dopytu: - + Repozitár pluginov Obnoviť Inštalovať - + Motív Galéria motívov Ako vytvoriť motív @@ -81,12 +84,12 @@ Priečinok s motívmi Otvoriť priečinok s motívmi - + Klávesové skratky Klávesová skratka pre Flow Launcher Zadajte skratku na zobrazenie/skrytie Flow Launchera. - Otvoriť výsledok modifikačným klávesom - Vyberte modifikačný kláves na otvorenie výsledku pomocou klávesnice. + Modifikačný kláves na otvorenie výsledkov + Vyberte modifikačný kláves na otvorenie vybraného výsledku pomocou klávesnice. Zobraziť klávesovú skratku Zobrazí klávesovú skratku spolu s výsledkami. Vlastná klávesová skratka na vyhľadávanie @@ -98,10 +101,11 @@ Ste si istý, že chcete odstrániť klávesovú skratku {0} pre plugin? Tieňový efekt v poli vyhľadávania Tieňový efekt významne využíva GPU. Neodporúča sa, ak je výkon počítača obmedzený. + Veľkosť šírky okna Použiť ikony Segoe Fluent Použiť ikony Segoe Fluent, ak sú podporované - + HTTP Proxy Povoliť HTTP Proxy HTTP Server @@ -117,7 +121,7 @@ Nastavenie proxy je v poriadku Pripojenie proxy zlyhalo - + O aplikácii Webstránka Verzia @@ -126,18 +130,28 @@ Je dostupná nová verzia {0}, chcete reštartovať Flow Launcher, aby sa mohol aktualizovať? Kontrola aktualizácií zlyhala, prosím, skontrolujte pripojenie na internet a nastavenie proxy k api.github.com. - Sťahovanie aktualizácií zlyhalo, skontrolujte pripojenie na internet a nastavenie proxy k github-cloud.s3.amazonaws.com, + Sťahovanie aktualizácií zlyhalo, skontrolujte pripojenie na internet a nastavenie proxy k github-cloud.s3.amazonaws.com, alebo prejdite na https://github.com/Flow-Launcher/Flow.Launcher/releases pre manuálne stiahnutie aktualizácie. Poznámky k vydaniu Tipy na používanie: - + + Vyberte správcu súborov + Zadajte umiestnenie súboru správcu súborov, ktorého používate, a v prípade potreby pridajte argumenty. Predvolené argumenty sú "%d" a cesta sa zadáva na tomto mieste. Napríklad, ak sa vyžaduje príkaz, ako napríklad "totalcmd.exe /A c:\windows", argument je /A "%d". + "%f" je argument, ktorý predstavuje cestu k súboru. Používa sa na zvýraznenie názvu súboru/priečinka pri otváraní konkrétneho umiestnenia súboru v správcovi súborov tretej strany. Tento argument je k dispozícii len v položke "Arg pre súbor". Ak správca súborov nemá túto funkciu, môžete použiť "%d". + Správca súborov + Názov profilu + Cesta k správcovi súborov + Arg. pre priečinok + Arg. pre súbor + + Zmena priority Vyššie číslo znamená, že výsledok bude vyššie. Skúste nastaviť napr. 5. Ak chcete, aby boli výsledky nižšie ako ktorékoľvek iné doplnky, zadajte záporné číslo Prosím, zadajte platné číslo pre prioritu! - + Stará skratka akcie Nová skratka akcie Zrušiť @@ -149,7 +163,7 @@ Úspešne dokončené Zadajte skratku akcie, ktorá je potrebná na spustenie pluginu. Ak nechcete zadať skratku akcie, použite *. V tom prípade plugin funguje bez kľúčových slov. - + Klávesová skratka pre vlastné vyhľadávanie Stlačením klávesovej skratky sa automaticky vloží zadaný výraz. Náhľad @@ -157,10 +171,10 @@ Neplatná klávesová skratka pluginu Aktualizovať - + Klávesová skratka nedostupná - + Verzia Čas Prosím, napíšte nám, ako došlo k pádu aplikácie, aby sme to mohli opraviť @@ -176,16 +190,18 @@ Odoslanie hlásenia zlyhalo Flow Launcher zaznamenal chybu - + Čakajte, prosím… - + Kontrolujú sa aktualizácie Už máte najnovšiu verziu Flow Launchera Bola nájdená aktualizácia Aktualizuje sa… - Flow Launcher nedokázal presunúť používateľské údaje do aktualizovanej verzie. - Prosím, presuňte profilový priečinok data z {0} do {1} + + Flow Launcher nedokázal presunúť používateľské údaje do aktualizovanej verzie. + Prosím, presuňte profilový priečinok data z {0} do {1} + Nová aktualizácia Je dostupná nová verzia Flow Launchera {0} Počas inštalácie aktualizácií došlo k chybe From 4ded458abae0dd35df6da342c02c33f931924dbc Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sat, 13 Nov 2021 15:37:23 -0600 Subject: [PATCH 205/206] increase platform required for win10 notification --- Flow.Launcher/Notification.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/Notification.cs b/Flow.Launcher/Notification.cs index 2c82e1451..d8f9fd45e 100644 --- a/Flow.Launcher/Notification.cs +++ b/Flow.Launcher/Notification.cs @@ -11,8 +11,8 @@ namespace Flow.Launcher [System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "")] public static void Show(string title, string subTitle, string iconPath) { - var legacy = Environment.OSVersion.Version.Major < 10; - // Handle notification for win7/8 + var legacy = Environment.OSVersion.Version.Build < 19041; + // Handle notification for win7/8/early win10 if (legacy) { LegacyShow(title, subTitle, iconPath); From 3d97f900336ff57242e8c5ae5ea840b9c93aa94f Mon Sep 17 00:00:00 2001 From: DB p Date: Sun, 14 Nov 2021 14:51:40 +0900 Subject: [PATCH 206/206] Change Plugin/Store Icon Render --- Flow.Launcher/SettingWindow.xaml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 2b5fd2397..fe1704ffe 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -846,7 +846,9 @@ Height="32" Margin="32,0,0,0" FlowDirection="LeftToRight" - Source="{Binding Image, IsAsync=True}" /> + RenderOptions.BitmapScalingMode="HighQuality" + Source="{Binding Image, IsAsync=True}" + Stretch="Uniform" /> - + + + +