mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Misc
1. Rename 2. Fix progress bar: progress bar should not be loaded when only white spaces typed
This commit is contained in:
@@ -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)))
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user