mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Remove enable property from model
This commit is contained in:
@@ -57,7 +57,6 @@ namespace Wox.Plugin.Program
|
||||
Location = Directory.Text,
|
||||
MaxDepth = max,
|
||||
Suffixes = Suffixes.Text.Split(ProgramSource.SuffixSeperator),
|
||||
Enabled = true
|
||||
};
|
||||
_settings.ProgramSources.Add(source);
|
||||
}
|
||||
|
||||
@@ -150,27 +150,17 @@ namespace Wox.Plugin.Program
|
||||
|
||||
private static List<ProgramSource> ProgramSources()
|
||||
{
|
||||
var sources = new List<ProgramSource>
|
||||
var sources = new List<ProgramSource>();
|
||||
if (_settings.EnableStartMenuSource)
|
||||
{
|
||||
new CommonStartMenuProgramSource
|
||||
{
|
||||
Enabled = _settings.EnableStartMenuSource,
|
||||
},
|
||||
new UserStartMenuProgramSource
|
||||
{
|
||||
Enabled = _settings.EnableStartMenuSource,
|
||||
},
|
||||
new AppPathsProgramSource
|
||||
{
|
||||
Enabled = _settings.EnableRegistrySource,
|
||||
}
|
||||
};
|
||||
|
||||
if (_settings.ProgramSources.Count(o => o.Enabled) > 0)
|
||||
{
|
||||
sources.AddRange(_settings.ProgramSources);
|
||||
sources.Add(new CommonStartMenuProgramSource());
|
||||
sources.Add(new UserStartMenuProgramSource());
|
||||
}
|
||||
|
||||
if (_settings.EnableRegistrySource)
|
||||
{
|
||||
sources.Add(new AppPathsProgramSource());
|
||||
}
|
||||
sources.AddRange(_settings.ProgramSources);
|
||||
return sources;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,6 @@ namespace Wox.Plugin.Program
|
||||
_settings.ProgramSources.Add(new FileSystemProgramSource
|
||||
{
|
||||
Location = s,
|
||||
Enabled = true
|
||||
});
|
||||
|
||||
ReIndexing();
|
||||
|
||||
@@ -10,7 +10,6 @@ namespace Wox.Plugin.Program.ProgramSources
|
||||
{
|
||||
public const char SuffixSeperator = ';';
|
||||
|
||||
public bool Enabled { get; set; } = true;
|
||||
// happlebao todo: temp hack for program suffixes
|
||||
public string[] Suffixes { get; set; } = {"bat", "appref-ms", "exe", "lnk"};
|
||||
public int MaxDepth { get; set; } = -1;
|
||||
|
||||
Reference in New Issue
Block a user