diff --git a/src/common/UnitTests-CommonLib/UnitTestsVersionHelper.cpp b/src/common/UnitTests-CommonLib/UnitTestsVersionHelper.cpp index 5c41af0098..0c4c0ad9dd 100644 --- a/src/common/UnitTests-CommonLib/UnitTestsVersionHelper.cpp +++ b/src/common/UnitTests-CommonLib/UnitTestsVersionHelper.cpp @@ -13,7 +13,7 @@ namespace UnitTestsVersionHelper TEST_CLASS (UnitTestsVersionHelper) { public: - TEST_METHOD (integerConstructorShouldProprelyInitializateVersionNumbers) + TEST_METHOD (integerConstructorShouldProperlyInitializationVersionNumbers) { VersionHelper sut(MAJOR_VERSION_0, MINOR_VERSION_12, REVISION_VERSION_0); @@ -21,7 +21,7 @@ namespace UnitTestsVersionHelper Assert::AreEqual(MINOR_VERSION_12, sut.minor); Assert::AreEqual(REVISION_VERSION_0, sut.revision); } - TEST_METHOD (integerConstructorShouldProprelyInitializateWithDifferentVersionNumbers) + TEST_METHOD (integerConstructorShouldProperlyInitializationWithDifferentVersionNumbers) { const int testcaseMajor = 2; const int testcaseMinor = 25; @@ -32,7 +32,7 @@ namespace UnitTestsVersionHelper Assert::AreEqual(testcaseMinor, sut.minor); Assert::AreEqual(testcaseRevision, sut.revision); } - TEST_METHOD (stringConstructorShouldProprelyInitializateVersionNumbers) + TEST_METHOD (stringConstructorShouldProperlyInitializationVersionNumbers) { VersionHelper sut("v0.12.3"); @@ -40,7 +40,7 @@ namespace UnitTestsVersionHelper Assert::AreEqual(12, sut.minor); Assert::AreEqual(3, sut.revision); } - TEST_METHOD (stringConstructorShouldProprelyInitializateWithDifferentVersionNumbers) + TEST_METHOD (stringConstructorShouldProperlyInitializationWithDifferentVersionNumbers) { VersionHelper sut("v2.25.1"); @@ -48,28 +48,28 @@ namespace UnitTestsVersionHelper Assert::AreEqual(25, sut.minor); Assert::AreEqual(1, sut.revision); } - TEST_METHOD (whenMajorVersionIsGreaterComparationOperatorShouldReturnProperValue) + TEST_METHOD (whenMajorVersionIsGreaterComparisonOperatorShouldReturnProperValue) { VersionHelper lhs(MAJOR_VERSION_0 + 1, MINOR_VERSION_12, REVISION_VERSION_0); VersionHelper rhs(MAJOR_VERSION_0, MINOR_VERSION_12, REVISION_VERSION_0); Assert::IsTrue(lhs > rhs); } - TEST_METHOD (whenMajorVersionIsLesserComparationOperatorShouldReturnProperValue) + TEST_METHOD (whenMajorVersionIsLesserComparisonOperatorShouldReturnProperValue) { VersionHelper lhs(MAJOR_VERSION_0, MINOR_VERSION_12, REVISION_VERSION_0); VersionHelper rhs(MAJOR_VERSION_0 + 1, MINOR_VERSION_12, REVISION_VERSION_0); Assert::IsFalse(lhs > rhs); } - TEST_METHOD (whenMajorVersionIsEqualComparationOperatorShouldCompareMinorVersionValue) + TEST_METHOD (whenMajorVersionIsEqualComparisonOperatorShouldCompareMinorVersionValue) { VersionHelper lhs(MAJOR_VERSION_0, MINOR_VERSION_12, REVISION_VERSION_0); VersionHelper rhs(MAJOR_VERSION_0, MINOR_VERSION_12 - 1, REVISION_VERSION_0); Assert::IsTrue(lhs > rhs); } - TEST_METHOD (whenMajorVersionIsEqualComparationOperatorShouldCompareMinorVersionValue2) + TEST_METHOD (whenMajorVersionIsEqualComparisonOperatorShouldCompareMinorVersionValue2) { VersionHelper lhs(MAJOR_VERSION_0, MINOR_VERSION_12 - 1, REVISION_VERSION_0); VersionHelper rhs(MAJOR_VERSION_0, MINOR_VERSION_12, REVISION_VERSION_0); @@ -77,14 +77,14 @@ namespace UnitTestsVersionHelper Assert::IsFalse(lhs > rhs); } - TEST_METHOD (whenMajorAndMinorVersionIsEqualComparationOperatorShouldCompareRevisionValue) + TEST_METHOD (whenMajorAndMinorVersionIsEqualComparisonOperatorShouldCompareRevisionValue) { VersionHelper lhs(MAJOR_VERSION_0, MINOR_VERSION_12, REVISION_VERSION_0 + 1); VersionHelper rhs(MAJOR_VERSION_0, MINOR_VERSION_12, REVISION_VERSION_0); Assert::IsTrue(lhs > rhs); } - TEST_METHOD (whenMajorAndMinorVersionIsEqualComparationOperatorShouldCompareRevisionValue2) + TEST_METHOD (whenMajorAndMinorVersionIsEqualComparisonOperatorShouldCompareRevisionValue2) { VersionHelper lhs(MAJOR_VERSION_0, MINOR_VERSION_12, REVISION_VERSION_0); VersionHelper rhs(MAJOR_VERSION_0, MINOR_VERSION_12, REVISION_VERSION_0 + 1); diff --git a/src/common/common.cpp b/src/common/common.cpp index 2ebc17d7c8..b32016a2a3 100644 --- a/src/common/common.cpp +++ b/src/common/common.cpp @@ -171,17 +171,17 @@ ShortcutGuideFilter get_shortcutguide_filtered_window() { return result; } - static HWND cortanda_hwnd = nullptr; - if (cortanda_hwnd == nullptr) + static HWND cortana_hwnd = nullptr; + if (cortana_hwnd == nullptr) { if (strcmp(class_name.data(), "Windows.UI.Core.CoreWindow") == 0 && get_process_path(active_window).ends_with(L"SearchUI.exe")) { - cortanda_hwnd = active_window; + cortana_hwnd = active_window; return result; } } - else if (cortanda_hwnd == active_window) + else if (cortana_hwnd == active_window) { return result; } @@ -321,7 +321,7 @@ WindowState get_window_state(HWND hwnd) if (GetWindowPlacement(hwnd, &placement) == 0) { - return UNKNONW; + return UNKNOWN; } if (placement.showCmd == SW_MINIMIZE || placement.showCmd == SW_SHOWMINIMIZED || IsIconic(hwnd)) @@ -337,7 +337,7 @@ WindowState get_window_state(HWND hwnd) auto rectp = get_window_pos(hwnd); if (!rectp) { - return UNKNONW; + return UNKNOWN; } auto rect = *rectp; @@ -511,7 +511,7 @@ bool run_non_elevated(const std::wstring& file, const std::wstring& params, DWOR siex.StartupInfo.cb = sizeof(siex); PROCESS_INFORMATION process_info = { 0 }; - auto succedded = CreateProcessW(file.c_str(), + auto succeeded = CreateProcessW(file.c_str(), const_cast(executable_args.c_str()), nullptr, nullptr, @@ -535,7 +535,7 @@ bool run_non_elevated(const std::wstring& file, const std::wstring& params, DWOR { CloseHandle(process_info.hThread); } - return succedded; + return succeeded; } bool run_same_elevation(const std::wstring& file, const std::wstring& params) @@ -547,7 +547,7 @@ bool run_same_elevation(const std::wstring& file, const std::wstring& params) } STARTUPINFO si = { 0 }; PROCESS_INFORMATION pi = { 0 }; - auto succedded = CreateProcessW(file.c_str(), + auto succeeded = CreateProcessW(file.c_str(), const_cast(executable_args.c_str()), nullptr, nullptr, @@ -565,7 +565,7 @@ bool run_same_elevation(const std::wstring& file, const std::wstring& params) { CloseHandle(pi.hThread); } - return succedded; + return succeeded; } std::wstring get_process_path(HWND window) noexcept diff --git a/src/common/common.h b/src/common/common.h index 5f70c1be7e..1719c0cb1f 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -47,7 +47,7 @@ void show_last_error_message(LPCWSTR lpszFunction, DWORD dw); enum WindowState { - UNKNONW, + UNKNOWN, MINIMIZED, MAXIMIZED, SNAPED_TOP_LEFT, diff --git a/src/common/d2d_text.cpp b/src/common/d2d_text.cpp index 97fba8de77..87afa42930 100644 --- a/src/common/d2d_text.cpp +++ b/src/common/d2d_text.cpp @@ -24,19 +24,19 @@ D2DText& D2DText::resize(float text_size, float scale) return *this; } -D2DText& D2DText::set_aligment_left() +D2DText& D2DText::set_alignment_left() { winrt::check_hresult(format->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_LEADING)); return *this; } -D2DText& D2DText::set_aligment_center() +D2DText& D2DText::set_alignment_center() { winrt::check_hresult(format->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_CENTER)); return *this; } -D2DText& D2DText::set_aligment_right() +D2DText& D2DText::set_alignment_right() { winrt::check_hresult(format->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_TRAILING)); return *this; diff --git a/src/common/d2d_text.h b/src/common/d2d_text.h index e03227cc87..513dc120e5 100644 --- a/src/common/d2d_text.h +++ b/src/common/d2d_text.h @@ -7,9 +7,9 @@ class D2DText public: D2DText(float text_size = 15.0f, float scale = 1.0f); D2DText& resize(float text_size, float scale); - D2DText& set_aligment_left(); - D2DText& set_aligment_center(); - D2DText& set_aligment_right(); + D2DText& set_alignment_left(); + D2DText& set_alignment_center(); + D2DText& set_alignment_right(); void write(ID2D1DeviceContext5* d2d_dc, D2D1_COLOR_F color, D2D1_RECT_F rect, std::wstring text); private: diff --git a/src/common/dpi_aware.cpp b/src/common/dpi_aware.cpp index 4d0315a81b..0bd9404e99 100644 --- a/src/common/dpi_aware.cpp +++ b/src/common/dpi_aware.cpp @@ -56,7 +56,7 @@ namespace DPIAware SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); } - AwarnessLevel GetAwarenessLevel(DPI_AWARENESS_CONTEXT system_returned_value) + AwarenessLevel GetAwarenessLevel(DPI_AWARENESS_CONTEXT system_returned_value) { const std::array levels{ DPI_AWARENESS_CONTEXT_UNAWARE, DPI_AWARENESS_CONTEXT_SYSTEM_AWARE, @@ -67,9 +67,9 @@ namespace DPIAware { if (AreDpiAwarenessContextsEqual(levels[i], system_returned_value)) { - return static_cast(i); + return static_cast(i); } } - return AwarnessLevel::UNAWARE; + return AwarenessLevel::UNAWARE; } } diff --git a/src/common/dpi_aware.h b/src/common/dpi_aware.h index d750b2eec2..3529be22d1 100644 --- a/src/common/dpi_aware.h +++ b/src/common/dpi_aware.h @@ -10,7 +10,7 @@ namespace DPIAware void Convert(HMONITOR monitor_handle, int& width, int& height); void EnableDPIAwarenessForThisProcess(); - enum AwarnessLevel + enum AwarenessLevel { UNAWARE, SYSTEM_AWARE, @@ -18,5 +18,5 @@ namespace DPIAware PER_MONITOR_AWARE_V2, UNAWARE_GDISCALED }; - AwarnessLevel GetAwarenessLevel(DPI_AWARENESS_CONTEXT system_returned_value); + AwarenessLevel GetAwarenessLevel(DPI_AWARENESS_CONTEXT system_returned_value); }; diff --git a/src/common/monitors.h b/src/common/monitors.h index b375fedd52..7771e843d5 100644 --- a/src/common/monitors.h +++ b/src/common/monitors.h @@ -20,7 +20,7 @@ struct ScreenSize POINT middle() const { return { rect.left + width() / 2, rect.top + height() / 2 }; }; POINT middle_right() const { return { rect.right, rect.top + height() / 2 }; }; POINT bottom_left() const { return { rect.left, rect.bottom }; }; - POINT bottm_midle() const { return { rect.left + width() / 2, rect.bottom }; }; + POINT bottom_middle() const { return { rect.left + width() / 2, rect.bottom }; }; POINT bottom_right() const { return { rect.right, rect.bottom }; }; }; diff --git a/src/common/notifications.cpp b/src/common/notifications.cpp index a15c9f672e..de55ba5334 100644 --- a/src/common/notifications.cpp +++ b/src/common/notifications.cpp @@ -83,7 +83,7 @@ public: { return 1; } - auto dispatcher = reinterpret_cast(GetProcAddress(lib, "dispatch_to_backround_handler")); + auto dispatcher = reinterpret_cast(GetProcAddress(lib, "dispatch_to_background_handler")); if (!dispatcher) { return 1; diff --git a/src/common/notifications/notifications.def b/src/common/notifications/notifications.def index 99071d3f72..d64a92fa31 100644 --- a/src/common/notifications/notifications.def +++ b/src/common/notifications/notifications.def @@ -3,4 +3,4 @@ DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE DllRegisterServer PRIVATE DllUnregisterServer PRIVATE -dispatch_to_backround_handler PRIVATE \ No newline at end of file +dispatch_to_background_handler PRIVATE \ No newline at end of file diff --git a/src/common/notifications_winrt/BackgroundHandler.cpp b/src/common/notifications_winrt/BackgroundHandler.cpp index 67766d1bc0..c06d33809e 100644 --- a/src/common/notifications_winrt/BackgroundHandler.cpp +++ b/src/common/notifications_winrt/BackgroundHandler.cpp @@ -17,6 +17,6 @@ namespace winrt::PowerToysNotifications::implementation return; } - dispatch_to_backround_handler(details.Argument()); + dispatch_to_background_handler(details.Argument()); } } diff --git a/src/common/notifications_winrt/handler_functions.cpp b/src/common/notifications_winrt/handler_functions.cpp index d4e7bc5ef1..ea69c5327e 100644 --- a/src/common/notifications_winrt/handler_functions.cpp +++ b/src/common/notifications_winrt/handler_functions.cpp @@ -11,7 +11,7 @@ namespace const std::unordered_map handlers_map; } -void dispatch_to_backround_handler(std::wstring_view argument) +void dispatch_to_background_handler(std::wstring_view argument) { winrt::Windows::Foundation::WwwFormUrlDecoder decoder{ argument }; diff --git a/src/common/notifications_winrt/handler_functions.h b/src/common/notifications_winrt/handler_functions.h index 8e35f66d11..4a07d908b0 100644 --- a/src/common/notifications_winrt/handler_functions.h +++ b/src/common/notifications_winrt/handler_functions.h @@ -2,4 +2,4 @@ #include -void dispatch_to_backround_handler(std::wstring_view argument); +void dispatch_to_background_handler(std::wstring_view argument); diff --git a/src/common/tasklist_positions.cpp b/src/common/tasklist_positions.cpp index 6a6102b838..af77a03ab2 100644 --- a/src/common/tasklist_positions.cpp +++ b/src/common/tasklist_positions.cpp @@ -44,8 +44,8 @@ bool Tasklist::update_buttons(std::vector& buttons) if (elements->get_Length(&count) < 0) return false; winrt::com_ptr child; - std::vector found_butttons; - found_butttons.reserve(count); + std::vector found_buttons; + found_buttons.reserve(count); for (int i = 0; i < count; ++i) { child = nullptr; @@ -82,11 +82,11 @@ bool Tasklist::update_buttons(std::vector& buttons) button.name = automation_id; SysFreeString(automation_id); } - found_butttons.push_back(button); + found_buttons.push_back(button); } // assign keynums buttons.clear(); - for (auto& button : found_butttons) + for (auto& button : found_buttons) { if (buttons.empty()) { diff --git a/src/common/two_way_pipe_message_ipc.cpp b/src/common/two_way_pipe_message_ipc.cpp index f22d409312..5b17ec064a 100644 --- a/src/common/two_way_pipe_message_ipc.cpp +++ b/src/common/two_way_pipe_message_ipc.cpp @@ -422,7 +422,7 @@ void TwoWayPipeMessageIPC::TwoWayPipeMessageIPCImpl::handle_pipe_connection(HAND HeapFree(hHeap, 0, pchRequest); - printf("InstanceThread exitting.\n"); + printf("InstanceThread exiting.\n"); } void TwoWayPipeMessageIPC::TwoWayPipeMessageIPCImpl::start_named_pipe_server(HANDLE token) diff --git a/src/modules/previewpane/UnitTests-PreviewHandlerCommon/FormHandlerControlTests.cs b/src/modules/previewpane/UnitTests-PreviewHandlerCommon/FormHandlerControlTests.cs index 29c565295a..9ba2aa0ca6 100644 --- a/src/modules/previewpane/UnitTests-PreviewHandlerCommon/FormHandlerControlTests.cs +++ b/src/modules/previewpane/UnitTests-PreviewHandlerCommon/FormHandlerControlTests.cs @@ -18,7 +18,7 @@ namespace UnitTests_PreviewHandlerCommon { } [TestMethod] - public void FormHandlerControl_ShouldCreateHandle_OnIntialization() + public void FormHandlerControl_ShouldCreateHandle_OnInitialization() { // Arrange and act using (var testFormHandlerControl = new TestFormControl()) @@ -29,7 +29,7 @@ namespace UnitTests_PreviewHandlerCommon } [TestMethod] - public void FormHandlerControl_ShouldSetVisibleFalse_OnIntialization() + public void FormHandlerControl_ShouldSetVisibleFalse_OnInitialization() { // Arrange and act using (var testFormHandlerControl = new TestFormControl()) @@ -40,7 +40,7 @@ namespace UnitTests_PreviewHandlerCommon } [TestMethod] - public void FormHandlerControl_ShouldSetFormBorderStyle_OnIntialization() + public void FormHandlerControl_ShouldSetFormBorderStyle_OnInitialization() { // Arrange and act using (var testFormHandlerControl = new TestFormControl()) diff --git a/src/modules/shortcut_guide/overlay_window.cpp b/src/modules/shortcut_guide/overlay_window.cpp index d2dceb1d83..36e357e0bd 100644 --- a/src/modules/shortcut_guide/overlay_window.cpp +++ b/src/modules/shortcut_guide/overlay_window.cpp @@ -751,7 +751,7 @@ void D2DOverlayWindow::render(ID2D1DeviceContext5* d2d_dc) if (!minature_shown && window_state != MINIMIZED) { no_active.render(d2d_dc); - window_state = UNKNONW; + window_state = UNKNOWN; } // Set the animation - move the draw window according to animation step @@ -864,13 +864,13 @@ void D2DOverlayWindow::render(ID2D1DeviceContext5* d2d_dc) } auto text_color = D2D1::ColorF(light_mode ? 0x222222 : 0xDDDDDD, active_window_snappable && (minature_shown || window_state == MINIMIZED) ? 1.0f : 0.3f); use_overlay->find_element(L"KeyUpGroup")->SetAttributeValue(L"fill-opacity", up_disabled ? 0.3f : 1.0f); - text.set_aligment_center().write(d2d_dc, text_color, use_overlay->get_maximize_label(), up); + text.set_alignment_center().write(d2d_dc, text_color, use_overlay->get_maximize_label(), up); use_overlay->find_element(L"KeyDownGroup")->SetAttributeValue(L"fill-opacity", down_disabled ? 0.3f : 1.0f); text.write(d2d_dc, text_color, use_overlay->get_minimize_label(), down); use_overlay->find_element(L"KeyLeftGroup")->SetAttributeValue(L"fill-opacity", left_disabled ? 0.3f : 1.0f); - text.set_aligment_right().write(d2d_dc, text_color, use_overlay->get_snap_left(), left); + text.set_alignment_right().write(d2d_dc, text_color, use_overlay->get_snap_left(), left); use_overlay->find_element(L"KeyRightGroup")->SetAttributeValue(L"fill-opacity", right_disabled ? 0.3f : 1.0f); - text.set_aligment_left().write(d2d_dc, text_color, use_overlay->get_snap_right(), right); + text.set_alignment_left().write(d2d_dc, text_color, use_overlay->get_snap_right(), right); // ... and the arrows with numbers for (auto&& button : tasklist_buttons) {