mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Fix setting for multiple action keywords
1. completed rewrite the action keyword setting logic. 2. Fix setting for multiple action keywords in #352 3. Fix setting for Web Search plugin
This commit is contained in:
@@ -38,4 +38,17 @@ namespace Wox.Plugin
|
||||
|
||||
string GetTranslatedPluginDescription();
|
||||
}
|
||||
|
||||
public interface IMultipleActionKeywords
|
||||
{
|
||||
event ActionKeywordsChangedEventHandler ActionKeywordsChanged;
|
||||
}
|
||||
|
||||
public class ActionKeywordsChangedEventArgs : EventArgs
|
||||
{
|
||||
public string OldActionKeyword { get; set; }
|
||||
public string NewActionKeyword { get; set; }
|
||||
}
|
||||
|
||||
public delegate void ActionKeywordsChangedEventHandler(IMultipleActionKeywords sender, ActionKeywordsChangedEventArgs e);
|
||||
}
|
||||
|
||||
@@ -15,5 +15,24 @@
|
||||
{
|
||||
return Metadata.Name;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
PluginPair r = obj as PluginPair;
|
||||
if (r != null)
|
||||
{
|
||||
return string.Equals(r.Metadata.ID, Metadata.ID);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var hashcode = Metadata.ID?.GetHashCode() ?? 0;
|
||||
return hashcode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,8 @@ namespace Wox.Plugin
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (Title?.GetHashCode() ?? 0) ^ (SubTitle?.GetHashCode() ?? 0);
|
||||
var hashcode = (Title?.GetHashCode() ?? 0) ^ (SubTitle?.GetHashCode() ?? 0);
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
Reference in New Issue
Block a user