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