Skip to content

Commit

Permalink
Spelling: ... src/modules (#3712)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed May 26, 2020
1 parent b6307b4 commit b1554eb
Show file tree
Hide file tree
Showing 27 changed files with 42 additions and 42 deletions.
4 changes: 2 additions & 2 deletions src/modules/example_powertoy/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ExamplePowertoy : public PowertoyModuleIface
}

// Return array of the names of all events that this powertoy listens for, with
// nullptr as the last element of the array. Nullptr can also be retured for empty
// nullptr as the last element of the array. Nullptr can also be returned for empty
// list.
// Right now there is only lowlevel keyboard hook event
virtual const wchar_t** get_events() override
Expand Down Expand Up @@ -122,7 +122,7 @@ class ExamplePowertoy : public PowertoyModuleIface
);

// Add a custom action property. When using this settings type, the "PowertoyModuleIface::call_custom_action()"
// method should be overriden as well.
// method should be overridden as well.
settings.add_custom_action(
L"test_custom_action", // action name.
L"This is what a CustomAction property looks like", // label above the field.
Expand Down
4 changes: 2 additions & 2 deletions src/modules/fancyzones/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If two zones are adjacent, a window can be snapped to the sum of their area (rou
| Shortcut | Action |
| ----------- | ----------- |
| Win + ` | Launches editor (this shortcut is editable in the settings dialog) |
| Win+Left/Right Arrow | Move focused window between zones (only if `Override Windows Snap hotkeys` setting is turned on, in that case only the `Win+Left Arrow` and `Win+Right Arrow` are overriden, while the `Win+Up Arrow` and `Win+Down Arrow` keep working as usual) |
| Win+Left/Right Arrow | Move focused window between zones (only if `Override Windows Snap hotkeys` setting is turned on, in that case only the `Win+Left Arrow` and `Win+Right Arrow` are overridden, while the `Win+Up Arrow` and `Win+Down Arrow` keep working as usual) |

FancyZones doesn't override the Windows 10 `Win+Shift+Arrow` to quickly move a window to an adjacent monitor.

Expand All @@ -56,7 +56,7 @@ FancyZones doesn't override the Windows 10 `Win+Shift+Arrow` to quickly move a w
| Zone Inactive color (Default #F5FCFF) | The color that zones become when they are not an active drop during a window drag |
| Zone border color (Default #FFFFFF) | The color of the border of active and inactive zones |
| Zone opacity (%) (Default 50%) | The percentage of opacity of active and inactive zones |
| Exclude applications from snapping to zones | Add the applications name, or part of the name, one per line (e.g., adding `Notepa` will match both `Notepad.exe` and `Notepad++.exe`, to match only `Notepad.exe` add the `.exe` extension) |
| Exclude applications from snapping to zones | Add the applications name, or part of the name, one per line (e.g., adding `Notepad` will match both `Notepad.exe` and `Notepad++.exe`, to match only `Notepad.exe` add the `.exe` extension) |

![FancyZones Settings UI](FancyZonesSettings1.png)

Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/dll/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class FancyZonesModule : public PowertoyModuleIface
}

// Return array of the names of all events that this powertoy listens for, with
// nullptr as the last element of the array. Nullptr can also be retured for empty list.
// nullptr as the last element of the array. Nullptr can also be returned for empty list.
virtual PCWSTR* get_events() override
{
return nullptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace FancyZonesEditor
{
/// <summary>
/// Once you've "Committ"ed the starter grid, then the Zones within the grid come to life for you to be able to further subdivide them
/// Once you've "Commit"ted the starter grid, then the Zones within the grid come to life for you to be able to further subdivide them
/// using splitters
/// </summary>
public partial class CanvasZone : UserControl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace FancyZonesEditor
{
/// <summary>
/// Once you've "Committ"ed the starter grid, then the Zones within the grid come to life for you to be able to further subdivide them
/// Once you've "Commit"ted the starter grid, then the Zones within the grid come to life for you to be able to further subdivide them
/// using splitters
/// </summary>
public partial class GridZone : UserControl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public bool IsSelected

private bool _isSelected;

// implementation of INotifyProeprtyChanged
// implementation of INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;

// FirePropertyChanged -- wrapper that calls INPC.PropertyChanged
Expand Down Expand Up @@ -163,7 +163,7 @@ public static void SerializeDeletedCustomZoneSets()
}
}

// Loads all the custom Layouts from tmp file passed by FancuZonesLib
// Loads all the custom Layouts from tmp file passed by FancyZonesLib
public static ObservableCollection<LayoutModel> LoadCustomModels()
{
_customModels = new ObservableCollection<LayoutModel>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public static bool IsPredefinedLayout(LayoutModel model)
return model.Type != LayoutType.Custom;
}

// implementation of INotifyProeprtyChanged
// implementation of INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;

// FirePropertyChanged -- wrapper that calls INPC.PropertyChanged
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 @@ -942,7 +942,7 @@ bool FancyZones::IsNewWorkArea(GUID virtualDesktopId, HMONITOR monitor) noexcept

void FancyZones::OnEditorExitEvent() noexcept
{
// Colect information about changes in zone layout after editor exited.
// Collect information about changes in zone layout after editor exited.
JSONHelpers::FancyZonesDataInstance().ParseDeviceInfoFromTmpFile(ZoneWindowUtils::GetActiveZoneSetTmpPath());
JSONHelpers::FancyZonesDataInstance().ParseDeletedCustomZoneSetsFromTmpFile(ZoneWindowUtils::GetCustomZoneSetsTmpPath());
JSONHelpers::FancyZonesDataInstance().ParseCustomZoneSetFromTmpFile(ZoneWindowUtils::GetAppliedZoneSetTmpPath());
Expand Down
4 changes: 2 additions & 2 deletions src/modules/fancyzones/lib/FancyZones.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ interface __declspec(uuid("{5C8D99D6-34B2-4F4A-A8E5-7483F6869775}")) IZoneWindow
*/
IFACEMETHOD_(IZoneWindow*, GetParentZoneWindow) (HMONITOR monitor) = 0;
/**
* @returns Integer in range [0, 100] indicating opacity of highlited zone (while giving zone layout hints).
* @returns Integer in range [0, 100] indicating opacity of highlighted zone (while giving zone layout hints).
*/
IFACEMETHOD_(int, GetZoneHighlightOpacity)() = 0;
/**
* @returns Boolean indicating if dragged window should be transparrent.
* @returns Boolean indicating if dragged window should be transparent.
*/
IFACEMETHOD_(bool, isMakeDraggedWindowTransparentActive) () = 0;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ IFACEMETHODIMP_(bool) FancyZonesSettings::GetConfig(_Out_ PWSTR buffer, _Out_ in
settings.set_video_link(L"https://youtu.be/rTtGzZYAXgY");

// Add a custom action property. When using this settings type, the "PowertoyModuleIface::call_custom_action()"
// method should be overriden as well.
// method should be overridden as well.
settings.add_custom_action(
L"ToggledFZEditor", // action name.
IDS_SETTING_LAUNCH_EDITOR_LABEL,
Expand Down
4 changes: 2 additions & 2 deletions src/modules/fancyzones/lib/ZoneWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ interface __declspec(uuid("{7F017528-8110-4FB3-BE41-F472969C2560}")) IZoneWindow
* is dropped within zone borders.
*
* @param window Handle of window being moved or resized.
* @param ptScreen Cursor coordinates where window is droped.
* @param ptScreen Cursor coordinates where window is dropped.
*/
IFACEMETHOD(MoveSizeEnd)(HWND window, POINT const& ptScreen) = 0;
/**
Expand Down Expand Up @@ -79,7 +79,7 @@ interface __declspec(uuid("{7F017528-8110-4FB3-BE41-F472969C2560}")) IZoneWindow
*/
IFACEMETHOD_(void, CycleActiveZoneSet)(DWORD vkCode) = 0;
/**
* Restore orginal transaprency of dragged window.
* Restore original transaprency of dragged window.
*/
IFACEMETHOD_(void, RestoreOrginalTransparency) () = 0;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/modules/imageresizer/dll/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ImageResizerModule : public PowertoyModuleIface
}

// Return array of the names of all events that this powertoy listens for, with
// nullptr as the last element of the array. Nullptr can also be retured for empty
// nullptr as the last element of the array. Nullptr can also be returned for empty
// list.
virtual const wchar_t** get_events() override
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void KeyboardManagerState::SelectDetectedRemapKey(DWORD key)

void KeyboardManagerState::SelectDetectedShortcut(DWORD key)
{
// Set the new key and store if a change occured
// Set the new key and store if a change occurred
std::unique_lock<std::mutex> lock(detectedShortcut_mutex);
bool updateUI = detectedShortcut.SetKey(key);
lock.unlock();
Expand Down
8 changes: 4 additions & 4 deletions src/modules/keyboardmanager/common/KeyboardManagerState.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class KeyboardManagerState

public:
// The map members and their mutexes are left as public since the maps are used extensively in dllmain.cpp.
// Maps which store the remappings for each of the features. The bool fields should be initalised to false. They are used to check the current state of the shortcut (i.e is that particular shortcut currently pressed down or not).
// Maps which store the remappings for each of the features. The bool fields should be initialized to false. They are used to check the current state of the shortcut (i.e is that particular shortcut currently pressed down or not).
// Stores single key remappings
std::unordered_map<DWORD, DWORD> singleKeyReMap;
std::mutex singleKeyReMap_mutex;
Expand Down Expand Up @@ -179,9 +179,9 @@ class KeyboardManagerState
// Save the updated configuration.
bool SaveConfigToFile();

// Sets the Current Active Configuartion Name.
// Sets the Current Active Configuration Name.
void SetCurrentConfigName(const std::wstring& configName);

// Gets the Current Active Configuartion Name.
// Gets the Current Active Configuration Name.
std::wstring GetCurrentConfigName();
};
};
2 changes: 1 addition & 1 deletion src/modules/keyboardmanager/common/Shortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ KeyboardManagerHelper::ErrorType Shortcut::DoKeysOverlap(const Shortcut& first,
// action keys match
else if (first.actionKey == second.actionKey)
{
// corresponding modifiers are either both disabled or both not disabled - this ensures that both match in types of modifers i.e. Ctrl(l/r/c) Shift (l/r/c) A matches Ctrl(l/r/c) Shift (l/r/c) A
// corresponding modifiers are either both disabled or both not disabled - this ensures that both match in types of modifiers i.e. Ctrl(l/r/c) Shift (l/r/c) A matches Ctrl(l/r/c) Shift (l/r/c) A
if (((first.winKey != ModifierKey::Disabled && second.winKey != ModifierKey::Disabled) || (first.winKey == ModifierKey::Disabled && second.winKey == ModifierKey::Disabled)) &&
((first.ctrlKey != ModifierKey::Disabled && second.ctrlKey != ModifierKey::Disabled) || (first.ctrlKey == ModifierKey::Disabled && second.ctrlKey == ModifierKey::Disabled)) &&
((first.altKey != ModifierKey::Disabled && second.altKey != ModifierKey::Disabled) || (first.altKey == ModifierKey::Disabled && second.altKey == ModifierKey::Disabled)) &&
Expand Down
2 changes: 1 addition & 1 deletion src/modules/keyboardmanager/common/Shortcut.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Shortcut
{
}

// Constructor to intialize Shortcut from it's virtual key code string representation.
// Constructor to initialize Shortcut from it's virtual key code string representation.
Shortcut(const std::wstring& shortcutVK) :
winKey(ModifierKey::Disabled), ctrlKey(ModifierKey::Disabled), altKey(ModifierKey::Disabled), shiftKey(ModifierKey::Disabled), actionKey(NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion src/modules/keyboardmanager/dll/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class KeyboardManager : public PowertoyModuleIface
}

// Return array of the names of all events that this powertoy listens for, with
// nullptr as the last element of the array. Nullptr can also be retured for empty
// nullptr as the last element of the array. Nullptr can also be returned for empty
// list.
virtual const wchar_t** get_events() override
{
Expand Down
2 changes: 1 addition & 1 deletion src/modules/powerrename/dll/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class PowerRenameModule : public PowertoyModuleIface
}

// Return array of the names of all events that this powertoy listens for, with
// nullptr as the last element of the array. Nullptr can also be retured for empty list.
// nullptr as the last element of the array. Nullptr can also be returned for empty list.
virtual PCWSTR* get_events() override
{
return nullptr;
Expand Down
4 changes: 2 additions & 2 deletions src/modules/powerrename/ui/PowerRenameUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ void CPowerRenameUI::_Cleanup()

void CPowerRenameUI::_EnumerateItems(_In_ IUnknown* pdtobj)
{
// Enumerate the data object and popuplate the manager
// Enumerate the data object and populate the manager
if (m_spsrm)
{
m_disableCountUpdate = true;
Expand Down Expand Up @@ -640,7 +640,7 @@ void CPowerRenameUI::_OnInitDlg()
_InitAutoComplete();

// Disable rename button by default. It will be enabled in _UpdateCounts if
// there are tiems to be renamed
// there are times to be renamed
EnableWindow(GetDlgItem(m_hwnd, ID_RENAME), FALSE);

// Update UI elements that depend on number of items selected or to be renamed
Expand Down
2 changes: 1 addition & 1 deletion src/modules/previewpane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Update the `PackagingLayout.xml` to include dll's required by the new Preview Ha
<File DestinationPath="modules\XYZDependency.dll" SourcePath="..\..\x64\Release\modules\XYZDependency.dll"/>
```

Add the actual Clsid of the new preview handler in `CLSID.h` in `powerpreview` project and class registration registry changes in `registry.dat` similar to existing preview handler. To update the `registry.dat` mount the registry hive on a empty key in registry by using `reggedit.exe` and add registry key for class registartion for the new preview handler similar to MSI class registration and existing preview handlers. And export the updated `registry.dat` hive also export the `registry.reg` file for making the contents in `registy.dat` visible in source code.
Add the actual Clsid of the new preview handler in `CLSID.h` in `powerpreview` project and class registration registry changes in `registry.dat` similar to existing preview handler. To update the `registry.dat` mount the registry hive on a empty key in registry by using `reggedit.exe` and add registry key for class registration for the new preview handler similar to MSI class registration and existing preview handlers. And export the updated `registry.dat` hive also export the `registry.reg` file for making the contents in `registry.dat` visible in source code.

```cpp
// CLSID used in manifest file for Preview Handler.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace SvgPreviewHandler.Telemetry.Events
{
/// <summary>
/// A telemetry event to be raised when an error has occured in the preview pane.
/// A telemetry event to be raised when an error has occurred in the preview pane.
/// </summary>
[EventData]
public class SvgFilePreviewError : EventBase, IEvent
{
/// <summary>
/// Gets or sets the error messsage to log as part of the telemetry event.
/// Gets or sets the error message to log as part of the telemetry event.
/// </summary>
public string Message { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions src/modules/previewpane/common/handlers/PreviewHandlerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Common
{
/// <summary>
/// Preview Handler base class implmenenting interfaces required by Preview Handler.
/// Preview Handler base class implementing interfaces required by Preview Handler.
/// </summary>
public abstract class PreviewHandlerBase : IPreviewHandler, IOleWindow, IObjectWithSite, IPreviewHandlerVisuals
{
Expand Down Expand Up @@ -150,7 +150,7 @@ public void SetTextColor(COLORREF color)
}

/// <summary>
/// Provide instance of the implementation of <see cref="IPreviewHandlerControl"/>. Should be overide by the implementation class with control object to be used.
/// Provide instance of the implementation of <see cref="IPreviewHandlerControl"/>. Should be overridden by the implementation class with a control object to be used.
/// </summary>
/// <returns>Instance of the <see cref="IPreviewHandlerControl"/>.</returns>
protected abstract IPreviewHandlerControl CreatePreviewHandlerControl();
Expand Down
2 changes: 1 addition & 1 deletion src/modules/previewpane/powerpreview/powerpreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void PowerPreviewModule::enable()
{
if (previewHandler->GetToggleSettingState())
{
// Enable all the previews with intial state set as true.
// Enable all the previews with initial state set as true.
previewHandler->EnablePreview();
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/modules/previewpane/powerpreview/powerpreview.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PowerPreviewModule : public PowertoyModuleIface
PowerPreviewModule() :
m_moduleName(GET_RESOURCE_STRING(IDS_MODULE_NAME)),
m_previewHandlers(
{ // SVG Preview Hanlder settings object.
{ // SVG Preview Handler settings object.
new FileExplorerPreviewSettings(
true,
L"svg-previewer-toggle-setting",
Expand Down
6 changes: 3 additions & 3 deletions src/modules/previewpane/powerpreview/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace PowerPreviewSettings
// Relative(HKLM/HKCU) sub key path of Preview Handlers list in registry.
static LPCWSTR preview_handlers_subkey = L"Software\\Microsoft\\Windows\\CurrentVersion\\PreviewHandlers";

// Base Settinngs Class Implementation
// Base Settings Class Implementation
FileExplorerPreviewSettings::FileExplorerPreviewSettings(bool toggleSettingEnabled, const std::wstring& toggleSettingName, const std::wstring& toggleSettingDescription, LPCWSTR clsid, const std::wstring& registryValueData, RegistryWrapperIface* registryWrapper) :
m_toggleSettingEnabled(toggleSettingEnabled),
m_toggleSettingName(toggleSettingName),
Expand Down Expand Up @@ -63,13 +63,13 @@ namespace PowerPreviewSettings
return this->m_registryValueData;
}

// Load intital state of the Preview Handler. If no inital state present initialize setting with default value.
// Load initial state of the Preview Handler. If no inital state present initialize setting with default value.
void FileExplorerPreviewSettings::LoadState(PowerToysSettings::PowerToyValues& settings)
{
auto toggle = settings.get_bool_value(this->GetToggleSettingName());
if (toggle)
{
// If no exisiting setting found leave the default intitialization value.
// If no existing setting found leave the default initialization value.
this->UpdateToggleSettingState(*toggle);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/previewpane/powerpreview/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace PowerPreviewSettings
{
// PowerToy Winodws Explore File Preview Settings.
// PowerToy Windows Explore File Preview Settings.
class FileExplorerPreviewSettings
{
private:
Expand Down
6 changes: 3 additions & 3 deletions src/modules/shortcut_guide/overlay_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void D2DOverlayWindow::on_hide()
DwmUnregisterThumbnail(thumbnail);
}
std::chrono::steady_clock::time_point shown_end_time = std::chrono::steady_clock::now();
// Trace the event only if the overaly window was visible.
// Trace the event only if the overlay window was visible.
if (shown_start_time.time_since_epoch().count() > 0)
{
Trace::HideGuide(std::chrono::duration_cast<std::chrono::milliseconds>(shown_end_time - shown_start_time).count(), key_pressed);
Expand Down Expand Up @@ -512,7 +512,7 @@ void D2DOverlayWindow::resize()
window_rect = *get_window_pos(hwnd);
float no_active_scale, font;
if (window_width >= window_height)
{ // portriat is broke right now
{ // portrait is broke right now
use_overlay = &landscape;
no_active_scale = 0.3f;
font = 15.0f;
Expand Down Expand Up @@ -692,7 +692,7 @@ void D2DOverlayWindow::render(ID2D1DeviceContext5* d2d_dc)
total_monitor_with_screen.rect.right = max(total_monitor_with_screen.rect.right, thumb_window->right + monitor_dx);
total_monitor_with_screen.rect.bottom = max(total_monitor_with_screen.rect.bottom, thumb_window->bottom + monitor_dy);
}
// Only allow the new rect beeing slight bigger.
// Only allow the new rect being slight bigger.
if (total_monitor_with_screen.width() - total_screen.width() > (thumb_window->right - thumb_window->left) / 2 ||
total_monitor_with_screen.height() - total_screen.height() > (thumb_window->bottom - thumb_window->top) / 2)
{
Expand Down

0 comments on commit b1554eb

Please sign in to comment.