mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
clear obsolete code from Flow.Launcher.Plugin
This commit is contained in:
parent
a48f06019e
commit
340dc3c8bf
6 changed files with 10 additions and 57 deletions
|
|
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -133,13 +133,6 @@ namespace Flow.Launcher.Plugin
|
|||
/// <returns></returns>
|
||||
List<PluginPair> GetAllPlugins();
|
||||
|
||||
/// <summary>
|
||||
/// Fired after global keyboard events
|
||||
/// if you want to hook something like Ctrl+R, you should use this event
|
||||
/// </summary>
|
||||
[Obsolete("Unable to Retrieve correct return value")]
|
||||
event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent;
|
||||
|
||||
/// <summary>
|
||||
/// Register a callback for Global Keyboard Event
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -6,16 +6,11 @@ namespace Flow.Launcher.Plugin
|
|||
{
|
||||
public Query() { }
|
||||
|
||||
/// <summary>
|
||||
/// to allow unit tests for plug ins
|
||||
/// </summary>
|
||||
[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
|
|||
/// </summary>
|
||||
public string[] SearchTerms { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The raw query split into a string array
|
||||
/// </summary>
|
||||
[Obsolete("It may or may not include action keyword, which can be confusing. Use SearchTerms instead")]
|
||||
public string[] Terms { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Query can be splited into multiple terms by whitespace
|
||||
/// </summary>
|
||||
public const string TermSeparator = " ";
|
||||
|
||||
[Obsolete("Typo")]
|
||||
public const string TermSeperater = TermSeparator;
|
||||
|
||||
/// <summary>
|
||||
/// User can set multiple action keywords seperated by ';'
|
||||
/// </summary>
|
||||
public const string ActionKeywordSeparator = ";";
|
||||
|
||||
[Obsolete("Typo")]
|
||||
public const string ActionKeywordSeperater = ActionKeywordSeparator;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Wildcard action keyword. Plugins using this value will be queried on every search.
|
||||
|
|
|
|||
|
|
@ -133,12 +133,6 @@ namespace Flow.Launcher.Plugin
|
|||
/// </summary>
|
||||
public IList<int> TitleHighlightData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Deprecated as of Flow Launcher v1.9.1. Subtitle highlighting is no longer offered
|
||||
/// </summary>
|
||||
[Obsolete("Deprecated as of Flow Launcher v1.9.1. Subtitle highlighting is no longer offered")]
|
||||
public IList<int> SubTitleHighlightData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Query information associated with the result
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens search as a tab in the default browser chosen in Windows settings.
|
||||
/// </summary>
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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<Func<int, int, SpecialKeyState, bool>> _globalKeyboardHandlers = new();
|
||||
|
||||
public void RegisterGlobalKeyboardCallback(Func<int, int, SpecialKeyState, bool> 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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue