Skip to content

Commit

Permalink
Merge pull request #3620 from csinkers/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
tig authored Jul 19, 2024
2 parents 7c0a3be + 114d9aa commit e8644f3
Show file tree
Hide file tree
Showing 65 changed files with 188 additions and 189 deletions.
24 changes: 12 additions & 12 deletions Terminal.Gui/Application/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ internal static void ResetState (bool ignoreDisposed = false)
Colors.Reset ();

// Reset synchronization context to allow the user to run async/await,
// as the main loop has been ended, the synchronization context from
// as the main loop has been ended, the synchronization context from
// gui.cs does no longer process any callbacks. See #1084 for more details:
// (https://github.com/gui-cs/Terminal.Gui/issues/1084).
SynchronizationContext.SetSynchronizationContext (null);
Expand Down Expand Up @@ -203,11 +203,11 @@ internal static void ResetState (bool ignoreDisposed = false)
// INTERNAL function for initializing an app with a Toplevel factory object, driver, and mainloop.
//
// Called from:
//
//
// Init() - When the user wants to use the default Toplevel. calledViaRunT will be false, causing all state to be reset.
// Run<T>() - When the user wants to use a custom Toplevel. calledViaRunT will be true, enabling Run<T>() to be called without calling Init first.
// Unit Tests - To initialize the app with a custom Toplevel, using the FakeDriver. calledViaRunT will be false, causing all state to be reset.
//
//
// calledViaRunT: If false (default) all state will be reset. If true the state will not be reset.
[RequiresUnreferencedCode ("AOT")]
[RequiresDynamicCode ("AOT")]
Expand Down Expand Up @@ -242,7 +242,7 @@ internal static void InternalInit (
// Start the process of configuration management.
// Note that we end up calling LoadConfigurationFromAllSources
// multiple times. We need to do this because some settings are only
// valid after a Driver is loaded. In this cases we need just
// valid after a Driver is loaded. In this case we need just
// `Settings` so we can determine which driver to use.
// Don't reset, so we can inherit the theme from the previous run.
Load ();
Expand Down Expand Up @@ -383,7 +383,7 @@ public static void Shutdown ()
/// </remarks>
public static event EventHandler<RunStateEventArgs> NotifyNewRunState;

/// <summary>Notify that a existent <see cref="RunState"/> is stopping (<see cref="End(RunState)"/> was called).</summary>
/// <summary>Notify that an existent <see cref="RunState"/> is stopping (<see cref="End(RunState)"/> was called).</summary>
/// <remarks>
/// If <see cref="EndAfterFirstIteration"/> is <see langword="true"/> callers to <see cref="Begin(Toplevel)"/>
/// must also subscribe to <see cref="NotifyStopRunState"/> and manually dispose of the <see cref="RunState"/> token
Expand Down Expand Up @@ -463,7 +463,7 @@ public static RunState Begin (Toplevel toplevel)
Top.OnLeave (toplevel);
}

// BUGBUG: We should not depend on `Id` internally.
// BUGBUG: We should not depend on `Id` internally.
// BUGBUG: It is super unclear what this code does anyway.
if (string.IsNullOrEmpty (toplevel.Id))
{
Expand Down Expand Up @@ -851,7 +851,7 @@ public static void Invoke (Action action)
}

// TODO: Determine if this is really needed. The only code that calls WakeUp I can find
// is ProgressBarStyles and it's not clear it needs to.
// is ProgressBarStyles, and it's not clear it needs to.
/// <summary>Wakes up the running application that might be waiting on input.</summary>
public static void Wakeup () { MainLoop?.Wakeup (); }

Expand Down Expand Up @@ -1160,13 +1160,13 @@ public static void End (RunState runState)
runState.Toplevel.OnUnloaded ();
}

