diff --git a/Flow.Launcher.Core/Plugin/QueryBuilder.cs b/Flow.Launcher.Core/Plugin/QueryBuilder.cs index 9ad6466e9f3..df336e14b69 100644 --- a/Flow.Launcher.Core/Plugin/QueryBuilder.cs +++ b/Flow.Launcher.Core/Plugin/QueryBuilder.cs @@ -29,7 +29,6 @@ public static Query Build(string text, Dictionary nonGlobalP else { // non action keyword actionKeyword = string.Empty; - actionParameters = terms.ToList(); search = rawQuery; } @@ -38,10 +37,7 @@ public static Query Build(string text, Dictionary nonGlobalP Terms = terms, RawQuery = rawQuery, ActionKeyword = actionKeyword, - Search = search, - // Obsolete value initialisation - ActionName = actionKeyword, - ActionParameters = actionParameters + Search = search }; return query; diff --git a/Flow.Launcher.Core/Updater.cs b/Flow.Launcher.Core/Updater.cs index 3036055ba23..99d48275a45 100644 --- a/Flow.Launcher.Core/Updater.cs +++ b/Flow.Launcher.Core/Updater.cs @@ -16,6 +16,7 @@ using Flow.Launcher.Infrastructure.Logger; using System.IO; using Flow.Launcher.Infrastructure.UserSettings; +using Flow.Launcher.Plugin; namespace Flow.Launcher.Core { @@ -28,11 +29,14 @@ public Updater(string gitHubRepository) GitHubRepository = gitHubRepository; } - public async Task UpdateApp(bool silentIfLatestVersion = true) + public async Task UpdateApp(IPublicAPI api , bool silentUpdate = true) { UpdateManager updateManager; UpdateInfo newUpdateInfo; + if (!silentUpdate) + api.ShowMsg("Please wait...", "Checking for new update"); + try { updateManager = await GitHubUpdateManager(GitHubRepository); @@ -62,12 +66,15 @@ public async Task UpdateApp(bool silentIfLatestVersion = true) if (newReleaseVersion <= currentVersion) { - if (!silentIfLatestVersion) + if (!silentUpdate) MessageBox.Show("You already have the latest Flow Launcher version"); updateManager.Dispose(); return; } - + + if (!silentUpdate) + api.ShowMsg("Update found", "Updating..."); + try { await updateManager.DownloadReleases(newUpdateInfo.ReleasesToApply); @@ -96,11 +103,15 @@ public async Task UpdateApp(bool silentIfLatestVersion = true) var newVersionTips = NewVersinoTips(newReleaseVersion.ToString()); - MessageBox.Show(newVersionTips); Log.Info($"|Updater.UpdateApp|Update success:{newVersionTips}"); // always dispose UpdateManager updateManager.Dispose(); + + if (MessageBox.Show(newVersionTips, "New Update", MessageBoxButton.YesNo) == MessageBoxResult.Yes) + { + UpdateManager.RestartApp(Constant.ApplicationFileName); + } } [UsedImplicitly] diff --git a/Flow.Launcher.Infrastructure/Alphabet.cs b/Flow.Launcher.Infrastructure/Alphabet.cs index e0eb60de40b..7e24a820673 100644 --- a/Flow.Launcher.Infrastructure/Alphabet.cs +++ b/Flow.Launcher.Infrastructure/Alphabet.cs @@ -95,27 +95,6 @@ public void Save() private static string[] EmptyStringArray = new string[0]; private static string[][] Empty2DStringArray = new string[0][]; - [Obsolete("Not accurate, eg 音乐 will not return yinyue but returns yinle ")] - /// - /// replace chinese character with pinyin, non chinese character won't be modified - /// should be word or sentence, instead of single character. e.g. 微软 - /// - public string[] Pinyin(string word) - { - if (!_settings.ShouldUsePinyin) - { - return EmptyStringArray; - } - - var pinyin = word.Select(c => - { - var pinyins = PinyinHelper.toHanyuPinyinStringArray(c); - var result = pinyins == null ? c.ToString() : pinyins[0]; - return result; - }).ToArray(); - return pinyin; - } - /// /// replace chinese character with pinyin, non chinese character won't be modified /// Because we don't have words dictionary, so we can only return all possiblie pinyin combination diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index a96d0e5b3cd..a8c72fb122f 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -27,7 +27,6 @@ public static class Constant public static readonly string ErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.png"); public static string PythonPath; - public static string EverythingSDKPath; public static readonly string QueryTextBoxIconImagePath = $"{ProgramDirectory}\\Images\\mainsearch.png"; diff --git a/Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs b/Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs index 78cd4f9eae8..3849f6e30b0 100644 --- a/Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs +++ b/Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs @@ -67,7 +67,6 @@ private static string CreateExceptionReport(System.Exception ex) sb.AppendLine($"* IntPtr Length: {IntPtr.Size}"); sb.AppendLine($"* x64: {Environment.Is64BitOperatingSystem}"); sb.AppendLine($"* Python Path: {Constant.PythonPath}"); - sb.AppendLine($"* Everything SDK Path: {Constant.EverythingSDKPath}"); sb.AppendLine($"* CLR Version: {Environment.Version}"); sb.AppendLine($"* Installed .NET Framework: "); foreach (var result in GetFrameworkVersionFromRegistry()) diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index 3a756cd26eb..410d11536de 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -38,6 +38,7 @@ + @@ -55,6 +56,7 @@ + diff --git a/Flow.Launcher.Infrastructure/FodyWeavers.xml b/Flow.Launcher.Infrastructure/FodyWeavers.xml new file mode 100644 index 00000000000..4e68ed1a8b6 --- /dev/null +++ b/Flow.Launcher.Infrastructure/FodyWeavers.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Flow.Launcher.Infrastructure/FuzzyMatcher.cs b/Flow.Launcher.Infrastructure/FuzzyMatcher.cs deleted file mode 100644 index 3df719b2886..00000000000 --- a/Flow.Launcher.Infrastructure/FuzzyMatcher.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; - -namespace Flow.Launcher.Infrastructure -{ - [Obsolete("This class is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")] - public class FuzzyMatcher - { - private string query; - private MatchOption opt; - - private FuzzyMatcher(string query, MatchOption opt) - { - this.query = query.Trim(); - this.opt = opt; - } - - public static FuzzyMatcher Create(string query) - { - return new FuzzyMatcher(query, new MatchOption()); - } - - public static FuzzyMatcher Create(string query, MatchOption opt) - { - return new FuzzyMatcher(query, opt); - } - - public MatchResult Evaluate(string str) - { - return StringMatcher.Instance.FuzzyMatch(query, str, opt); - } - } -} diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs index ed3a6584d6f..0bf575337c7 100644 --- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs +++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs @@ -156,9 +156,8 @@ private static ImageResult GetThumbnailResult(ref string path, bool loadFullImag if (Directory.Exists(path)) { /* Directories can also have thumbnails instead of shell icons. - * Generating thumbnails for a bunch of folders while scrolling through - * results from Everything makes a big impact on performance and - * Flow.Launcher responsibility. + * Generating thumbnails for a bunch of folder results while scrolling + * could have a big impact on performance and Flow.Launcher responsibility. * - Solution: just load the icon */ type = ImageType.Folder; diff --git a/Flow.Launcher.Infrastructure/Storage/WoxJsonStorage.cs b/Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs similarity index 100% rename from Flow.Launcher.Infrastructure/Storage/WoxJsonStorage.cs rename to Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs diff --git a/Flow.Launcher.Infrastructure/StringMatcher.cs b/Flow.Launcher.Infrastructure/StringMatcher.cs index 79ccfd7af44..2a4270fb4b2 100644 --- a/Flow.Launcher.Infrastructure/StringMatcher.cs +++ b/Flow.Launcher.Infrastructure/StringMatcher.cs @@ -21,18 +21,6 @@ public StringMatcher(IAlphabet alphabet = null) public static StringMatcher Instance { get; internal set; } - [Obsolete("This method is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")] - public static int Score(string source, string target) - { - return FuzzySearch(target, source).Score; - } - - [Obsolete("This method is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")] - public static bool IsMatch(string source, string target) - { - return Score(source, target) > 0; - } - public static MatchResult FuzzySearch(string query, string stringToCompare) { return Instance.FuzzyMatch(query, stringToCompare); @@ -323,18 +311,6 @@ private int ScoreAfterSearchPrecisionFilter(int rawScore) public class MatchOption { - /// - /// prefix of match char, use for highlight - /// - [Obsolete("this is never used")] - public string Prefix { get; set; } = ""; - - /// - /// suffix of match char, use for highlight - /// - [Obsolete("this is never used")] - public string Suffix { get; set; } = ""; - public bool IgnoreCase { get; set; } = true; } } diff --git a/Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs b/Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs index 310c1e33af2..e93c341dcd7 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs @@ -30,5 +30,6 @@ public static bool PortableDataLocationInUse() } public static readonly string PluginsDirectory = Path.Combine(DataDirectory(), Constant.Plugins); + public static readonly string PluginSettingsDirectory = Path.Combine(DataDirectory(), "Settings", Constant.Plugins); } } diff --git a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs index 4c47ca425d2..ccd9beb868a 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs @@ -15,6 +15,16 @@ public void UpdatePluginSettings(List metadatas) if (Plugins.ContainsKey(metadata.ID)) { var settings = Plugins[metadata.ID]; + + // TODO: Remove. This is one off for 1.2.0 release. + // Introduced a new action keyword in Explorer, so need to update plugin setting in the UserData folder. + // This kind of plugin meta update should be handled by a dedicated method trigger by version bump. + if (metadata.ID == "572be03c74c642baae319fc283e561a8" && metadata.ActionKeywords.Count != settings.ActionKeywords.Count) + settings.ActionKeywords = metadata.ActionKeywords; + + if (string.IsNullOrEmpty(settings.Version)) + settings.Version = metadata.Version; + if (settings.ActionKeywords?.Count > 0) { metadata.ActionKeywords = settings.ActionKeywords; @@ -28,6 +38,7 @@ public void UpdatePluginSettings(List metadatas) { ID = metadata.ID, Name = metadata.Name, + Version = metadata.Version, ActionKeywords = metadata.ActionKeywords, Disabled = metadata.Disabled }; @@ -39,6 +50,7 @@ public class Plugin { public string ID { get; set; } public string Name { get; set; } + public string Version { get; set; } public List ActionKeywords { get; set; } // a reference of the action keywords from plugin manager /// diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 4e1a8d7d86f..837fe3b7164 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -70,12 +70,6 @@ public string QuerySearchPrecisionString public PluginsSettings PluginSettings { get; set; } = new PluginsSettings(); public ObservableCollection CustomPluginHotkeys { get; set; } = new ObservableCollection(); - [Obsolete] - public double Opacity { get; set; } = 1; - - [Obsolete] - public OpacityMode OpacityMode { get; set; } = OpacityMode.Normal; - public bool DontPromptUpdateMsg { get; set; } public bool EnableUpdateLog { get; set; } @@ -108,12 +102,4 @@ public enum LastQueryMode Empty, Preserved } - - [Obsolete] - public enum OpacityMode - { - Normal = 0, - LayeredWindow = 1, - DWM = 2 - } } \ No newline at end of file diff --git a/Flow.Launcher.Plugin/Feature.cs b/Flow.Launcher.Plugin/Feature.cs index 62da96c57cb..81839d81613 100644 --- a/Flow.Launcher.Plugin/Feature.cs +++ b/Flow.Launcher.Plugin/Feature.cs @@ -11,23 +11,6 @@ public interface IContextMenu : IFeatures List LoadContextMenus(Result selectedResult); } - [Obsolete("If a plugin has a action keyword, then it is exclusive. This interface will be remove in v1.3.0")] - public interface IExclusiveQuery : IFeatures - { - [Obsolete("If a plugin has a action keyword, then it is exclusive. This method will be remove in v1.3.0")] - bool IsExclusiveQuery(Query query); - } - - /// - /// Represent plugin query will be executed in UI thread directly. Don't do long-running operation in Query method if you implement this interface - /// This will improve the performance of instant search like websearch or cmd plugin - /// - [Obsolete("Flow Launcher is fast enough now, executed on ui thread is no longer needed")] - public interface IInstantQuery : IFeatures - { - bool IsInstantQuery(string query); - } - /// /// Represent plugins that support internationalization /// diff --git a/Flow.Launcher.Plugin/Features/IContextMenu.cs b/Flow.Launcher.Plugin/Features/IContextMenu.cs deleted file mode 100644 index f60e02a69ec..00000000000 --- a/Flow.Launcher.Plugin/Features/IContextMenu.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace Flow.Launcher.Plugin.Features -{ - [Obsolete("Delete Flow.Launcher.Plugin.Features using directive, " + - "and use Flow.Launcher.Plugin.Feature.IContextMenu instead, " + - "this method will be removed in v1.3.0")] - public interface IContextMenu { } -} \ No newline at end of file diff --git a/Flow.Launcher.Plugin/Features/IExclusiveQuery.cs b/Flow.Launcher.Plugin/Features/IExclusiveQuery.cs deleted file mode 100644 index 57eddd93e9c..00000000000 --- a/Flow.Launcher.Plugin/Features/IExclusiveQuery.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace Flow.Launcher.Plugin.Features -{ - [Obsolete("Delete Flow.Launcher.Plugin.Features using directive, " + - "and use Flow.Launcher.Plugin.Feature.IInstantQuery instead, " + - "this method will be removed in v1.3.0")] - public interface IExclusiveQuery { } -} diff --git a/Flow.Launcher.Plugin/Features/IInstantQuery.cs b/Flow.Launcher.Plugin/Features/IInstantQuery.cs deleted file mode 100644 index 465640ae9d0..00000000000 --- a/Flow.Launcher.Plugin/Features/IInstantQuery.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace Flow.Launcher.Plugin.Features -{ - [Obsolete("Delete Flow.Launcher.Plugin.Features using directive, " + - "and use Flow.Launcher.Plugin.Feature.IInstantQuery instead, " + - "this method will be removed in v1.3.0")] - public interface IInstantQuery { } -} \ No newline at end of file diff --git a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj index 0c69a6b9bb7..0aacc321b14 100644 --- a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj +++ b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj @@ -14,10 +14,10 @@ - 1.1.0 - 1.1.0 - 1.1.0 - 1.1.0 + 1.2.0 + 1.2.0 + 1.2.0 + 1.2.0 Flow.Launcher.Plugin Flow-Launcher MIT diff --git a/Flow.Launcher.Plugin/IPublicAPI.cs b/Flow.Launcher.Plugin/IPublicAPI.cs index 2e754a0ffa1..68197390509 100644 --- a/Flow.Launcher.Plugin/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/IPublicAPI.cs @@ -8,15 +8,6 @@ namespace Flow.Launcher.Plugin /// public interface IPublicAPI { - /// - /// Push result to query box - /// - /// - /// - /// - [Obsolete("This method will be removed in Flow Launcher 1.3")] - void PushResults(Query query, PluginMetadata plugin, List results); - /// /// Change Flow.Launcher query /// @@ -27,42 +18,11 @@ public interface IPublicAPI /// void ChangeQuery(string query, bool requery = false); - /// - /// Just change the query text, this won't raise search - /// - /// - [Obsolete] - void ChangeQueryText(string query, bool selectAll = false); - - /// - /// Close Flow Launcher - /// - [Obsolete] - void CloseApp(); - /// /// Restart Flow Launcher /// void RestartApp(); - /// - /// Restart Flow Launcher - /// - [Obsolete("Use RestartApp instead. This method will be removed in Flow Launcher 1.3")] - void RestarApp(); - - /// - /// Hide Flow Launcher - /// - [Obsolete] - void HideApp(); - - /// - /// Show Flow Launcher - /// - [Obsolete] - void ShowApp(); - /// /// Save all Flow Launcher settings /// @@ -103,18 +63,6 @@ public interface IPublicAPI /// void OpenSettingDialog(); - /// - /// Show loading animation - /// - [Obsolete("automatically start")] - void StartLoadingBar(); - - /// - /// Stop loading animation - /// - [Obsolete("automatically stop")] - void StopLoadingBar(); - /// /// Install Flow Launcher plugin /// diff --git a/Flow.Launcher.Plugin/PluginMetadata.cs b/Flow.Launcher.Plugin/PluginMetadata.cs index fb615459bae..d81b442e250 100644 --- a/Flow.Launcher.Plugin/PluginMetadata.cs +++ b/Flow.Launcher.Plugin/PluginMetadata.cs @@ -43,9 +43,6 @@ public override string ToString() return Name; } - [Obsolete("Use IcoPath")] - public string FullIcoPath => IcoPath; - /// /// Init time include both plugin load time and init time /// diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs index 33310f2aa7c..1eb5c9c1437 100644 --- a/Flow.Launcher.Plugin/Query.cs +++ b/Flow.Launcher.Plugin/Query.cs @@ -94,14 +94,5 @@ private string SplitSearch(int index) } public override string ToString() => RawQuery; - - [Obsolete("Use ActionKeyword, this property will be removed in v1.3.0")] - public string ActionName { get; internal set; } - - [Obsolete("Use Search instead, this property will be removed in v1.3.0")] - public List ActionParameters { get; internal set; } - - [Obsolete("Use Search instead, this method will be removed in v1.3.0")] - public string GetAllRemainingParameter() => Search; } } diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index d210ba1d828..70be1e9dc05 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -104,21 +104,6 @@ public override string ToString() return Title + SubTitle; } - - /// - /// Context menus associate with this result - /// - [Obsolete("Use IContextMenu instead")] - public List ContextMenu { get; set; } - - [Obsolete("Use Object initializer instead")] - public Result(string Title, string IcoPath, string SubTitle = null) - { - this.Title = Title; - this.IcoPath = IcoPath; - this.SubTitle = SubTitle; - } - public Result() { } /// diff --git a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs index 98cd777aac4..13905788a90 100644 --- a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs +++ b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs @@ -11,6 +11,12 @@ public static class FilesFolders private const string FileExplorerProgramEXE = "explorer.exe"; + /// + /// Copies the folder and all of its files and folders + /// including subfolders to the target location + /// + /// + /// public static void Copy(this string sourcePath, string targetPath) { // Get the subdirectories for the specified directory. @@ -172,7 +178,7 @@ public static bool IsLocationPathString(string querySearchString) /// /// Gets the previous level directory from a path string. /// Checks that previous level directory exists and returns it - /// as a path string, or empty string if doesn't exit + /// as a path string, or empty string if doesn't exist /// public static string GetPreviousExistingDirectory(Func locationExists, string path) { diff --git a/Flow.Launcher.Test/Plugins/ExplorerTest.cs b/Flow.Launcher.Test/Plugins/ExplorerTest.cs index 0a1dece4fc3..0298a4d998b 100644 --- a/Flow.Launcher.Test/Plugins/ExplorerTest.cs +++ b/Flow.Launcher.Test/Plugins/ExplorerTest.cs @@ -184,6 +184,55 @@ public void GivenTopLevelDirectorySearch_WhenIndexSearchNotRequired_ThenSearchMe $"Actual number of results is {results.Count} {Environment.NewLine}"); } + [TestCase(@"some words", @"FREETEXT('some words')")] + public void GivenWindowsIndexSearch_WhenQueryWhereRestrictionsIsForFileContentSearch_ThenShouldReturnFreeTextString( + string querySearchString, string expectedString) + { + // Given + var queryConstructor = new QueryConstructor(new Settings()); + + //When + var resultString = queryConstructor.QueryWhereRestrictionsForFileContentSearch(querySearchString); + + // Then + Assert.IsTrue(resultString == expectedString, + $"Expected QueryWhereRestrictions string: {expectedString}{Environment.NewLine} " + + $"Actual string was: {resultString}{Environment.NewLine}"); + } + + [TestCase("some words", "SELECT TOP 100 System.FileName, System.ItemPathDisplay, System.ItemType " + + "FROM SystemIndex WHERE FREETEXT('some words') AND scope='file:'")] + public void GivenWindowsIndexSearch_WhenSearchForFileContent_ThenQueryShouldUseExpectedString( + string userSearchString, string expectedString) + { + // Given + var queryConstructor = new QueryConstructor(new Settings()); + + //When + var resultString = queryConstructor.QueryForFileContentSearch(userSearchString); + + // Then + Assert.IsTrue(resultString == expectedString, + $"Expected query string: {expectedString}{Environment.NewLine} " + + $"Actual string was: {resultString}{Environment.NewLine}"); + } + + public void GivenQuery_WhenActionKeywordForFileContentSearchExists_ThenFileContentSearchRequiredShouldReturnTrue() + { + // Given + var query = new Query { ActionKeyword = "doc:", Search = "search term" }; + + var searchManager = new SearchManager(new Settings(), new PluginInitContext()); + + // When + var result = searchManager.IsFileContentSearch(query.ActionKeyword); + + // Then + Assert.IsTrue(result, + $"Expected True for file content search. {Environment.NewLine} " + + $"Actual result was: {result}{Environment.NewLine}"); + } + [TestCase(@"c:\\", false)] [TestCase(@"i:\", true)] [TestCase(@"\c:\", false)] diff --git a/Flow.Launcher.sln b/Flow.Launcher.sln index 70155a8a09e..1dd93b2ba38 100644 --- a/Flow.Launcher.sln +++ b/Flow.Launcher.sln @@ -13,7 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{3A73 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher", "Flow.Launcher\Flow.Launcher.csproj", "{DB90F671-D861-46BB-93A3-F1304F5BA1C5}" ProjectSection(ProjectDependencies) = postProject - {230AE83F-E92E-4E69-8355-426B305DA9C0} = {230AE83F-E92E-4E69-8355-426B305DA9C0} {1EE20B48-82FB-48A2-8086-675D6DDAB4F0} = {1EE20B48-82FB-48A2-8086-675D6DDAB4F0} {0B9DE348-9361-4940-ADB6-F5953BFFCCEC} = {0B9DE348-9361-4940-ADB6-F5953BFFCCEC} {FDB3555B-58EF-4AE6-B5F1-904719637AB4} = {FDB3555B-58EF-4AE6-B5F1-904719637AB4} @@ -49,8 +48,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.Url", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.Color", "Plugins\Flow.Launcher.Plugin.Color\Flow.Launcher.Plugin.Color.csproj", "{F35190AA-4758-4D9E-A193-E3BDF6AD3567}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Launcher.Plugin.Everything", "Plugins\Flow.Launcher.Plugin.Everything\Flow.Launcher.Plugin.Everything.csproj", "{230AE83F-E92E-4E69-8355-426B305DA9C0}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FFD651C7-0546-441F-BC8C-D4EE8FD01EA7}" ProjectSection(SolutionItems) = preProject .gitattributes = .gitattributes @@ -240,18 +237,6 @@ Global {F35190AA-4758-4D9E-A193-E3BDF6AD3567}.Release|x64.Build.0 = Release|Any CPU {F35190AA-4758-4D9E-A193-E3BDF6AD3567}.Release|x86.ActiveCfg = Release|Any CPU {F35190AA-4758-4D9E-A193-E3BDF6AD3567}.Release|x86.Build.0 = Release|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Debug|x64.ActiveCfg = Debug|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Debug|x64.Build.0 = Debug|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Debug|x86.ActiveCfg = Debug|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Debug|x86.Build.0 = Debug|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Release|Any CPU.Build.0 = Release|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Release|x64.ActiveCfg = Release|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Release|x64.Build.0 = Release|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.Release|x86.ActiveCfg = Release|Any CPU - {230AE83F-E92E-4E69-8355-426B305DA9C0}.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 @@ -325,7 +310,6 @@ Global {0B9DE348-9361-4940-ADB6-F5953BFFCCEC} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} {A3DCCBCA-ACC1-421D-B16E-210896234C26} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} {F35190AA-4758-4D9E-A193-E3BDF6AD3567} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} - {230AE83F-E92E-4E69-8355-426B305DA9C0} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} {9B130CC5-14FB-41FF-B310-0A95B6894C37} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} {59BD9891-3837-438A-958D-ADC7F91F6F7E} = {3A73F5A7-0335-40D8-BF7C-F20BE5D0BA87} diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 43316cc5b82..985d4da8707 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -118,12 +118,12 @@ private void AutoUpdates() var timer = new Timer(1000 * 60 * 60 * 5); timer.Elapsed += async (s, e) => { - await _updater.UpdateApp(); + await _updater.UpdateApp(API); }; timer.Start(); // check updates on startup - await _updater.UpdateApp(); + await _updater.UpdateApp(API); } }); } diff --git a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs index bf5c7d7691c..d036c008c58 100644 --- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs +++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs @@ -57,7 +57,6 @@ private void btnAdd_OnClick(object sender, RoutedEventArgs e) App.API.ChangeQuery(pluginHotkey.ActionKeyword); Application.Current.MainWindow.Visibility = Visibility.Visible; }); - MessageBox.Show(InternationalizationManager.Instance.GetTranslation("success")); } else { @@ -76,7 +75,6 @@ private void btnAdd_OnClick(object sender, RoutedEventArgs e) App.API.ChangeQuery(updateCustomHotkey.ActionKeyword); Application.Current.MainWindow.Visibility = Visibility.Visible; }); - MessageBox.Show(InternationalizationManager.Instance.GetTranslation("success")); } Close(); diff --git a/Flow.Launcher/Helper/ErrorReporting.cs b/Flow.Launcher/Helper/ErrorReporting.cs index 3d02633381c..94e2ed2bc65 100644 --- a/Flow.Launcher/Helper/ErrorReporting.cs +++ b/Flow.Launcher/Helper/ErrorReporting.cs @@ -41,8 +41,7 @@ public static string RuntimeInfo() public static string DependenciesInfo() { - var info = $"\nPython Path: {Constant.PythonPath}" + - $"\nEverything SDK Path: {Constant.EverythingSDKPath}"; + var info = $"\nPython Path: {Constant.PythonPath}"; return info; } } diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 0bf211bd9a5..adb49b65dee 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -96,7 +96,7 @@ Version You have activated Flow Launcher {0} times Check for Updates - New version {0} is available, please restart Flow Launcher. + New version {0} is available, would you like to restart Flow Launcher to use the update? Check updates failed, please check your connection and proxy settings to api.github.com. Download updates failed, please check your connection and proxy settings to github-cloud.s3.amazonaws.com, @@ -111,7 +111,7 @@ Done Can't find specified plugin New Action Keyword can't be empty - New Action Keywords have been assigned to another plugin, please assign other new action keyword + This new Action Keyword is already assigned to another plugin, please choose a different one Success Use * if you don't want to specify an action keyword diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 530e6443cda..23f5d85b704 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -48,12 +48,6 @@ public void ChangeQueryText(string query, bool selectAll = false) _mainVM.ChangeQueryText(query); } - [Obsolete] - public void CloseApp() - { - Application.Current.MainWindow.Close(); - } - public void RestartApp() { _mainVM.MainWindowVisibility = Visibility.Hidden; @@ -90,18 +84,6 @@ public void ReloadAllPluginData() PluginManager.ReloadData(); } - [Obsolete] - public void HideApp() - { - _mainVM.MainWindowVisibility = Visibility.Hidden; - } - - [Obsolete] - public void ShowApp() - { - _mainVM.MainWindowVisibility = Visibility.Visible; - } - public void ShowMsg(string title, string subTitle = "", string iconPath = "") { ShowMsg(title, subTitle, iconPath, true); @@ -151,21 +133,6 @@ public List GetAllPlugins() public event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent; - [Obsolete("This will be removed in Flow Launcher 1.3")] - public void PushResults(Query query, PluginMetadata plugin, List results) - { - results.ForEach(o => - { - o.PluginDirectory = plugin.PluginDirectory; - o.PluginID = plugin.ID; - o.OriginQuery = query; - }); - Task.Run(() => - { - _mainVM.UpdateResultView(results, plugin, query); - }); - } - #endregion #region Private Methods diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index acd992b6c6d..f8903e891aa 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -248,12 +248,13 @@ - - - + + diff --git a/Flow.Launcher/Themes/BlurWhite.xaml b/Flow.Launcher/Themes/BlurWhite.xaml index 07dd1d81aa7..1c1f2f9ec29 100644 --- a/Flow.Launcher/Themes/BlurWhite.xaml +++ b/Flow.Launcher/Themes/BlurWhite.xaml @@ -9,13 +9,10 @@ - +