mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-03 03:19:08 +08:00
Fix added websearch twice issue.
This commit is contained in:
parent
1a5bc2ddfe
commit
d8536c20b0
@ -36,6 +36,8 @@ namespace Wox.Infrastructure.Storage
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void LoadDefaultConfig() { }
|
||||
|
||||
private void Load()
|
||||
{
|
||||
string configPath = Path.Combine(configFolder, ConfigName + fileSuffix);
|
||||
@ -55,8 +57,13 @@ namespace Wox.Infrastructure.Storage
|
||||
catch (Exception)
|
||||
{
|
||||
//no-op
|
||||
LoadDefaultConfig();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadDefaultConfig();
|
||||
}
|
||||
}
|
||||
|
||||
public void Save()
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,8 +93,6 @@ namespace Wox
|
||||
//DwmDropShadow.DropShadowToWindow(this);
|
||||
|
||||
WindowIntelopHelper.DisableControlBox(this);
|
||||
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user