Fix added websearch twice issue.

This commit is contained in:
qianlifeng
2014-03-23 18:14:46 +08:00
parent 1a5bc2ddfe
commit d8536c20b0
3 changed files with 19 additions and 14 deletions

View File

@@ -39,18 +39,6 @@ namespace Wox.Infrastructure.Storage.UserSettings
[JsonProperty]
public bool EnablePythonPlugins { get; set; }
public UserSettingStorage()
{
EnablePythonPlugins = true;
Theme = "Dark";
ReplaceWinR = true;
WebSearches = LoadDefaultWebSearches();
ProgramSources = LoadDefaultProgramSources();
Hotkey = "Alt + Space";
QueryBoxFont = FontFamily.GenericSansSerif.Name;
ResultItemFont = FontFamily.GenericSansSerif.Name;
}
public List<WebSearch> LoadDefaultWebSearches()
{
List<WebSearch> webSearches = new List<WebSearch>();
@@ -107,5 +95,17 @@ namespace Wox.Infrastructure.Storage.UserSettings
{
get { return "config"; }
}
protected override void LoadDefaultConfig()
{
EnablePythonPlugins = true;
Theme = "Dark";
ReplaceWinR = true;
WebSearches = LoadDefaultWebSearches();
ProgramSources = LoadDefaultProgramSources();
Hotkey = "Alt + Space";
QueryBoxFont = FontFamily.GenericSansSerif.Name;
ResultItemFont = FontFamily.GenericSansSerif.Name;
}
}
}