1. Rename
2. Fix progress bar: progress bar should not be loaded when only white
spaces typed
This commit is contained in:
bao-qian
2015-11-05 20:44:14 +00:00
parent a07d6aa1e7
commit 99d9d14d3b
8 changed files with 60 additions and 54 deletions

View File

@@ -15,7 +15,7 @@ namespace Wox
public ActionKeywords(string pluginId)
{
InitializeComponent();
PluginPair plugin = PluginManager.GetPlugin(pluginId);
PluginPair plugin = PluginManager.GetPluginForId(pluginId);
if (plugin == null)
{
MessageBox.Show(InternationalizationManager.Instance.GetTranslation("cannotFindSpecifiedPlugin"));
@@ -47,7 +47,7 @@ namespace Wox
var actionKeywords = tbAction.Text.Trim().Split(new[] { Query.ActionKeywordSeperater }, StringSplitOptions.RemoveEmptyEntries).ToArray();
//check new action keyword didn't used by other plugin
if (actionKeywords[0] != Query.WildcardSign && PluginManager.AllPlugins.
if (actionKeywords[0] != Query.GlobalPluginWildcardSign && PluginManager.AllPlugins.
SelectMany(p => p.Metadata.ActionKeywords).
Any(k => actionKeywords.Contains(k)))
{

View File

@@ -464,7 +464,7 @@ namespace Wox
Query(tbQuery.Text);
Dispatcher.DelayInvoke("ShowProgressbar", () =>
{
if (!queryHasReturn && !string.IsNullOrEmpty(tbQuery.Text) && tbQuery.Text != lastQuery)
if (!string.IsNullOrEmpty(tbQuery.Text.Trim()) && tbQuery.Text != lastQuery && !queryHasReturn)
{
StartProgress();
}
@@ -873,10 +873,10 @@ namespace Wox
private void ShowContextMenu(Result result)
{
List<Result> results = PluginManager.GetPluginContextMenus(result);
List<Result> results = PluginManager.GetContextMenusForPlugin(result);
results.ForEach(o =>
{
o.PluginDirectory = PluginManager.GetPlugin(result.PluginID).Metadata.PluginDirectory;
o.PluginDirectory = PluginManager.GetPluginForId(result.PluginID).Metadata.PluginDirectory;
o.PluginID = result.PluginID;
o.OriginQuery = result.OriginQuery;
});

View File

@@ -605,7 +605,7 @@ namespace Wox
string id = pair.Metadata.ID;
ActionKeywords changeKeywordsWindow = new ActionKeywords(id);
changeKeywordsWindow.ShowDialog();
PluginPair plugin = PluginManager.GetPlugin(id);
PluginPair plugin = PluginManager.GetPluginForId(id);
if (plugin != null) pluginActionKeywords.Text = string.Join(Query.ActionKeywordSeperater, pair.Metadata.ActionKeywords);
}
}