/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/NewPlus/NewShellExtensionContextMenu/settings.h
51 строка
1 KB
Christian Gaarden Gaardmark
[New+] Hide existing new - remake (#44979)
01 мар 2026, 14:32
Не верифицирован
01 мар 2026, 14:32
90e81cb
Код
Авторство
О чём код?
#pragma once #include "pch.h" class NewSettings { public: NewSettings(); bool GetEnabled(); bool GetHideFileExtension() const; void SetHideFileExtension(const bool hide_file_extension); bool GetHideStartingDigits() const; void SetHideStartingDigits(const bool hide_starting_digits); bool GetReplaceVariables() const; void SetReplaceVariables(const bool resolve_variables); std::wstring GetTemplateLocation() const; void SetTemplateLocation(const std::wstring template_location); bool GetHideBuiltInNew(); void SetHideBuiltInNew(const bool hide_built_in_new); void Save(); void Load(); private: struct Settings { // These values are not used bool enabled{ false }; bool hide_file_extension{ true }; bool hide_starting_digits{ true }; bool replace_variables{ true }; std::wstring template_location; bool hide_built_in_new_preference{ false }; }; void RefreshEnabledState(); void InitializeWithDefaultSettings(); std::wstring GetTemplateLocationDefaultPath() const; void Reload(); void ParseJson(); Settings new_settings; std::wstring general_settings_json_file_path; std::wstring new_settings_json_file_path; FILETIME general_settings_last_loaded_timestamp{}; FILETIME new_settings_last_loaded_timestamp{}; }; NewSettings& NewSettingsInstance();