mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
Spelling: ... runner settings (#3783)
* spelling: default * spelling: elevated * spelling: instance * spelling: relative
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
const DWORD USERNAME_DOMAIN_LEN = DNLEN + UNLEN + 2; // Domain Name + '\' + User Name + '\0'
|
const DWORD USERNAME_DOMAIN_LEN = DNLEN + UNLEN + 2; // Domain Name + '\' + User Name + '\0'
|
||||||
const DWORD USERNAME_LEN = UNLEN + 1; // User Name + '\0'
|
const DWORD USERNAME_LEN = UNLEN + 1; // User Name + '\0'
|
||||||
|
|
||||||
bool create_auto_start_task_for_this_user(bool runEvelvated)
|
bool create_auto_start_task_for_this_user(bool runElevated)
|
||||||
{
|
{
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ bool create_auto_start_task_for_this_user(bool runEvelvated)
|
|||||||
|
|
||||||
hr = pPrincipal->put_LogonType(TASK_LOGON_INTERACTIVE_TOKEN);
|
hr = pPrincipal->put_LogonType(TASK_LOGON_INTERACTIVE_TOKEN);
|
||||||
|
|
||||||
if (runEvelvated)
|
if (runElevated)
|
||||||
{
|
{
|
||||||
hr = pPrincipal->put_RunLevel(_TASK_RUNLEVEL::TASK_RUNLEVEL_HIGHEST);
|
hr = pPrincipal->put_RunLevel(_TASK_RUNLEVEL::TASK_RUNLEVEL_HIGHEST);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
bool is_auto_start_task_active_for_this_user();
|
bool is_auto_start_task_active_for_this_user();
|
||||||
bool create_auto_start_task_for_this_user(bool runEvelvated);
|
bool create_auto_start_task_for_this_user(bool runElevated);
|
||||||
bool delete_auto_start_task_for_this_user();
|
bool delete_auto_start_task_for_this_user();
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||||||
{
|
{
|
||||||
// Singletons initialization order needs to be preserved, first events and
|
// Singletons initialization order needs to be preserved, first events and
|
||||||
// then modules to guarantee the reverse destruction order.
|
// then modules to guarantee the reverse destruction order.
|
||||||
SystemMenuHelperInstace();
|
SystemMenuHelperInstance();
|
||||||
powertoys_events();
|
powertoys_events();
|
||||||
modules();
|
modules();
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ PowertoyModule load_powertoy(const std::wstring& filename)
|
|||||||
FreeLibrary(handle);
|
FreeLibrary(handle);
|
||||||
winrt::throw_last_error();
|
winrt::throw_last_error();
|
||||||
}
|
}
|
||||||
module->register_system_menu_helper(&SystemMenuHelperInstace());
|
module->register_system_menu_helper(&SystemMenuHelperInstance());
|
||||||
return PowertoyModule(module, handle);
|
return PowertoyModule(module, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ PowertoyModule::PowertoyModule(PowertoyModuleIface* module, HMODULE handle) :
|
|||||||
powertoys_events().register_receiver(*want_signals, module);
|
powertoys_events().register_receiver(*want_signals, module);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (SystemMenuHelperInstace().HasCustomConfig(module))
|
if (SystemMenuHelperInstance().HasCustomConfig(module))
|
||||||
{
|
{
|
||||||
powertoys_events().register_system_menu_action(module);
|
powertoys_events().register_system_menu_action(module);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ void PowertoysEvents::unregister_system_menu_action(PowertoyModuleIface* module)
|
|||||||
auto it = system_menu_receivers.find(module);
|
auto it = system_menu_receivers.find(module);
|
||||||
if (it != system_menu_receivers.end())
|
if (it != system_menu_receivers.end())
|
||||||
{
|
{
|
||||||
SystemMenuHelperInstace().Reset(module);
|
SystemMenuHelperInstance().Reset(module);
|
||||||
system_menu_receivers.erase(it);
|
system_menu_receivers.erase(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -73,18 +73,18 @@ void PowertoysEvents::handle_system_menu_action(const WinHookEvent& data)
|
|||||||
{
|
{
|
||||||
for (auto& module : system_menu_receivers)
|
for (auto& module : system_menu_receivers)
|
||||||
{
|
{
|
||||||
SystemMenuHelperInstace().Customize(module, data.hwnd);
|
SystemMenuHelperInstance().Customize(module, data.hwnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (data.event == EVENT_OBJECT_INVOKED)
|
else if (data.event == EVENT_OBJECT_INVOKED)
|
||||||
{
|
{
|
||||||
if (PowertoyModuleIface * module{ SystemMenuHelperInstace().ModuleFromItemId(data.idChild) })
|
if (PowertoyModuleIface * module{ SystemMenuHelperInstance().ModuleFromItemId(data.idChild) })
|
||||||
{
|
{
|
||||||
std::wstring itemName = SystemMenuHelperInstace().ItemNameFromItemId(data.idChild);
|
std::wstring itemName = SystemMenuHelperInstance().ItemNameFromItemId(data.idChild);
|
||||||
// Process event on specified system menu item by responsible module.
|
// Process event on specified system menu item by responsible module.
|
||||||
module->signal_system_menu_action(itemName.c_str());
|
module->signal_system_menu_action(itemName.c_str());
|
||||||
// Process event on specified system menu item by system menu helper (check/uncheck if needed).
|
// Process event on specified system menu item by system menu helper (check/uncheck if needed).
|
||||||
SystemMenuHelperInstace().ProcessSelectedItem(module, GetForegroundWindow(), itemName.c_str());
|
SystemMenuHelperInstance().ProcessSelectedItem(module, GetForegroundWindow(), itemName.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemMenuHelper& SystemMenuHelperInstace()
|
SystemMenuHelper& SystemMenuHelperInstance()
|
||||||
{
|
{
|
||||||
static SystemMenuHelper instance;
|
static SystemMenuHelper instance;
|
||||||
return instance;
|
return instance;
|
||||||
|
|||||||
@@ -40,4 +40,4 @@ private:
|
|||||||
std::unordered_map<PowertoyModuleIface*, std::vector<ItemInfo>> Configurations{};
|
std::unordered_map<PowertoyModuleIface*, std::vector<ItemInfo>> Configurations{};
|
||||||
};
|
};
|
||||||
|
|
||||||
SystemMenuHelper& SystemMenuHelperInstace();
|
SystemMenuHelper& SystemMenuHelperInstance();
|
||||||
|
|||||||
@@ -511,7 +511,7 @@ bool initialize_com_security_policy_for_webview()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
on_scope_exit free_realtive_sd([&] {
|
on_scope_exit free_relative_sd([&] {
|
||||||
LocalFree(self_relative_sd);
|
LocalFree(self_relative_sd);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ namespace PowerToysTests
|
|||||||
public void TestCleanup()
|
public void TestCleanup()
|
||||||
{
|
{
|
||||||
CloseEditor();
|
CloseEditor();
|
||||||
ResetDefautZoneSettings(false);
|
ResetDefaultZoneSettings(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,7 +158,7 @@ namespace PowerToysTests
|
|||||||
{
|
{
|
||||||
Setup(context, false);
|
Setup(context, false);
|
||||||
ResetDefaultFancyZonesSettings(false);
|
ResetDefaultFancyZonesSettings(false);
|
||||||
ResetDefautZoneSettings(true);
|
ResetDefaultZoneSettings(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
[ClassCleanup]
|
[ClassCleanup]
|
||||||
@@ -195,7 +195,7 @@ namespace PowerToysTests
|
|||||||
//editor has already closed
|
//editor has already closed
|
||||||
}
|
}
|
||||||
|
|
||||||
ResetDefautZoneSettings(false);
|
ResetDefaultZoneSettings(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ namespace PowerToysTests
|
|||||||
protected static void ResetSettings()
|
protected static void ResetSettings()
|
||||||
{
|
{
|
||||||
ResetDefaultFancyZonesSettings(false);
|
ResetDefaultFancyZonesSettings(false);
|
||||||
ResetDefautZoneSettings(true);
|
ResetDefaultZoneSettings(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void OpenEditor()
|
protected static void OpenEditor()
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ namespace PowerToysTests
|
|||||||
ResetSettings(_settingsFolderPath, _settingsPath, _defaultSettings, relaunch);
|
ResetSettings(_settingsFolderPath, _settingsPath, _defaultSettings, relaunch);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ResetDefautZoneSettings(bool relaunch)
|
public static void ResetDefaultZoneSettings(bool relaunch)
|
||||||
{
|
{
|
||||||
ResetSettings(_settingsFolderPath, _zoneSettingsPath, _defaultZoneSettings, relaunch);
|
ResetSettings(_settingsFolderPath, _zoneSettingsPath, _defaultZoneSettings, relaunch);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user