diff --git a/Flow.Launcher.Core/Plugin/QueryBuilder.cs b/Flow.Launcher.Core/Plugin/QueryBuilder.cs
index 9ad6466e9..df336e14b 100644
--- a/Flow.Launcher.Core/Plugin/QueryBuilder.cs
+++ b/Flow.Launcher.Core/Plugin/QueryBuilder.cs
@@ -29,7 +29,6 @@ namespace Flow.Launcher.Core.Plugin
else
{ // non action keyword
actionKeyword = string.Empty;
- actionParameters = terms.ToList();
search = rawQuery;
}
@@ -38,10 +37,7 @@ namespace Flow.Launcher.Core.Plugin
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 3036055ba..99d48275a 100644
--- a/Flow.Launcher.Core/Updater.cs
+++ b/Flow.Launcher.Core/Updater.cs
@@ -16,6 +16,7 @@ using Flow.Launcher.Infrastructure.Http;
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 @@ namespace Flow.Launcher.Core
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 @@ namespace Flow.Launcher.Core
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 @@ namespace Flow.Launcher.Core
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 e0eb60de4..7e24a8206 100644
--- a/Flow.Launcher.Infrastructure/Alphabet.cs
+++ b/Flow.Launcher.Infrastructure/Alphabet.cs
@@ -95,27 +95,6 @@ namespace Flow.Launcher.Infrastructure
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 a96d0e5b3..a8c72fb12 100644
--- a/Flow.Launcher.Infrastructure/Constant.cs
+++ b/Flow.Launcher.Infrastructure/Constant.cs
@@ -27,7 +27,6 @@ namespace Flow.Launcher.Infrastructure
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 78cd4f9ea..3849f6e30 100644
--- a/Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs
+++ b/Flow.Launcher.Infrastructure/Exception/ExceptionFormatter.cs
@@ -67,7 +67,6 @@ namespace Flow.Launcher.Infrastructure.Exception
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 3a756cd26..410d11536 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 000000000..4e68ed1a8
--- /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 3df719b28..000000000
--- 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 ed3a6584d..0bf575337 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
@@ -156,9 +156,8 @@ namespace Flow.Launcher.Infrastructure.Image
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 79ccfd7af..2a4270fb4 100644
--- a/Flow.Launcher.Infrastructure/StringMatcher.cs
+++ b/Flow.Launcher.Infrastructure/StringMatcher.cs
@@ -21,18 +21,6 @@ namespace Flow.Launcher.Infrastructure
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 @@ namespace Flow.Launcher.Infrastructure
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 310c1e33a..e93c341dc 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs
@@ -30,5 +30,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
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 4c47ca425..ccd9beb86 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs
@@ -15,6 +15,16 @@ namespace Flow.Launcher.Infrastructure.UserSettings
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 @@ namespace Flow.Launcher.Infrastructure.UserSettings
{
ID = metadata.ID,
Name = metadata.Name,
+ Version = metadata.Version,
ActionKeywords = metadata.ActionKeywords,
Disabled = metadata.Disabled
};
@@ -39,6 +50,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
{
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 4e1a8d7d8..837fe3b71 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -70,12 +70,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
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 @@ namespace Flow.Launcher.Infrastructure.UserSettings
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 62da96c57..81839d816 100644
--- a/Flow.Launcher.Plugin/Feature.cs
+++ b/Flow.Launcher.Plugin/Feature.cs
@@ -11,23 +11,6 @@ namespace Flow.Launcher.Plugin
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 f60e02a69..000000000
--- 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 57eddd93e..000000000
--- 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 465640ae9..000000000
--- 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 0c69a6b9b..0aacc321b 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 2e754a0ff..681973905 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 @@ namespace Flow.Launcher.Plugin
///
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 @@ namespace Flow.Launcher.Plugin
///
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 fb615459b..d81b442e2 100644
--- a/Flow.Launcher.Plugin/PluginMetadata.cs
+++ b/Flow.Launcher.Plugin/PluginMetadata.cs
@@ -43,9 +43,6 @@ namespace Flow.Launcher.Plugin
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 33310f2aa..1eb5c9c14 100644
--- a/Flow.Launcher.Plugin/Query.cs
+++ b/Flow.Launcher.Plugin/Query.cs
@@ -94,14 +94,5 @@ namespace Flow.Launcher.Plugin
}
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 d210ba1d8..70be1e9dc 100644
--- a/Flow.Launcher.Plugin/Result.cs
+++ b/Flow.Launcher.Plugin/Result.cs
@@ -104,21 +104,6 @@ namespace Flow.Launcher.Plugin
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 98cd777aa..13905788a 100644
--- a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
+++ b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs
@@ -11,6 +11,12 @@ namespace Flow.Launcher.Plugin.SharedCommands
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 @@ namespace Flow.Launcher.Plugin.SharedCommands
///
/// 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 0a1dece4f..0298a4d99 100644
--- a/Flow.Launcher.Test/Plugins/ExplorerTest.cs
+++ b/Flow.Launcher.Test/Plugins/ExplorerTest.cs
@@ -184,6 +184,55 @@ namespace Flow.Launcher.Test.Plugins
$"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 70155a8a0..1dd93b2ba 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 43316cc5b..985d4da87 100644
--- a/Flow.Launcher/App.xaml.cs
+++ b/Flow.Launcher/App.xaml.cs
@@ -118,12 +118,12 @@ namespace Flow.Launcher
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 bf5c7d769..d036c008c 100644
--- a/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
+++ b/Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
@@ -57,7 +57,6 @@ namespace Flow.Launcher
App.API.ChangeQuery(pluginHotkey.ActionKeyword);
Application.Current.MainWindow.Visibility = Visibility.Visible;
});
- MessageBox.Show(InternationalizationManager.Instance.GetTranslation("success"));
}
else
{
@@ -76,7 +75,6 @@ namespace Flow.Launcher
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 3d0263338..94e2ed2bc 100644
--- a/Flow.Launcher/Helper/ErrorReporting.cs
+++ b/Flow.Launcher/Helper/ErrorReporting.cs
@@ -41,8 +41,7 @@ namespace Flow.Launcher.Helper
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 0bf211bd9..adb49b65d 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 530e6443c..23f5d85b7 100644
--- a/Flow.Launcher/PublicAPIInstance.cs
+++ b/Flow.Launcher/PublicAPIInstance.cs
@@ -48,12 +48,6 @@ namespace Flow.Launcher
_mainVM.ChangeQueryText(query);
}
- [Obsolete]
- public void CloseApp()
- {
- Application.Current.MainWindow.Close();
- }
-
public void RestartApp()
{
_mainVM.MainWindowVisibility = Visibility.Hidden;
@@ -90,18 +84,6 @@ namespace Flow.Launcher
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 @@ namespace Flow.Launcher
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 acd992b6c..f8903e891 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 07dd1d81a..1c1f2f9ec 100644
--- a/Flow.Launcher/Themes/BlurWhite.xaml
+++ b/Flow.Launcher/Themes/BlurWhite.xaml
@@ -9,13 +9,10 @@
-
+