Skip to content

Commit

Permalink
Spelling: ... fancyzones (#3777)
Browse files Browse the repository at this point in the history
* spelling: defined

* spelling: excluded

* spelling: guid

* spelling: highlight

* spelling: original

* spelling: nonexistent
  • Loading branch information
jsoref committed May 27, 2020
1 parent 3d619f1 commit ecb5d2a
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private enum CmdArgs
public const ushort _gridModelId = 0xFFFC;
public const ushort _priorityGridModelId = 0xFFFB;
public const ushort _blankCustomModelId = 0xFFFA;
public const ushort _lastPrefinedId = _blankCustomModelId;
public const ushort _lastDefinedId = _blankCustomModelId;

// hard coded data for all the "Priority Grid" configurations that are unique to "Grid"
private static readonly byte[][] _priorityData = new byte[][]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/FancyZones.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ struct FancyZones : public winrt::implements<FancyZones, IFancyZones, IFancyZone
GetZoneHighlightColor() noexcept
{
// Skip the leading # and convert to long
const auto color = m_settings->GetSettings()->zoneHightlightColor;
const auto color = m_settings->GetSettings()->zoneHighlightColor;
const auto tmp = std::stol(color.substr(1), nullptr, 16);
const auto nR = (tmp & 0xFF0000) >> 16;
const auto nG = (tmp & 0xFF00) >> 8;
Expand Down
4 changes: 2 additions & 2 deletions src/modules/fancyzones/lib/JsonHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ namespace JSONHelpers
return it != end(deviceInfoMap) ? std::optional{ it->second } : std::nullopt;
}

std::optional<CustomZoneSetData> FancyZonesData::FindCustomZoneSet(const std::wstring& guuid) const
std::optional<CustomZoneSetData> FancyZonesData::FindCustomZoneSet(const std::wstring& guid) const
{
std::scoped_lock lock{ dataLock };
auto it = customZoneSetsMap.find(guuid);
auto it = customZoneSetsMap.find(guid);
return it != end(customZoneSetsMap) ? std::optional{ it->second } : std::nullopt;
}

Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/JsonHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ namespace JSONHelpers

std::optional<DeviceInfoData> FindDeviceInfo(const std::wstring& zoneWindowId) const;

std::optional<CustomZoneSetData> FindCustomZoneSet(const std::wstring& guuid) const;
std::optional<CustomZoneSetData> FindCustomZoneSet(const std::wstring& guid) const;

inline const std::wstring GetActiveDeviceId() const
{
Expand Down
12 changes: 6 additions & 6 deletions src/modules/fancyzones/lib/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct FancyZonesSettings : winrt::implements<FancyZonesSettings, IFancyZonesSet

const std::wstring m_zoneColorName = L"fancyzones_zoneColor";
const std::wstring m_zoneBorderColorName = L"fancyzones_zoneBorderColor";
const std::wstring m_zoneHiglightName = L"fancyzones_zoneHighlightColor";
const std::wstring m_zoneHighlightName = L"fancyzones_zoneHighlightColor";
const std::wstring m_editorHotkeyName = L"fancyzones_editor_hotkey";
const std::wstring m_excludedAppsName = L"fancyzones_excluded_apps";
const std::wstring m_zoneHighlightOpacity = L"fancyzones_highlight_opacity";
Expand Down Expand Up @@ -84,13 +84,13 @@ IFACEMETHODIMP_(bool) FancyZonesSettings::GetConfig(_Out_ PWSTR buffer, _Out_ in
settings.add_bool_toggle(setting.name, setting.resourceId, *setting.value);
}

settings.add_color_picker(m_zoneHiglightName, IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR, m_settings.zoneHightlightColor);
settings.add_color_picker(m_zoneHighlightName, IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR, m_settings.zoneHighlightColor);
settings.add_color_picker(m_zoneColorName, IDS_SETTING_DESCRIPTION_ZONECOLOR, m_settings.zoneColor);
settings.add_color_picker(m_zoneBorderColorName, IDS_SETTING_DESCRIPTION_ZONE_BORDER_COLOR, m_settings.zoneBorderColor);

settings.add_int_spinner(m_zoneHighlightOpacity, IDS_SETTINGS_HIGHLIGHT_OPACITY, m_settings.zoneHighlightOpacity, 0, 100, 1);

settings.add_multiline_string(m_excludedAppsName, IDS_SETTING_EXCLCUDED_APPS_DESCRIPTION, m_settings.excludedApps);
settings.add_multiline_string(m_excludedAppsName, IDS_SETTING_EXCLUDED_APPS_DESCRIPTION, m_settings.excludedApps);

return settings.serialize_to_buffer(buffer, buffer_size);
}
Expand Down Expand Up @@ -144,9 +144,9 @@ void FancyZonesSettings::LoadSettings(PCWSTR config, bool fromFile) noexcept try
m_settings.zoneBorderColor = std::move(*val);
}

