mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Non localized module name (#7170)
* Added get_key to powertoysmodule interface * Replace get_name with get_key * Implement get_key function in modules * Make key global constant in each module * Update settings v1 to use key to load and save files * Fixed fancyzones and preview pane unit tests * Removed setings unit test as the case is not covered anymore * Add constant files for modules and use it to reference module key * Add constant string files to colorpicker, launcher and shortcut guide * correct sunction signature in settings helper * Fix powerpreview merge conflicts * nit fix with include statement location * add check for fields in from_json_string * Updated preview pane tests with correct from_json_string signature * Correct Image resizer naming * Roll back changes for adding check for property and version * Fix image resizer not working
This commit is contained in:
committed by
GitHub
parent
8b759094f7
commit
280d1907d8
@@ -12,6 +12,7 @@
|
||||
#include <lib/FancyZones.h>
|
||||
#include <lib/FancyZonesData.h>
|
||||
#include <lib/FancyZonesWinHookEventIDs.h>
|
||||
#include <lib/FancyZonesData.cpp>
|
||||
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
@@ -37,12 +38,18 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
|
||||
class FancyZonesModule : public PowertoyModuleIface
|
||||
{
|
||||
public:
|
||||
// Return the display name of the powertoy, this will be cached
|
||||
// Return the localized display name of the powertoy
|
||||
virtual PCWSTR get_name() override
|
||||
{
|
||||
return app_name.c_str();
|
||||
}
|
||||
|
||||
// Return the non localized key of the powertoy, this will be cached by the runner
|
||||
virtual const wchar_t* get_key() override
|
||||
{
|
||||
return app_key.c_str();
|
||||
}
|
||||
|
||||
// Return JSON with the configuration options.
|
||||
// These are the settings shown on the settings page along with their current values.
|
||||
virtual bool get_config(_Out_ PWSTR buffer, _Out_ int* buffer_size) override
|
||||
@@ -142,7 +149,8 @@ public:
|
||||
FancyZonesModule()
|
||||
{
|
||||
app_name = GET_RESOURCE_STRING(IDS_FANCYZONES);
|
||||
m_settings = MakeFancyZonesSettings(reinterpret_cast<HINSTANCE>(&__ImageBase), FancyZonesModule::get_name());
|
||||
app_key = NonLocalizable::FancyZonesStr;
|
||||
m_settings = MakeFancyZonesSettings(reinterpret_cast<HINSTANCE>(&__ImageBase), FancyZonesModule::get_name(), FancyZonesModule::get_key());
|
||||
FancyZonesDataInstance().LoadFancyZonesData();
|
||||
s_instance = this;
|
||||
}
|
||||
@@ -190,6 +198,8 @@ private:
|
||||
winrt::com_ptr<IFancyZones> m_app;
|
||||
winrt::com_ptr<IFancyZonesSettings> m_settings;
|
||||
std::wstring app_name;
|
||||
//contains the non localized key of the powertoy
|
||||
std::wstring app_key;
|
||||
|
||||
static inline FancyZonesModule* s_instance;
|
||||
static inline HHOOK s_llKeyboardHook;
|
||||
|
||||
@@ -43,9 +43,10 @@ namespace NonLocalizable
|
||||
struct FancyZonesSettings : winrt::implements<FancyZonesSettings, IFancyZonesSettings>
|
||||
{
|
||||
public:
|
||||
FancyZonesSettings(HINSTANCE hinstance, PCWSTR name)
|
||||
: m_hinstance(hinstance)
|
||||
, m_moduleName(name)
|
||||
FancyZonesSettings(HINSTANCE hinstance, PCWSTR name, PCWSTR key)
|
||||
: m_hinstance(hinstance),
|
||||
m_moduleName(name),
|
||||
m_moduleKey(key)
|
||||
{
|
||||
LoadSettings(name, true);
|
||||
}
|
||||
@@ -64,6 +65,7 @@ private:
|
||||
IFancyZonesCallback* m_callback{};
|
||||
const HINSTANCE m_hinstance;
|
||||
PCWSTR m_moduleName{};
|
||||
PCWSTR m_moduleKey{};
|
||||
|
||||
Settings m_settings;
|
||||
|
||||
@@ -171,8 +173,8 @@ void FancyZonesSettings::LoadSettings(PCWSTR config, bool fromFile) noexcept
|
||||
try
|
||||
{
|
||||
PowerToysSettings::PowerToyValues values = fromFile ?
|
||||
PowerToysSettings::PowerToyValues::load_from_settings_file(m_moduleName) :
|
||||
PowerToysSettings::PowerToyValues::from_json_string(config);
|
||||
PowerToysSettings::PowerToyValues::load_from_settings_file(m_moduleKey) :
|
||||
PowerToysSettings::PowerToyValues::from_json_string(config, m_moduleKey);
|
||||
|
||||
for (auto const& setting : m_configBools)
|
||||
{
|
||||
@@ -244,7 +246,7 @@ void FancyZonesSettings::SaveSettings() noexcept
|
||||
{
|
||||
try
|
||||
{
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName);
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName, m_moduleKey);
|
||||
|
||||
for (auto const& setting : m_configBools)
|
||||
{
|
||||
@@ -271,7 +273,7 @@ void FancyZonesSettings::SaveSettings() noexcept
|
||||
}
|
||||
}
|
||||
|
||||
winrt::com_ptr<IFancyZonesSettings> MakeFancyZonesSettings(HINSTANCE hinstance, PCWSTR name) noexcept
|
||||
winrt::com_ptr<IFancyZonesSettings> MakeFancyZonesSettings(HINSTANCE hinstance, PCWSTR name, PCWSTR key) noexcept
|
||||
{
|
||||
return winrt::make_self<FancyZonesSettings>(hinstance, name);
|
||||
return winrt::make_self<FancyZonesSettings>(hinstance, name, key);
|
||||
}
|
||||
|
||||
@@ -49,4 +49,4 @@ interface __declspec(uuid("{BA4E77C4-6F44-4C5D-93D3-CBDE880495C2}")) IFancyZones
|
||||
IFACEMETHOD_(const Settings*, GetSettings)() const = 0;
|
||||
};
|
||||
|
||||
winrt::com_ptr<IFancyZonesSettings> MakeFancyZonesSettings(HINSTANCE hinstance, PCWSTR config) noexcept;
|
||||
winrt::com_ptr<IFancyZonesSettings> MakeFancyZonesSettings(HINSTANCE hinstance, PCWSTR name, PCWSTR key) noexcept;
|
||||
@@ -17,11 +17,12 @@ namespace FancyZonesUnitTests
|
||||
HINSTANCE m_hInst;
|
||||
winrt::com_ptr<IFancyZonesSettings> m_settings;
|
||||
const std::wstring_view m_moduleName = L"FancyZonesUnitTests";
|
||||
const std::wstring_view m_modulekey = L"FancyZonesUnitTests";
|
||||
|
||||
TEST_METHOD_INITIALIZE(Init)
|
||||
{
|
||||
m_hInst = (HINSTANCE)GetModuleHandleW(nullptr);
|
||||
m_settings = MakeFancyZonesSettings(m_hInst, m_moduleName.data());
|
||||
m_settings = MakeFancyZonesSettings(m_hInst, m_moduleName.data(), m_modulekey.data());
|
||||
Assert::IsTrue(m_settings != nullptr);
|
||||
}
|
||||
|
||||
@@ -57,7 +58,8 @@ namespace FancyZonesUnitTests
|
||||
TEST_CLASS (FancyZonesIZoneWindowHostUnitTests)
|
||||
{
|
||||
HINSTANCE m_hInst{};
|
||||
std::wstring m_settingsLocation = L"FancyZonesUnitTests";
|
||||
std::wstring m_moduleName = L"FancyZonesUnitTests";
|
||||
std::wstring m_moduleKey = L"FancyZonesUnitTests";
|
||||
winrt::com_ptr<IFancyZonesSettings> m_settings = nullptr;
|
||||
winrt::com_ptr<IZoneWindowHost> m_zoneWindowHost = nullptr;
|
||||
|
||||
@@ -92,7 +94,7 @@ namespace FancyZonesUnitTests
|
||||
TEST_METHOD_INITIALIZE(Init)
|
||||
{
|
||||
m_hInst = (HINSTANCE)GetModuleHandleW(nullptr);
|
||||
m_settings = MakeFancyZonesSettings(m_hInst, m_settingsLocation.c_str());
|
||||
m_settings = MakeFancyZonesSettings(m_hInst, m_moduleName.c_str(), m_moduleKey.c_str());
|
||||
Assert::IsTrue(m_settings != nullptr);
|
||||
|
||||
auto fancyZones = MakeFancyZones(m_hInst, m_settings, nullptr);
|
||||
@@ -104,7 +106,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
TEST_METHOD_CLEANUP(Cleanup)
|
||||
{
|
||||
auto settingsFolder = PTSettingsHelper::get_module_save_folder_location(m_settingsLocation);
|
||||
auto settingsFolder = PTSettingsHelper::get_module_save_folder_location(m_moduleName);
|
||||
const auto settingsFile = settingsFolder + L"\\settings.json";
|
||||
std::filesystem::remove(settingsFile);
|
||||
std::filesystem::remove(settingsFolder);
|
||||
@@ -279,7 +281,8 @@ namespace FancyZonesUnitTests
|
||||
TEST_CLASS (FancyZonesIFancyZonesCallbackUnitTests)
|
||||
{
|
||||
HINSTANCE m_hInst{};
|
||||
std::wstring m_settingsLocation = L"FancyZonesUnitTests";
|
||||
std::wstring m_moduleName = L"FancyZonesUnitTests";
|
||||
std::wstring m_moduleKey = L"FancyZonesUnitTests";
|
||||
winrt::com_ptr<IFancyZonesSettings> m_settings = nullptr;
|
||||
winrt::com_ptr<IFancyZonesCallback> m_fzCallback = nullptr;
|
||||
|
||||
@@ -328,7 +331,7 @@ namespace FancyZonesUnitTests
|
||||
TEST_METHOD_INITIALIZE(Init)
|
||||
{
|
||||
m_hInst = (HINSTANCE)GetModuleHandleW(nullptr);
|
||||
m_settings = MakeFancyZonesSettings(m_hInst, m_settingsLocation.c_str());
|
||||
m_settings = MakeFancyZonesSettings(m_hInst, m_moduleName.c_str(), m_moduleKey.c_str());
|
||||
Assert::IsTrue(m_settings != nullptr);
|
||||
|
||||
auto fancyZones = MakeFancyZones(m_hInst, m_settings, nullptr);
|
||||
@@ -346,7 +349,7 @@ namespace FancyZonesUnitTests
|
||||
sendKeyboardInput(VK_LWIN, true);
|
||||
sendKeyboardInput(VK_CONTROL, true);
|
||||
|
||||
auto settingsFolder = PTSettingsHelper::get_module_save_folder_location(m_settingsLocation);
|
||||
auto settingsFolder = PTSettingsHelper::get_module_save_folder_location(m_moduleName);
|
||||
const auto settingsFile = settingsFolder + L"\\settings.json";
|
||||
std::filesystem::remove(settingsFile);
|
||||
std::filesystem::remove(settingsFolder);
|
||||
|
||||
@@ -59,6 +59,7 @@ namespace FancyZonesUnitTests
|
||||
{
|
||||
HINSTANCE m_hInst;
|
||||
PCWSTR m_moduleName = L"FancyZonesUnitTests";
|
||||
PCWSTR m_moduleKey = L"FancyZonesUnitTests";
|
||||
std::wstring m_tmpName;
|
||||
|
||||
const PowerToysSettings::HotkeyObject m_defaultHotkeyObject = PowerToysSettings::HotkeyObject::from_settings(true, false, false, false, VK_OEM_3);
|
||||
@@ -76,7 +77,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
TEST_METHOD (CreateWithHinstanceDefault)
|
||||
{
|
||||
auto actual = MakeFancyZonesSettings({}, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings({}, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -85,7 +86,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
TEST_METHOD (CreateWithHinstanceNullptr)
|
||||
{
|
||||
auto actual = MakeFancyZonesSettings(nullptr, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(nullptr, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -94,7 +95,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
TEST_METHOD (CreateWithNameEmpty)
|
||||
{
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, L"");
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, L"", m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -106,7 +107,7 @@ namespace FancyZonesUnitTests
|
||||
//prepare data
|
||||
const Settings expected;
|
||||
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName);
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName, m_moduleKey);
|
||||
values.add_property(L"fancyzones_shiftDrag", expected.shiftDrag);
|
||||
values.add_property(L"fancyzones_mouseSwitch", expected.mouseSwitch);
|
||||
values.add_property(L"fancyzones_displayChange_moveWindows", expected.displayChange_moveWindows);
|
||||
@@ -131,7 +132,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
values.save_to_settings_file();
|
||||
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -146,7 +147,7 @@ namespace FancyZonesUnitTests
|
||||
.excludedAppsArray = { L"APP", L"APP1", L"APP2", L"ANOTHER APP" },
|
||||
};
|
||||
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName);
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName, m_moduleKey);
|
||||
values.add_property(L"fancyzones_shiftDrag", expected.shiftDrag);
|
||||
values.add_property(L"fancyzones_mouseSwitch", expected.mouseSwitch);
|
||||
values.add_property(L"fancyzones_displayChange_moveWindows", expected.displayChange_moveWindows);
|
||||
@@ -171,7 +172,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
values.save_to_settings_file();
|
||||
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -205,7 +206,7 @@ namespace FancyZonesUnitTests
|
||||
.excludedAppsArray = { L"APP" },
|
||||
};
|
||||
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName);
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName, m_moduleKey);
|
||||
values.add_property(L"fancyzones_zoneColor", expected.zoneColor);
|
||||
values.add_property(L"fancyzones_zoneBorderColor", expected.zoneBorderColor);
|
||||
values.add_property(L"fancyzones_zoneHighlightColor", expected.zoneHighlightColor);
|
||||
@@ -215,7 +216,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
values.save_to_settings_file();
|
||||
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -227,7 +228,7 @@ namespace FancyZonesUnitTests
|
||||
//prepare data
|
||||
const Settings expected;
|
||||
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName);
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName, m_moduleKey);
|
||||
values.add_property(L"fancyzones_shiftDrag", expected.shiftDrag);
|
||||
values.add_property(L"fancyzones_mouseSwitch", expected.mouseSwitch);
|
||||
values.add_property(L"fancyzones_displayChange_moveWindows", expected.displayChange_moveWindows);
|
||||
@@ -249,7 +250,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
values.save_to_settings_file();
|
||||
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -261,7 +262,7 @@ namespace FancyZonesUnitTests
|
||||
//prepare data
|
||||
const Settings expected;
|
||||
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName);
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName, m_moduleKey);
|
||||
values.add_property(L"fancyzones_shiftDrag", expected.shiftDrag);
|
||||
values.add_property(L"fancyzones_mouseSwitch", expected.mouseSwitch);
|
||||
values.add_property(L"fancyzones_displayChange_moveWindows", expected.displayChange_moveWindows);
|
||||
@@ -284,7 +285,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
values.save_to_settings_file();
|
||||
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -296,7 +297,7 @@ namespace FancyZonesUnitTests
|
||||
//prepare data
|
||||
const Settings expected;
|
||||
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName);
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName, m_moduleKey);
|
||||
values.add_property(L"fancyzones_shiftDrag", expected.shiftDrag);
|
||||
values.add_property(L"fancyzones_mouseSwitch", expected.mouseSwitch);
|
||||
values.add_property(L"fancyzones_displayChange_moveWindows", expected.displayChange_moveWindows);
|
||||
@@ -320,7 +321,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
values.save_to_settings_file();
|
||||
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -332,7 +333,7 @@ namespace FancyZonesUnitTests
|
||||
//prepare data
|
||||
const Settings expected;
|
||||
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName);
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName, m_moduleKey);
|
||||
values.add_property(L"fancyzones_shiftDrag", expected.shiftDrag);
|
||||
values.add_property(L"fancyzones_mouseSwitch", expected.mouseSwitch);
|
||||
values.add_property(L"fancyzones_displayChange_moveWindows", expected.displayChange_moveWindows);
|
||||
@@ -356,7 +357,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
values.save_to_settings_file();
|
||||
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -366,7 +367,7 @@ namespace FancyZonesUnitTests
|
||||
TEST_METHOD (CreateWithEmptyJson)
|
||||
{
|
||||
json::to_file(m_tmpName, json::JsonObject());
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -377,7 +378,7 @@ namespace FancyZonesUnitTests
|
||||
{
|
||||
std::wofstream{ m_tmpName.data(), std::ios::binary } << L"{ \"version\": \"1.0\", \"name\": \"";
|
||||
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName, m_moduleKey);
|
||||
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -387,7 +388,7 @@ namespace FancyZonesUnitTests
|
||||
TEST_METHOD (CreateWithCyrillicSymbolsInJson)
|
||||
{
|
||||
std::wofstream{ m_tmpName.data(), std::ios::binary } << L"{ \"version\": \"1.0\", \"name\": \"ФансиЗонс\"}";
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName);
|
||||
auto actual = MakeFancyZonesSettings(m_hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(actual != nullptr);
|
||||
|
||||
auto actualSettings = actual->GetSettings();
|
||||
@@ -399,6 +400,7 @@ namespace FancyZonesUnitTests
|
||||
{
|
||||
winrt::com_ptr<IFancyZonesSettings> m_settings = nullptr;
|
||||
PCWSTR m_moduleName = L"FancyZonesUnitTests";
|
||||
PCWSTR m_moduleKey = L"FancyZonesUnitTests";
|
||||
|
||||
struct FZCallback : public winrt::implements<FZCallback, IFancyZonesCallback>
|
||||
{
|
||||
@@ -474,7 +476,7 @@ namespace FancyZonesUnitTests
|
||||
.excludedAppsArray = { L"APP" },
|
||||
};
|
||||
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName);
|
||||
PowerToysSettings::PowerToyValues values(m_moduleName, m_moduleKey);
|
||||
values.add_property(L"fancyzones_shiftDrag", expected.shiftDrag);
|
||||
values.add_property(L"fancyzones_mouseSwitch", expected.mouseSwitch);
|
||||
values.add_property(L"fancyzones_displayChange_moveWindows", expected.displayChange_moveWindows);
|
||||
@@ -499,7 +501,7 @@ namespace FancyZonesUnitTests
|
||||
|
||||
values.save_to_settings_file();
|
||||
|
||||
m_settings = MakeFancyZonesSettings(hInst, m_moduleName);
|
||||
m_settings = MakeFancyZonesSettings(hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(m_settings != nullptr);
|
||||
}
|
||||
|
||||
@@ -579,6 +581,7 @@ namespace FancyZonesUnitTests
|
||||
{
|
||||
winrt::com_ptr<IFancyZonesSettings> m_settings = nullptr;
|
||||
PCWSTR m_moduleName = L"FancyZonesUnitTests";
|
||||
PCWSTR m_moduleKey = L"FancyZonesUnitTests";
|
||||
|
||||
std::wstring serializedPowerToySettings(const Settings& settings)
|
||||
{
|
||||
@@ -622,7 +625,7 @@ namespace FancyZonesUnitTests
|
||||
{
|
||||
HINSTANCE hInst = (HINSTANCE)GetModuleHandleW(nullptr);
|
||||
|
||||
m_settings = MakeFancyZonesSettings(hInst, m_moduleName);
|
||||
m_settings = MakeFancyZonesSettings(hInst, m_moduleName, m_moduleKey);
|
||||
Assert::IsTrue(m_settings != nullptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user