diff --git a/Flow.Launcher.Core/Plugin/QueryBuilder.cs b/Flow.Launcher.Core/Plugin/QueryBuilder.cs index 84f36e91a..3dc7877ac 100644 --- a/Flow.Launcher.Core/Plugin/QueryBuilder.cs +++ b/Flow.Launcher.Core/Plugin/QueryBuilder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Flow.Launcher.Plugin; @@ -33,9 +33,13 @@ namespace Flow.Launcher.Core.Plugin searchTerms = terms; } - var query = new Query(rawQuery, search,terms, searchTerms, actionKeyword); - - return query; + return new Query () + { + Search = search, + RawQuery = rawQuery, + SearchTerms = searchTerms, + ActionKeyword = actionKeyword + }; } } } \ No newline at end of file diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index a07975f3c..9b9a9525d 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -133,13 +133,6 @@ namespace Flow.Launcher.Plugin /// List GetAllPlugins(); - /// - /// Fired after global keyboard events - /// if you want to hook something like Ctrl+R, you should use this event - /// - [Obsolete("Unable to Retrieve correct return value")] - event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent; - /// /// Register a callback for Global Keyboard Event /// diff --git a/Flow.Launcher.Plugin/Query.cs b/Flow.Launcher.Plugin/Query.cs index edc5b1277..672285840 100644 --- a/Flow.Launcher.Plugin/Query.cs +++ b/Flow.Launcher.Plugin/Query.cs @@ -6,16 +6,11 @@ namespace Flow.Launcher.Plugin { public Query() { } - /// - /// to allow unit tests for plug ins - /// + [Obsolete("Use the default Query constructor.")] public Query(string rawQuery, string search, string[] terms, string[] searchTerms, string actionKeyword = "") { Search = search; RawQuery = rawQuery; -#pragma warning disable CS0618 - Terms = terms; -#pragma warning restore CS0618 SearchTerms = searchTerms; ActionKeyword = actionKeyword; } @@ -47,28 +42,16 @@ namespace Flow.Launcher.Plugin /// 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; - /// /// Wildcard action keyword. Plugins using this value will be queried on every search. diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index 6810a6d47..dd4497a3c 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -133,12 +133,6 @@ namespace Flow.Launcher.Plugin /// public IList TitleHighlightData { get; set; } - /// - /// Deprecated as of Flow Launcher v1.9.1. Subtitle highlighting is no longer offered - /// - [Obsolete("Deprecated as of Flow Launcher v1.9.1. Subtitle highlighting is no longer offered")] - public IList SubTitleHighlightData { get; set; } - /// /// Query information associated with the result /// diff --git a/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs b/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs index 6588132b9..a7744ffac 100644 --- a/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs +++ b/Flow.Launcher.Plugin/SharedCommands/SearchWeb.cs @@ -1,4 +1,4 @@ -using Microsoft.Win32; +using Microsoft.Win32; using System; using System.Diagnostics; using System.IO; @@ -71,12 +71,6 @@ namespace Flow.Launcher.Plugin.SharedCommands } } - [Obsolete("This is provided for backwards compatibility after 1.9.0 release, e.g. GitHub plugin. Use the new method instead")] - public static void NewBrowserWindow(this string url, string browserPath = "") - { - OpenInBrowserWindow(url, browserPath); - } - /// /// Opens search as a tab in the default browser chosen in Windows settings. /// @@ -111,11 +105,5 @@ namespace Flow.Launcher.Plugin.SharedCommands }); } } - - [Obsolete("This is provided for backwards compatibility after 1.9.0 release, e.g. GitHub plugin. Use the new method instead")] - public static void NewTabInBrowser(this string url, string browserPath = "") - { - OpenInBrowserTab(url, browserPath); - } } } \ No newline at end of file diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index c1a9d8cd2..4312df3c3 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -69,9 +69,6 @@ namespace Flow.Launcher UpdateManager.RestartApp(Constant.ApplicationFileName); } - [Obsolete("Typo")] - public void RestarApp() => RestartApp(); - public void ShowMainWindow() => _mainVM.Show(); public void HideMainWindow() => _mainVM.Hide(); @@ -295,8 +292,6 @@ namespace Flow.Launcher OpenUri(appUri); } - public event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent; - private readonly List> _globalKeyboardHandlers = new(); public void RegisterGlobalKeyboardCallback(Func callback) => _globalKeyboardHandlers.Add(callback); @@ -309,10 +304,6 @@ namespace Flow.Launcher private bool KListener_hookedKeyboardCallback(KeyEvent keyevent, int vkcode, SpecialKeyState state) { var continueHook = true; - if (GlobalKeyboardEvent != null) - { - continueHook = GlobalKeyboardEvent((int)keyevent, vkcode, state); - } foreach (var x in _globalKeyboardHandlers) { continueHook &= x((int)keyevent, vkcode, state);