mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
[WindowsSettings] DevDocs + JSON schema (#13510)
* #10997 - Added JSON schema and extra shell class * #13510 - Address feedback and fix wrong typo for a member * #13510 - Add DevDoc (first version) * #13510 - make spellcheck happy * #13510 Address feedback, add scores, replace todos * Make build server happy * #13510 - Address feedback - Extra table for keys * #13510 - Address feedback * #13510 -Address feedback, add language specified Co-authored-by: Sekan, Tobias <tobias.sekan@axp-consulting.de>
This commit is contained in:
@@ -49,9 +49,9 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings
|
||||
private bool _disposed;
|
||||
|
||||
/// <summary>
|
||||
/// List that contain all settings.
|
||||
/// A class that contain all possible windows settings.
|
||||
/// </summary>
|
||||
private IEnumerable<WindowsSetting>? _settingsList;
|
||||
private WindowsSettings? _windowsSettings;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Main"/> class.
|
||||
@@ -82,11 +82,12 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings
|
||||
_context.API.ThemeChanged += OnThemeChanged;
|
||||
UpdateIconPath(_context.API.GetCurrentTheme());
|
||||
|
||||
_settingsList = JsonSettingsListHelper.ReadAllPossibleSettings();
|
||||
_settingsList = UnsupportedSettingsHelper.FilterByBuild(_settingsList);
|
||||
_windowsSettings = JsonSettingsListHelper.ReadAllPossibleSettings();
|
||||
|
||||
TranslationHelper.TranslateAllSettings(_settingsList);
|
||||
WindowsSettingsPathHelper.GenerateSettingsPathValues(_settingsList);
|
||||
UnsupportedSettingsHelper.FilterByBuild(_windowsSettings);
|
||||
|
||||
TranslationHelper.TranslateAllSettings(_windowsSettings);
|
||||
WindowsSettingsPathHelper.GenerateSettingsPathValues(_windowsSettings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -95,13 +96,13 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings
|
||||
/// <param name="query">The query to filter the list.</param>
|
||||
/// <returns>A filtered list, can be empty when nothing was found.</returns>
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
if (_settingsList is null)
|
||||
{
|
||||
if (_windowsSettings?.Settings is null)
|
||||
{
|
||||
return new List<Result>(0);
|
||||
}
|
||||
|
||||
var filteredList = _settingsList
|
||||
var filteredList = _windowsSettings.Settings
|
||||
.Where(Predicate)
|
||||
.OrderBy(found => found.Name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user