This commit is contained in:
bao-qian 2016-06-23 00:03:01 +01:00
parent 759d0a825b
commit 47f396cfce

View File

@ -266,6 +266,10 @@ namespace Wox.Core.Plugin
}
}
/// <summary>
/// used to add action keyword for multiple action keyword plugin
/// e.g. web search
/// </summary>
public static void AddActionKeyword(string id, string newActionKeyword)
{
var plugin = GetPluginForId(id);
@ -277,11 +281,13 @@ namespace Wox.Core.Plugin
{
NonGlobalPlugins[newActionKeyword] = plugin;
}
AllPlugins.Add(plugin);
plugin.Metadata.ActionKeywords.Add(newActionKeyword);
}
/// <summary>
/// used to add action keyword for multiple action keyword plugin
/// e.g. web search
/// </summary>
public static void RemoveActionKeyword(string id, string oldActionkeyword)
{
var plugin = GetPluginForId(id);
@ -293,8 +299,6 @@ namespace Wox.Core.Plugin
{
NonGlobalPlugins.Remove(oldActionkeyword);
}
AllPlugins.Remove(plugin);
plugin.Metadata.ActionKeywords.Remove(oldActionkeyword);
}