Skip to content

Commit

Permalink
Spelling: ... runner settings (#3783)
Browse files Browse the repository at this point in the history
* spelling: default

* spelling: elevated

* spelling: instance

* spelling: relative
  • Loading branch information
jsoref committed May 27, 2020
1 parent c0e6237 commit 0bcaa13
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/runner/auto_start_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
const DWORD USERNAME_DOMAIN_LEN = DNLEN + UNLEN + 2; // Domain Name + '\' + 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;

Expand Down Expand Up @@ -215,7 +215,7 @@ bool create_auto_start_task_for_this_user(bool runEvelvated)

hr = pPrincipal->put_LogonType(TASK_LOGON_INTERACTIVE_TOKEN);

if (runEvelvated)
if (runElevated)
{
hr = pPrincipal->put_RunLevel(_TASK_RUNLEVEL::TASK_RUNLEVEL_HIGHEST);
}
Expand Down
2 changes: 1 addition & 1 deletion src/runner/auto_start_helper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once

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();
2 changes: 1 addition & 1 deletion src/runner/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
{
// Singletons initialization order needs to be preserved, first events and
// then modules to guarantee the reverse destruction order.
SystemMenuHelperInstace();
SystemMenuHelperInstance();
powertoys_events();
modules();

Expand Down
4 changes: 2 additions & 2 deletions src/runner/powertoy_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PowertoyModule load_powertoy(const std::wstring& filename)
FreeLibrary(handle);
winrt::throw_last_error();
}
module->register_system_menu_helper(&SystemMenuHelperInstace());
module->register_system_menu_helper(&SystemMenuHelperInstance());
return PowertoyModule(module, handle);
}

Expand Down Expand Up @@ -51,7 +51,7 @@ PowertoyModule::PowertoyModule(PowertoyModuleIface* module, HMODULE handle) :
powertoys_events().register_receiver(*want_signals, module);
}
}
if (SystemMenuHelperInstace().HasCustomConfig(module))
if (SystemMenuHelperInstance().HasCustomConfig(module))
{
powertoys_events().register_system_menu_action(module);
}
Expand Down
10 changes: 5 additions & 5 deletions src/runner/powertoys_events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void PowertoysEvents::unregister_system_menu_action(PowertoyModuleIface* module)
auto it = system_menu_receivers.find(module);
if (it != system_menu_receivers.end())
{
SystemMenuHelperInstace().Reset(module);
SystemMenuHelperInstance().Reset(module);
system_menu_receivers.erase(it);
}
}
Expand All @@ -73,18 +73,18 @@ void PowertoysEvents::handle_system_menu_action(const WinHookEvent& data)
{
for (auto& module : system_menu_receivers)
{
SystemMenuHelperInstace().Customize(module, data.hwnd);
SystemMenuHelperInstance().Customize(module, data.hwnd);
}
}
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.
module->signal_system_menu_action(itemName.c_str());
// 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());
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/runner/system_menu_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace
}
}

SystemMenuHelper& SystemMenuHelperInstace()
SystemMenuHelper& SystemMenuHelperInstance()
{
static SystemMenuHelper instance;
return instance;
Expand Down
2 changes: 1 addition & 1 deletion src/runner/system_menu_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ class SystemMenuHelper : public PowertoySystemMenuIface
std::unordered_map<PowertoyModuleIface*, std::vector<ItemInfo>> Configurations{};
};

SystemMenuHelper& SystemMenuHelperInstace();
SystemMenuHelper& SystemMenuHelperInstance();
2 changes: 1 addition & 1 deletion src/settings/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ bool initialize_com_security_policy_for_webview()
return false;
}

on_scope_exit free_realtive_sd([&] {
on_scope_exit free_relative_sd([&] {
LocalFree(self_relative_sd);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public void TestInitialize()
public void TestCleanup()
{
CloseEditor();
ResetDefautZoneSettings(false);
ResetDefaultZoneSettings(false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public static void ClassInitialize(TestContext context)
{
Setup(context, false);
ResetDefaultFancyZonesSettings(false);
ResetDefautZoneSettings(true);
ResetDefaultZoneSettings(true);
}

[ClassCleanup]
Expand Down Expand Up @@ -195,7 +195,7 @@ public void TestCleanup()
//editor has already closed
}

ResetDefautZoneSettings(false);
ResetDefaultZoneSettings(false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class FancyZonesEditor : PowerToysSession
protected static void ResetSettings()
{
ResetDefaultFancyZonesSettings(false);
ResetDefautZoneSettings(true);
ResetDefaultZoneSettings(true);
}

protected static void OpenEditor()
Expand Down
2 changes: 1 addition & 1 deletion src/tests/win-app-driver/PowerToysSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public static void ResetDefaultFancyZonesSettings(bool relaunch)
ResetSettings(_settingsFolderPath, _settingsPath, _defaultSettings, relaunch);
}

public static void ResetDefautZoneSettings(bool relaunch)
public static void ResetDefaultZoneSettings(bool relaunch)
{
ResetSettings(_settingsFolderPath, _zoneSettingsPath, _defaultZoneSettings, relaunch);
}
Expand Down

0 comments on commit 0bcaa13

Please sign in to comment.