if (auto val = values.get_string_value(m_zoneHiglightName))
if (auto val = values.get_string_value(m_zoneHighlightName))
{
m_settings.zoneHightlightColor = std::move(*val);
m_settings.zoneHighlightColor = std::move(*val);
}

if (const auto val = values.get_json(m_editorHotkeyName))
Expand Down Expand Up @@ -195,7 +195,7 @@ void FancyZonesSettings::SaveSettings() noexcept try

values.add_property(m_zoneColorName, m_settings.zoneColor);
values.add_property(m_zoneBorderColorName, m_settings.zoneBorderColor);
values.add_property(m_zoneHiglightName, m_settings.zoneHightlightColor);
values.add_property(m_zoneHighlightName, m_settings.zoneHighlightColor);
values.add_property(m_zoneHighlightOpacity, m_settings.zoneHighlightOpacity);
values.add_property(m_editorHotkeyName, m_settings.editorHotkey.get_json());
values.add_property(m_excludedAppsName, m_settings.excludedApps);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct Settings
bool makeDraggedWindowTransparent = true;
std::wstring zoneColor = L"#F5FCFF";
std::wstring zoneBorderColor = L"#FFFFFF";
std::wstring zoneHightlightColor = L"#008CFF";
std::wstring zoneHighlightColor = L"#008CFF";
int zoneHighlightOpacity = 50;
PowerToysSettings::HotkeyObject editorHotkey = PowerToysSettings::HotkeyObject::from_settings(true, false, false, false, VK_OEM_3);
std::wstring excludedApps = L"";
Expand Down
6 changes: 3 additions & 3 deletions src/modules/fancyzones/lib/WindowMoveHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void WindowMoveHandlerPrivate::MoveSizeStart(HWND window, HMONITOR monitor, POIN
}
else if (m_zoneWindowMoveSize)
{
m_zoneWindowMoveSize->RestoreOrginalTransparency();
m_zoneWindowMoveSize->RestoreOriginalTransparency();
m_zoneWindowMoveSize = nullptr;
for (auto [keyMonitor, zoneWindow] : zoneWindowMap)
{
Expand Down Expand Up @@ -200,7 +200,7 @@ void WindowMoveHandlerPrivate::MoveSizeUpdate(HMONITOR monitor, POINT const& ptS
{
if (zoneWindow)
{
zoneWindow->RestoreOrginalTransparency();
zoneWindow->RestoreOriginalTransparency();
zoneWindow->HideZoneWindow();
}
}
Expand All @@ -213,7 +213,7 @@ void WindowMoveHandlerPrivate::MoveSizeUpdate(HMONITOR monitor, POINT const& ptS
if (iter->second != m_zoneWindowMoveSize)
{
// The drag has moved to a different monitor.
m_zoneWindowMoveSize->RestoreOrginalTransparency();
m_zoneWindowMoveSize->RestoreOriginalTransparency();

if (!m_settings->GetSettings()->showZonesOnAllMonitors)
{
Expand Down
8 changes: 4 additions & 4 deletions src/modules/fancyzones/lib/ZoneSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,12 @@ bool ZoneSet::CalculateUniquePriorityGridLayout(Rect workArea, int zoneCount, in

bool ZoneSet::CalculateCustomLayout(Rect workArea, int spacing) noexcept
{
wil::unique_cotaskmem_string guuidStr;
if (SUCCEEDED_LOG(StringFromCLSID(m_config.Id, &guuidStr)))
wil::unique_cotaskmem_string guidStr;
if (SUCCEEDED_LOG(StringFromCLSID(m_config.Id, &guidStr)))
{
const std::wstring guuid = guuidStr.get();
const std::wstring guid = guidStr.get();

const auto zoneSetSearchResult = JSONHelpers::FancyZonesDataInstance().FindCustomZoneSet(guuid);
const auto zoneSetSearchResult = JSONHelpers::FancyZonesDataInstance().FindCustomZoneSet(guid);

if (!zoneSetSearchResult.has_value())
{
Expand Down
6 changes: 3 additions & 3 deletions src/modules/fancyzones/lib/ZoneWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ struct ZoneWindow : public winrt::implements<ZoneWindow, IZoneWindow>
IFACEMETHODIMP MoveSizeUpdate(POINT const& ptScreen, bool dragEnabled) noexcept;
IFACEMETHODIMP MoveSizeEnd(HWND window, POINT const& ptScreen) noexcept;
IFACEMETHODIMP_(void)
RestoreOrginalTransparency() noexcept;
RestoreOriginalTransparency() noexcept;
IFACEMETHODIMP_(bool)
IsDragEnabled() noexcept { return m_dragEnabled; }
IFACEMETHODIMP_(void)
Expand Down Expand Up @@ -402,7 +402,7 @@ IFACEMETHODIMP ZoneWindow::MoveSizeUpdate(POINT const& ptScreen, bool dragEnable

IFACEMETHODIMP ZoneWindow::MoveSizeEnd(HWND window, POINT const& ptScreen) noexcept
{
RestoreOrginalTransparency();
RestoreOriginalTransparency();

if (m_windowMoveSize != window)
{
Expand All @@ -425,7 +425,7 @@ IFACEMETHODIMP ZoneWindow::MoveSizeEnd(HWND window, POINT const& ptScreen) noexc
}

IFACEMETHODIMP_(void)
ZoneWindow::RestoreOrginalTransparency() noexcept
ZoneWindow::RestoreOriginalTransparency() noexcept
{
if (m_host->isMakeDraggedWindowTransparentActive() && draggedWindow != nullptr)
{
Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/ZoneWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ interface __declspec(uuid("{7F017528-8110-4FB3-BE41-F472969C2560}")) IZoneWindow
/**
* Restore original transaprency of dragged window.
*/
IFACEMETHOD_(void, RestoreOrginalTransparency) () = 0;
IFACEMETHOD_(void, RestoreOriginalTransparency) () = 0;
/**
* Save information about zone in which window was assigned, when closing the window.
* Used once we open same window again to assign it to its previous zone.
Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/fancyzones.rc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BEGIN
IDS_SETTING_LAUNCH_EDITOR_BUTTON "Edit zones"
IDS_SETTING_LAUNCH_EDITOR_DESCRIPTION "To launch the zone editor, select the Edit zones button below or press the zone editor hotkey anytime"
IDS_SETTING_LAUNCH_EDITOR_HOTKEY_LABEL "Configure the zone editor hotkey"
IDS_SETTING_EXCLCUDED_APPS_DESCRIPTION "To exclude an application from snapping to zones add its name here (one per line). Excluded apps will react to the Windows Snap regardless of all other settings."
IDS_SETTING_EXCLUDED_APPS_DESCRIPTION "To exclude an application from snapping to zones add its name here (one per line). Excluded apps will react to the Windows Snap regardless of all other settings."
IDS_SETTINGS_HIGHLIGHT_OPACITY "Zone opacity (%)"
IDS_FANCYZONES L"FancyZones"
IDS_CANT_DRAG_ELEVATED L"We've detected an application running with administrator privileges. This blocks some functionality in PowerToys. Visit our wiki page to learn more."
Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define IDS_SETTING_LAUNCH_EDITOR_BUTTON 117
#define IDS_SETTING_LAUNCH_EDITOR_DESCRIPTION 118
#define IDS_SETTING_LAUNCH_EDITOR_HOTKEY_LABEL 119
#define IDS_SETTING_EXCLCUDED_APPS_DESCRIPTION 120
#define IDS_SETTING_EXCLUDED_APPS_DESCRIPTION 120
#define IDS_SETTINGS_HIGHLIGHT_OPACITY 121
#define IDS_FANCYZONES 122
#define IDS_CANT_DRAG_ELEVATED 123
Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void Trace::SettingsChanged(const Settings& settings) noexcept
TraceLoggingBoolean(settings.makeDraggedWindowTransparent, "MakeDraggedWindowTransparent"),
TraceLoggingWideString(settings.zoneColor.c_str(), "ZoneColor"),
TraceLoggingWideString(settings.zoneBorderColor.c_str(), "ZoneBorderColor"),
TraceLoggingWideString(settings.zoneHightlightColor.c_str(), "ZoneHighlightColor"),
TraceLoggingWideString(settings.zoneHighlightColor.c_str(), "ZoneHighlightColor"),
TraceLoggingInt32(settings.zoneHighlightOpacity, "ZoneHighlightOpacity"),
TraceLoggingWideString(hotkeyStr.c_str(), "Hotkey"),
TraceLoggingInt32(static_cast<int>(settings.excludedAppsArray.size()), "ExcludedAppsCount"));
Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ UINT GetDpiForMonitor(HMONITOR monitor) noexcept;
void OrderMonitors(std::vector<std::pair<HMONITOR, RECT>>& monitorInfo);
void SizeWindowToRect(HWND window, RECT rect) noexcept;

bool IsInterestingWindow(HWND window, const std::vector<std::wstring>& exludedApps) noexcept;
bool IsInterestingWindow(HWND window, const std::vector<std::wstring>& excludedApps) noexcept;
18 changes: 9 additions & 9 deletions src/modules/fancyzones/tests/UnitTests/FancyZones.Spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ namespace FancyZonesUnitTests
ptSettings.add_int_spinner(L"fancyzones_highlight_opacity", IDS_SETTINGS_HIGHLIGHT_OPACITY, settings.zoneHighlightOpacity, 0, 100, 1);
ptSettings.add_color_picker(L"fancyzones_zoneColor", IDS_SETTING_DESCRIPTION_ZONECOLOR, settings.zoneColor);
ptSettings.add_color_picker(L"fancyzones_zoneBorderColor", IDS_SETTING_DESCRIPTION_ZONE_BORDER_COLOR, settings.zoneBorderColor);
ptSettings.add_color_picker(L"fancyzones_zoneHighlightColor", IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR, settings.zoneHightlightColor);
ptSettings.add_multiline_string(L"fancyzones_excluded_apps", IDS_SETTING_EXCLCUDED_APPS_DESCRIPTION, settings.excludedApps);
ptSettings.add_color_picker(L"fancyzones_zoneHighlightColor", IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR, settings.zoneHighlightColor);
ptSettings.add_multiline_string(L"fancyzones_excluded_apps", IDS_SETTING_EXCLUDED_APPS_DESCRIPTION, settings.excludedApps);

return ptSettings.serialize();
}
Expand Down Expand Up @@ -116,7 +116,7 @@ namespace FancyZonesUnitTests
.use_cursorpos_editor_startupscreen = true,
.zoneColor = L"#abafee",
.zoneBorderColor = L"FAFAFA",
.zoneHightlightColor = L"#FAFAFA",
.zoneHighlightColor = L"#FAFAFA",
.zoneHighlightOpacity = 45,
.editorHotkey = PowerToysSettings::HotkeyObject::from_settings(false, false, false, false, VK_OEM_3),
.excludedApps = L"app\r\napp2",
Expand Down Expand Up @@ -145,7 +145,7 @@ namespace FancyZonesUnitTests
.use_cursorpos_editor_startupscreen = true,
.zoneColor = L"#FAFAFA",
.zoneBorderColor = L"#abafee",
.zoneHightlightColor = L"#FAFAFA",
.zoneHighlightColor = L"#FAFAFA",
.zoneHighlightOpacity = 45,
.editorHotkey = PowerToysSettings::HotkeyObject::from_settings(false, false, false, false, VK_OEM_3),
.excludedApps = L"app\r\napp2",
Expand Down Expand Up @@ -176,7 +176,7 @@ namespace FancyZonesUnitTests
.makeDraggedWindowTransparent = true,
.zoneColor = L"#FAFAFA",
.zoneBorderColor = L"FAFAFA",
.zoneHightlightColor = L"#abafee",
.zoneHighlightColor = L"#abafee",
.zoneHighlightOpacity = 45,
.editorHotkey = PowerToysSettings::HotkeyObject::from_settings(false, false, false, false, VK_OEM_3),
.excludedApps = L"app\r\napp2",
Expand Down Expand Up @@ -207,7 +207,7 @@ namespace FancyZonesUnitTests
.makeDraggedWindowTransparent = true,
.zoneColor = L"#FAFAFA",
.zoneBorderColor = L"FAFAFA",
.zoneHightlightColor = L"#abafee",
.zoneHighlightColor = L"#abafee",
.zoneHighlightOpacity = expected,
.editorHotkey = PowerToysSettings::HotkeyObject::from_settings(false, false, false, false, VK_OEM_3),
.excludedApps = L"app\r\napp2",
Expand Down Expand Up @@ -238,7 +238,7 @@ namespace FancyZonesUnitTests
.makeDraggedWindowTransparent = true,
.zoneColor = L"#FAFAFA",
.zoneBorderColor = L"FAFAFA",
.zoneHightlightColor = L"#abafee",
.zoneHighlightColor = L"#abafee",
.zoneHighlightOpacity = expected,
.editorHotkey = PowerToysSettings::HotkeyObject::from_settings(false, false, false, false, VK_OEM_3),
.excludedApps = L"app\r\napp2",
Expand Down Expand Up @@ -292,8 +292,8 @@ namespace FancyZonesUnitTests
ptSettings.add_int_spinner(L"fancyzones_highlight_opacity", IDS_SETTINGS_HIGHLIGHT_OPACITY, settings.zoneHighlightOpacity, 0, 100, 1);
ptSettings.add_color_picker(L"fancyzones_zoneColor", IDS_SETTING_DESCRIPTION_ZONECOLOR, settings.zoneColor);
ptSettings.add_color_picker(L"fancyzones_zoneBorderColor", IDS_SETTING_DESCRIPTION_ZONE_BORDER_COLOR, settings.zoneBorderColor);
ptSettings.add_color_picker(L"fancyzones_zoneHighlightColor", IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR, settings.zoneHightlightColor);
ptSettings.add_multiline_string(L"fancyzones_excluded_apps", IDS_SETTING_EXCLCUDED_APPS_DESCRIPTION, settings.excludedApps);
ptSettings.add_color_picker(L"fancyzones_zoneHighlightColor", IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR, settings.zoneHighlightColor);
ptSettings.add_multiline_string(L"fancyzones_excluded_apps", IDS_SETTING_EXCLUDED_APPS_DESCRIPTION, settings.excludedApps);

return ptSettings.serialize();
}
Expand Down

0 comments on commit ecb5d2a

Please sign in to comment.