// End the RunState.Toplevel
// End the RunState.Toplevel
// First, take it off the Toplevel Stack
if (_topLevels.Count > 0)
{
if (_topLevels.Peek () != runState.Toplevel)
{
// If there the top of the stack is not the RunState.Toplevel then
// If the top of the stack is not the RunState.Toplevel then
// this call to End is not balanced with the call to Begin that started the RunState
throw new ArgumentException ("End must be balanced with calls to Begin");
}
Expand All @@ -1177,8 +1177,8 @@ public static void End (RunState runState)
// Notify that it is closing
runState.Toplevel?.OnClosed (runState.Toplevel);

// If there is a OverlappedTop that is not the RunState.Toplevel then runstate.TopLevel
// is a child of MidTop and we should notify the OverlappedTop that it is closing
// If there is a OverlappedTop that is not the RunState.Toplevel then RunState.Toplevel
// is a child of MidTop, and we should notify the OverlappedTop that it is closing
if (OverlappedTop is { } && !runState.Toplevel.Modal && runState.Toplevel != OverlappedTop)
{
OverlappedTop.OnChildClosed (runState.Toplevel);
Expand Down Expand Up @@ -1234,7 +1234,7 @@ public static void End (RunState runState)

/// <summary>Holds the stack of TopLevel views.</summary>

// BUGBUG: Techncally, this is not the full lst of TopLevels. THere be dragons hwre. E.g. see how Toplevel.Id is used. What
// BUGBUG: Technically, this is not the full lst of TopLevels. There be dragons here, e.g. see how Toplevel.Id is used. What
// about TopLevels that are just a SubView of another View?
internal static readonly Stack<Toplevel> _topLevels = new ();

Expand Down
8 changes: 4 additions & 4 deletions Terminal.Gui/Clipboard/IClipboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ public interface IClipboard
/// <summary>Returns true if the environmental dependencies are in place to interact with the OS clipboard.</summary>
bool IsSupported { get; }

/// <summary>Get the operation system clipboard.</summary>
/// <summary>Get the operating system clipboard.</summary>
/// <exception cref="NotSupportedException">Thrown if it was not possible to read the clipboard contents.</exception>
string GetClipboardData ();

/// <summary>Sets the operation system clipboard.</summary>
/// <summary>Sets the operating system clipboard.</summary>
/// <param name="text"></param>
/// <exception cref="NotSupportedException">Thrown if it was not possible to set the clipboard contents.</exception>
void SetClipboardData (string text);

/// <summary>Gets the operation system clipboard if possible.</summary>
/// <summary>Gets the operating system clipboard if possible.</summary>
/// <param name="result">Clipboard contents read</param>
/// <returns>true if it was possible to read the OS clipboard.</returns>
bool TryGetClipboardData (out string result);

/// <summary>Sets the operation system clipboard if possible.</summary>
/// <summary>Sets the operating system clipboard if possible.</summary>
/// <param name="text"></param>
/// <returns>True if the clipboard content was set successfully.</returns>
bool TrySetClipboardData (string text);
Expand Down
2 changes: 1 addition & 1 deletion Terminal.Gui/Configuration/ConfigurationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public enum ConfigLocations
/// </remarks>
private static SettingsScope? _settings;

/// <summary>Name of the running application. By default this property is set to the application's assembly name.</summary>
/// <summary>Name of the running application. By default, this property is set to the application's assembly name.</summary>
public static string AppName { get; set; } = Assembly.GetEntryAssembly ()?.FullName?.Split (',') [0]?.Trim ()!;

/// <summary>Application-specific configuration settings scope.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public class ThemeManagerEventArgs : EventArgs
/// <summary>Initializes a new instance of <see cref="ThemeManagerEventArgs"/></summary>
public ThemeManagerEventArgs (string newTheme) { NewTheme = newTheme; }

/// <summary>The name of the new active theme..</summary>
/// <summary>The name of the new active theme.</summary>
public string NewTheme { get; set; } = string.Empty;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Terminal.Gui;

/// <summary>An attribute that can be applied to a property to indicate that it should included in the configuration file.</summary>
/// <summary>An attribute that can be applied to a property to indicate that it should be included in the configuration file.</summary>
/// <example>
/// [SerializableConfigurationProperty(Scope = typeof(Configuration.ThemeManager.ThemeScope)), JsonConverter
/// (typeof (JsonStringEnumConverter))] public static LineStyle DefaultBorderStyle { ...
Expand Down
2 changes: 1 addition & 1 deletion Terminal.Gui/Configuration/ThemeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Terminal.Gui;
/// <summary>Contains a dictionary of the <see cref="ThemeManager.Theme"/>s for a Terminal.Gui application.</summary>
/// <remarks>
/// <para>A Theme is a collection of settings that are named. The default theme is named "Default".</para>
/// <para>The <see cref="ThemeManager.Theme"/> property is used to detemrine the currently active theme.</para>
/// <para>The <see cref="ThemeManager.Theme"/> property is used to determine the currently active theme.</para>
/// </remarks>
/// <para>
/// <see cref="ThemeManager"/> is a singleton class. It is created when the first <see cref="ThemeManager"/> property
Expand Down
10 changes: 5 additions & 5 deletions Terminal.Gui/ConsoleDrivers/ConsoleDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ public virtual Attribute MakeColor (in Color foreground, in Color background)

/// <summary>Called when a key is released. Fires the <see cref="KeyUp"/> event.</summary>
/// <remarks>
/// Drivers that do not support key release events will calls this method after <see cref="OnKeyDown"/> processing
/// Drivers that do not support key release events will call this method after <see cref="OnKeyDown"/> processing
/// is complete.
/// </remarks>
/// <param name="a"></param>
Expand Down Expand Up @@ -603,7 +603,7 @@ public enum CursorVisibility
/// <summary>Cursor caret has default</summary>
/// <remarks>
/// Works under Xterm-like terminal otherwise this is equivalent to <see ref="Underscore"/>. This default directly
/// depends of the XTerm user configuration settings so it could be Block, I-Beam, Underline with possible blinking.
/// depends on the XTerm user configuration settings, so it could be Block, I-Beam, Underline with possible blinking.
/// </remarks>
Default = 0x00010119,

Expand Down Expand Up @@ -681,7 +681,7 @@ public enum KeyCode : uint

/// <summary>
/// If the <see cref="SpecialMask"/> is set, then the value is that of the special mask, otherwise, the value is
/// in the the lower bits (as extracted by <see cref="CharMask"/>).
/// in the lower bits (as extracted by <see cref="CharMask"/>).
/// </summary>
SpecialMask = 0x_fff0_0000,

Expand Down Expand Up @@ -838,9 +838,9 @@ public enum KeyCode : uint
//Delete = 127,

// --- Special keys ---
// The values below are common non-alphanum keys. Their values are
// The values below are common non-alphanum keys. Their values are
// based on the .NET ConsoleKey values, which, in-turn are based on the
// VK_ values from the Windows API.
// VK_ values from the Windows API.
// We add MaxCodePoint to avoid conflicts with the Unicode values.

/// <summary>The maximum Unicode codepoint value. Used to encode the non-alphanumeric control keys.</summary>
Expand Down
2 changes: 1 addition & 1 deletion Terminal.Gui/ConsoleDrivers/ConsoleKeyMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ public enum VK : ushort
(VK)'2',
ConsoleModifiers.Shift,
'\"'
), // BUGBUG: This is true for Portugese keyboard, but not ENG (@) or DEU (")
), // BUGBUG: This is true for Portuguese keyboard, but not ENG (@) or DEU (")
new ScanCodeMapping (
3,
(VK)'2',
Expand Down
2 changes: 1 addition & 1 deletion Terminal.Gui/ConsoleDrivers/CursesDriver/ClipboardImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private bool CheckSupport ()

/// <summary>
/// A clipboard implementation for MacOSX. This implementation uses the Mac clipboard API (via P/Invoke) to
/// copy/paste. The existance of the Mac pbcopy and pbpaste commands is used to determine if copy/paste is supported.
/// copy/paste. The existence of the Mac pbcopy and pbpaste commands is used to determine if copy/paste is supported.
/// </summary>
internal class MacOSXClipboard : ClipboardBase
{
Expand Down
4 changes: 2 additions & 2 deletions Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ internal override MainLoop Init ()
Curses.doupdate ();

//
// We are setting Invisible as default so we could ignore XTerm DECSUSR setting
// We are setting Invisible as default, so we could ignore XTerm DECSUSR setting
//
switch (Curses.curs_set (0))
{
Expand Down Expand Up @@ -977,7 +977,7 @@ internal static class Platform
private static int _suspendSignal;

/// <summary>Suspends the process by sending SIGTSTP to itself</summary>
/// <returns>The suspend.</returns>
/// <returns>True if the suspension was successful.</returns>
public static bool Suspend ()
{
int signal = GetSuspendSignal ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private static class MacOSX
}

/// <summary>
/// On Linux systems, using using dlopen and dlsym results in DllNotFoundException("libdl.so not found") if
/// On Linux systems, using dlopen and dlsym results in DllNotFoundException("libdl.so not found") if
/// libc6-dev is not installed. As a workaround, we load symbols for dlopen and dlsym from the current process as on
/// Linux Mono sure is linked against these symbols.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Terminal.Gui/ConsoleDrivers/EscSeqUtils/EscSeqReq.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public EscSeqReqStatus (string terminator, int numReq)
/// <summary>Gets the number of requests.</summary>
public int NumRequests { get; }

/// <summary>Gets the Escape Sequence Termintor (e.g. ESC[8t ... t is the terminator).</summary>
/// <summary>Gets the Escape Sequence Terminator (e.g. ESC[8t ... t is the terminator).</summary>
public string Terminator { get; }
}

Expand Down
8 changes: 4 additions & 4 deletions Terminal.Gui/ConsoleDrivers/EscSeqUtils/EscSeqUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ public enum ClearScreenOptions
/// Decodes an ANSI escape sequence.
/// </summary>
/// <param name="escSeqRequests">The <see cref="EscSeqRequests"/> which may contain a request.</param>
/// <param name="newConsoleKeyInfo">The <see cref="ConsoleKeyInfo"/> which may changes.</param>
/// <param name="key">The <see cref="ConsoleKey"/> which may changes.</param>
/// <param name="newConsoleKeyInfo">The <see cref="ConsoleKeyInfo"/> which may change.</param>
/// <param name="key">The <see cref="ConsoleKey"/> which may change.</param>
/// <param name="cki">The <see cref="ConsoleKeyInfo"/> array.</param>
/// <param name="mod">The <see cref="ConsoleModifiers"/> which may changes.</param>
/// <param name="mod">The <see cref="ConsoleModifiers"/> which may change.</param>
/// <param name="c1Control">The control returned by the <see cref="GetC1ControlChar"/> method.</param>
/// <param name="code">The code returned by the <see cref="GetEscapeResult(char[])"/> method.</param>
/// <param name="values">The values returned by the <see cref="GetEscapeResult(char[])"/> method.</param>
Expand Down Expand Up @@ -426,7 +426,7 @@ public static ConsoleModifiers GetConsoleModifiers (string? value)
#nullable restore

/// <summary>
/// Gets all the needed information about a escape sequence.
/// Gets all the needed information about an escape sequence.
/// </summary>
/// <param name="kChar">The array with all chars.</param>
/// <returns>
Expand Down
4 changes: 2 additions & 2 deletions Terminal.Gui/ConsoleDrivers/FakeDriver/FakeDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public override void UpdateScreen ()
FakeConsole.CursorTop = 0;
FakeConsole.CursorLeft = 0;

//SetCursorVisibility (savedVisibitity);
//SetCursorVisibility (savedVisibility);

void WriteToConsole (StringBuilder output, ref int lastCol, int row, ref int outputWidth)
{
Expand Down Expand Up @@ -437,7 +437,7 @@ public virtual void ResizeScreen ()
{
if (FakeConsole.WindowHeight > 0)
{
// Can raise an exception while is still resizing.
// Can raise an exception while it is still resizing.
try
{
FakeConsole.CursorTop = 0;
Expand Down
2 changes: 1 addition & 1 deletion Terminal.Gui/ConsoleDrivers/NetDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ private KeyCode MapKey (ConsoleKeyInfo keyInfo)

/// <summary>
/// Mainloop intended to be used with the .NET System.Console API, and can be used on Windows and Unix, it is
/// cross platform but lacks things like file descriptor monitoring.
/// cross-platform but lacks things like file descriptor monitoring.
/// </summary>
/// <remarks>This implementation is used for NetDriver.</remarks>
internal class NetMainLoop : IMainLoopDriver
Expand Down
14 changes: 7 additions & 7 deletions Terminal.Gui/ConsoleDrivers/WindowsDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ public struct ExtendedCharInfo
{
public char Char { get; set; }
public Attribute Attribute { get; set; }
public bool Empty { get; set; } // TODO: Temp hack until virutal terminal sequences
public bool Empty { get; set; } // TODO: Temp hack until virtual terminal sequences

public ExtendedCharInfo (char character, Attribute attribute)
{
Expand Down Expand Up @@ -901,7 +901,7 @@ public InputRecord [] ReadConsoleInput ()
}
}

#if false // Not needed on the constructor. Perhaps could be used on resizing. To study.
#if false // Not needed on the constructor. Perhaps could be used on resizing. To study.
[DllImport ("kernel32.dll", ExactSpelling = true)]
static extern IntPtr GetConsoleWindow ();

Expand Down Expand Up @@ -1397,7 +1397,7 @@ internal override MainLoop Init ()
{
if (WinConsole is { })
{
// BUGBUG: The results from GetConsoleOutputWindow are incorrect when called from Init.
// BUGBUG: The results from GetConsoleOutputWindow are incorrect when called from Init.
// Our thread in WindowsMainLoop.CheckWin will get the correct results. See #if HACK_CHECK_WINCHANGED
Size winSize = WinConsole.GetConsoleOutputWindow (out Point pos);
Cols = winSize.Width;
Expand Down Expand Up @@ -1642,7 +1642,7 @@ private KeyCode MapKey (WindowsConsole.ConsoleKeyInfoEx keyInfoEx)

if (keyInfo.Modifiers != 0)
{
// These Oem keys have well defined chars. We ensure the representative char is used.
// These Oem keys have well-defined chars. We ensure the representative char is used.
// If we don't do this, then on some keyboard layouts the wrong char is
// returned (e.g. on ENG OemPlus un-shifted is =, not +). This is important
// for key persistence ("Ctrl++" vs. "Ctrl+=").
Expand All @@ -1656,7 +1656,7 @@ private KeyCode MapKey (WindowsConsole.ConsoleKeyInfoEx keyInfoEx)
};
}

// Return the mappedChar with they modifiers. Because mappedChar is un-shifted, if Shift was down
// Return the mappedChar with modifiers. Because mappedChar is un-shifted, if Shift was down
// we should keep it
return MapToKeyCodeModifiers (keyInfo.Modifiers, (KeyCode)mappedChar);
}
Expand Down Expand Up @@ -1901,8 +1901,8 @@ private MouseEvent ToDriverMouse (WindowsConsole.MouseEventRecord mouseEvent)

// The ButtonState member of the MouseEvent structure has bit corresponding to each mouse button.
// This will tell when a mouse button is pressed. When the button is released this event will
// be fired with it's bit set to 0. So when the button is up ButtonState will be 0.
// To map to the correct driver events we save the last pressed mouse button so we can
// be fired with its bit set to 0. So when the button is up ButtonState will be 0.
// To map to the correct driver events we save the last pressed mouse button, so we can
// map to the correct clicked event.
if ((_lastMouseButtonPressed is { } || _isButtonReleased) && mouseEvent.ButtonState != 0)
{
Expand Down
Loading

0 comments on commit e8644f3

Please sign in to comment.