mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
Spelling: ... (#3398)
This commit is contained in:
@@ -5,4 +5,4 @@ The PowerToys are split into DLLs for each PowerToy module ([`modules`](/src/mod
|
||||
|
||||
The settings window is a separate executable, contained in [`settings`](/src/settings) folder. It utilizes a WebView to display an HTML-based settings window (contained in [`settings-web`](/src/settings-web) folder).
|
||||
|
||||
The [`common`](/src/common) contains code for a static libary with helper functions, used by both the runner and the PowerToys modules.
|
||||
The [`common`](/src/common) contains code for a static library with helper functions, used by both the runner and the PowerToys modules.
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
/*
|
||||
Usage:
|
||||
When creating animation contstructor takes one parameter - how long
|
||||
When creating animation constructor takes one parameter - how long
|
||||
should the animation take in seconds.
|
||||
|
||||
Call reset() when starting animation.
|
||||
|
||||
When redering, call value() to get value from 0 to 1 - depending on animation
|
||||
When rendering, call value() to get value from 0 to 1 - depending on animation
|
||||
progress.
|
||||
*/
|
||||
class Animation
|
||||
|
||||
@@ -191,7 +191,7 @@ ShortcutGuideFilter get_shortcutguide_filtered_window()
|
||||
// WinKey + Up just won't maximize the window. Similary, without
|
||||
// WS_MINIMIZEBOX the window will not get minimized. A "Save As..." dialog
|
||||
// is a example of such window - it can be snapped to both sides and to
|
||||
// all screen conrers, but will not get maximized nor minimized.
|
||||
// all screen corners, but will not get maximized nor minimized.
|
||||
// For now, since ShortcutGuide can only disable entire "Windows Controls"
|
||||
// group, we require that the window supports all the options.
|
||||
result.snappable = ((style & WS_MAXIMIZEBOX) == WS_MAXIMIZEBOX) &&
|
||||
@@ -577,7 +577,7 @@ std::wstring get_process_path(HWND window) noexcept
|
||||
if (name.length() >= app_frame_host.length() &&
|
||||
name.compare(name.length() - app_frame_host.length(), app_frame_host.length(), app_frame_host) == 0)
|
||||
{
|
||||
// It is a UWP app. We will enumarate the windows and look for one created
|
||||
// It is a UWP app. We will enumerate the windows and look for one created
|
||||
// by something with a different PID
|
||||
DWORD new_pid = pid;
|
||||
EnumChildWindows(
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
// Returns RECT with positions of the minmize/maximize buttons of the given window.
|
||||
// Returns RECT with positions of the minimize/maximize buttons of the given window.
|
||||
// Does not always work, since some apps draw custom toolbars.
|
||||
std::optional<RECT> get_button_pos(HWND hwnd);
|
||||
// Gets position of given window.
|
||||
std::optional<RECT> get_window_pos(HWND hwnd);
|
||||
// Gets mouse postion.
|
||||
// Gets mouse position.
|
||||
std::optional<POINT> get_mouse_pos();
|
||||
|
||||
// Test if window can be zoned by FancyZones
|
||||
@@ -63,7 +63,7 @@ WindowState get_window_state(HWND hwnd);
|
||||
// Returns true if the current process is running with elevated privileges
|
||||
bool is_process_elevated(const bool use_cached_value = true);
|
||||
|
||||
// Drops the elevated privilages if present
|
||||
// Drops the elevated privileges if present
|
||||
bool drop_elevated_privileges();
|
||||
|
||||
// Run command as elevated user, returns true if succeeded
|
||||
@@ -72,7 +72,7 @@ bool run_elevated(const std::wstring& file, const std::wstring& params);
|
||||
// Run command as non-elevated user, returns true if succeeded, puts the process id into returnPid if returnPid != NULL
|
||||
bool run_non_elevated(const std::wstring& file, const std::wstring& params, DWORD* returnPid);
|
||||
|
||||
// Run command with the same elevation, returns true if succedded
|
||||
// Run command with the same elevation, returns true if succeeded
|
||||
bool run_same_elevation(const std::wstring& file, const std::wstring& params);
|
||||
|
||||
// Returns true if the current process is running from administrator account
|
||||
|
||||
@@ -69,7 +69,7 @@ void D2DWindow::base_init()
|
||||
&options,
|
||||
d2d_factory.put_void()));
|
||||
}
|
||||
// For all other stuff - assing nullptr first to release the object, to reset the com_ptr.
|
||||
// For all other stuff - assign nullptr first to release the object, to reset the com_ptr.
|
||||
d2d_dc = nullptr;
|
||||
d2d_device = nullptr;
|
||||
dxgi_factory = nullptr;
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace PowerToysSettings
|
||||
{
|
||||
auto layout = GetKeyboardLayout(0);
|
||||
auto scan_code = MapVirtualKeyExW(key_code, MAPVK_VK_TO_VSC_EX, layout);
|
||||
// Determinate if vk is an extended key. Unfortunatly MAPVK_VK_TO_VSC_EX
|
||||
// Determinate if vk is an extended key. Unfortunately MAPVK_VK_TO_VSC_EX
|
||||
// does not return correct values.
|
||||
static std::vector<UINT> extended_keys = {
|
||||
VK_APPS,
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
</data>
|
||||
<data name="KeyboardManager_ProfileDescription.Text" xml:space="preserve">
|
||||
<value>Select the profile to display the active key remap and shortcuts</value>
|
||||
<comment>Keyboard Manager configuration dropdown decription</comment>
|
||||
<comment>Keyboard Manager configuration dropdown description</comment>
|
||||
</data>
|
||||
<data name="KeyboardManager_RemapKeyboardButton.Content" xml:space="preserve">
|
||||
<value>Remap a key</value>
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
dispatcher = Window.Current.Dispatcher;
|
||||
if (SettingsUtils.SettingsExists(PowerToyName))
|
||||
{
|
||||
// Todo: Be more resillent while reading and saving settings.
|
||||
// Todo: Be more resilient while reading and saving settings.
|
||||
settings = SettingsUtils.GetSettings<KeyboardManagerSettings>(PowerToyName);
|
||||
|
||||
// Load profile.
|
||||
@@ -158,8 +158,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
private async void OnConfigFileUpdate()
|
||||
{
|
||||
// Note: FileSystemWatcher raise notification mutiple times for single update operation.
|
||||
// Todo: Handle duplicate events either by somehow supress them or re-read the configuration everytime since we will be updating the UI only if something is changed.
|
||||
// Note: FileSystemWatcher raise notification multiple times for single update operation.
|
||||
// Todo: Handle duplicate events either by somehow suppress them or re-read the configuration everytime since we will be updating the UI only if something is changed.
|
||||
if (LoadProfile())
|
||||
{
|
||||
await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
public sealed partial class ShellPage : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Delcaration for the ipc callback function.
|
||||
/// Declaration for the ipc callback function.
|
||||
/// </summary>
|
||||
/// <param name="msg">message.</param>
|
||||
public delegate void IPCMessageCallback(string msg);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CommonLibTest
|
||||
{
|
||||
// Work around for System.JSON required properties:
|
||||
// https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.
|
||||
// Test also failes when the attributes are not initiliazed i.e they have null values.
|
||||
// Test also fails when the attributes are not initialized i.e they have null values.
|
||||
[TestMethod]
|
||||
[Obsolete]
|
||||
public void ToJsonString_ShouldReturnValidJSONOfModel_WhenSuccessful()
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace ViewModelTests
|
||||
ShortcutGuideViewModel viewModel = new ShortcutGuideViewModel();
|
||||
|
||||
// Assert
|
||||
// Initilize mock function of sending IPC message.
|
||||
// Initialize mock function of sending IPC message.
|
||||
ShellPage.DefaultSndMSGCallback = msg =>
|
||||
{
|
||||
OutGoingGeneralSettings snd = JsonSerializer.Deserialize<OutGoingGeneralSettings>(msg);
|
||||
@@ -77,7 +77,7 @@ namespace ViewModelTests
|
||||
Assert.AreEqual(1, viewModel.ThemeIndex);
|
||||
|
||||
// Assert
|
||||
// Initilize mock function of sending IPC message.
|
||||
// Initialize mock function of sending IPC message.
|
||||
ShellPage.DefaultSndMSGCallback = msg =>
|
||||
{
|
||||
ShortcutGuideSettingsIPCMessage snd = JsonSerializer.Deserialize<ShortcutGuideSettingsIPCMessage>(msg);
|
||||
@@ -96,7 +96,7 @@ namespace ViewModelTests
|
||||
Assert.AreEqual(900, viewModel.PressTime);
|
||||
|
||||
// Assert
|
||||
// Initilize mock function of sending IPC message.
|
||||
// Initialize mock function of sending IPC message.
|
||||
ShellPage.DefaultSndMSGCallback = msg =>
|
||||
{
|
||||
ShortcutGuideSettingsIPCMessage snd = JsonSerializer.Deserialize<ShortcutGuideSettingsIPCMessage>(msg);
|
||||
@@ -115,7 +115,7 @@ namespace ViewModelTests
|
||||
Assert.AreEqual(90, viewModel.OverlayOpacity);
|
||||
|
||||
// Assert
|
||||
// Initilize mock function of sending IPC message.
|
||||
// Initialize mock function of sending IPC message.
|
||||
ShellPage.DefaultSndMSGCallback = msg =>
|
||||
{
|
||||
ShortcutGuideSettingsIPCMessage snd = JsonSerializer.Deserialize<ShortcutGuideSettingsIPCMessage>(msg);
|
||||
|
||||
@@ -120,7 +120,7 @@ int runner(bool isProcessElevated)
|
||||
notifications::register_background_toast_handler();
|
||||
|
||||
chdir_current_executable();
|
||||
// Load Powertyos DLLS
|
||||
// Load Powertoys DLLS
|
||||
// For now only load known DLLs
|
||||
|
||||
std::wstring baseModuleFolder = L"modules/";
|
||||
|
||||
Reference in New Issue
Block a user