mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Merge branch 'json-rpc'
This commit is contained in:
@@ -59,7 +59,7 @@ namespace Wox.Plugin.SystemPlugins.CMD
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
context.PushResults(query, new List<Result>() { result });
|
||||
context.API.PushResults(query,context.CurrentPluginMetadata, new List<Result>() { result });
|
||||
pushedResults.Add(result);
|
||||
|
||||
IEnumerable<Result> history = CMDStorage.Instance.CMDHistory.Where(o => o.Key.Contains(cmd))
|
||||
@@ -95,7 +95,7 @@ namespace Wox.Plugin.SystemPlugins.CMD
|
||||
return ret;
|
||||
}).Where(o => o != null).Take(4);
|
||||
|
||||
context.PushResults(query, history.ToList());
|
||||
context.API.PushResults(query,context.CurrentPluginMetadata,history.ToList());
|
||||
pushedResults.AddRange(history);
|
||||
|
||||
try
|
||||
|
||||
@@ -11,11 +11,13 @@ namespace Wox.Plugin.SystemPlugins
|
||||
public class ThirdpartyPluginIndicator : BaseSystemPlugin
|
||||
{
|
||||
private List<PluginPair> allPlugins = new List<PluginPair>();
|
||||
private Action<string> changeQuery;
|
||||
private PluginInitContext context;
|
||||
|
||||
protected override List<Result> QueryInternal(Query query)
|
||||
{
|
||||
List<Result> results = new List<Result>();
|
||||
if(allPlugins.Count == 0) allPlugins = context.API.GetAllPlugins();
|
||||
|
||||
|
||||
foreach (PluginMetadata metadata in allPlugins.Select(o => o.Metadata))
|
||||
{
|
||||
@@ -36,7 +38,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
IcoPath = "Images/work.png",
|
||||
Action = (c) =>
|
||||
{
|
||||
changeQuery(metadataCopy.ActionKeyword + " ");
|
||||
context.ChangeQuery(metadataCopy.ActionKeyword + " ");
|
||||
return false;
|
||||
},
|
||||
};
|
||||
@@ -52,7 +54,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
IcoPath = "Images/work.png",
|
||||
Action = (c) =>
|
||||
{
|
||||
changeQuery(n.ActionWord + " ");
|
||||
context.ChangeQuery(n.ActionWord + " ");
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
@@ -62,8 +64,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
|
||||
protected override void InitInternal(PluginInitContext context)
|
||||
{
|
||||
allPlugins = context.Plugins;
|
||||
changeQuery = context.ChangeQuery;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
Score = 8,
|
||||
Action = _ =>
|
||||
{
|
||||
Process.Start(raw);
|
||||
Process.Start(uri.AbsoluteUri);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
title = subtitle;
|
||||
subtitle = null;
|
||||
}
|
||||
context.PushResults(query, new List<Result>()
|
||||
context.API.PushResults(query,context.CurrentPluginMetadata, new List<Result>()
|
||||
{
|
||||
new Result()
|
||||
{
|
||||
@@ -54,7 +54,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
var result = sugg.GetSuggestions(keyword);
|
||||
if (result != null)
|
||||
{
|
||||
context.PushResults(query, result.Select(o => new Result()
|
||||
context.API.PushResults(query,context.CurrentPluginMetadata, result.Select(o => new Result()
|
||||
{
|
||||
Title = o,
|
||||
SubTitle = subtitle,
|
||||
|
||||
Reference in New Issue
Block a user