close #21 Allow user to set their custom ActionKeyword

This commit is contained in:
qianlifeng
2014-07-04 12:08:37 +08:00
parent e275ce6063
commit 7bcbe5d791
6 changed files with 162 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ using System.Reflection;
using System.Windows.Forms;
using Newtonsoft.Json;
using Wox.Helper;
using Wox.Infrastructure.Storage.UserSettings;
using Wox.Plugin;
using Wox.Plugin.SystemPlugins;
@@ -104,6 +105,13 @@ namespace Wox.PluginLoader {
return null;
}
var customizedPluginConfig =
UserSettingStorage.Instance.CustomizedPluginConfigs.FirstOrDefault(o => o.ID == metadata.ID);
if (customizedPluginConfig != null && !string.IsNullOrEmpty(customizedPluginConfig.Actionword))
{
metadata.ActionKeyword = customizedPluginConfig.Actionword;
}
return metadata;
}
}