Merge pull request #211 from JohnTheGr8/dev

Display plugin icons
This commit is contained in:
qianlifeng 2014-12-10 09:43:31 +08:00
commit 125c5523e6
3 changed files with 6 additions and 4 deletions

View File

@ -209,7 +209,7 @@ namespace Wox.Plugin.PluginManagement
{
Title = plugin.Name,
SubTitle = plugin.Description,
IcoPath = "Images\\plugin.png",
IcoPath = plugin.FullIcoPath,
Action = e =>
{
UnInstalledPlugins(plugin);
@ -239,7 +239,7 @@ namespace Wox.Plugin.PluginManagement
{
Title = plugin.Name + " - " + plugin.ActionKeyword,
SubTitle = plugin.Description,
IcoPath = "Images\\plugin.png"
IcoPath = plugin.FullIcoPath
});
}
return results;

View File

@ -35,7 +35,7 @@ namespace Wox.Plugin.SystemPlugins
Title = metadata.ActionKeyword,
SubTitle = string.Format("Activate {0} plugin", metadata.Name),
Score = 100,
IcoPath = "Images/work.png",
IcoPath = metadata.FullIcoPath,
Action = (c) =>
{
context.API.ChangeQuery(metadataCopy.ActionKeyword + " ");

View File

@ -52,7 +52,9 @@ namespace Wox.Plugin
{
get
{
if (string.IsNullOrEmpty(IcoPath)) return string.Empty;
// Return the default icon if IcoPath is empty
if (string.IsNullOrEmpty(IcoPath))
return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Images\\work.png");
if (IcoPath.StartsWith("data:"))
{