mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Updates for check-spelling v0.0.25 (#40386)
## Summary of the Pull Request - #39572 updated check-spelling but ignored: > 🐣 Breaking Changes [Code Scanning action requires a Code Scanning Ruleset](https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset) If you use SARIF reporting, then instead of the workflow yielding an ❌ when it fails, it will rely on [github-advanced-security 🤖](https://github.com/apps/github-advanced-security) to report the failure. You will need to adjust your checks for PRs. This means that check-spelling hasn't been properly doing its job 😦. I'm sorry, I should have pushed a thing to this repo earlier,... Anyway, as with most refreshes, this comes with a number of fixes, some are fixes for typos that snuck in before the 0.0.25 upgrade, some are for things that snuck in after, some are based on new rules in spell-check-this, and some are hand written patterns based on running through this repository a few times. About the 🐣 **breaking change**: someone needs to create a ruleset for this repository (see [Code Scanning action requires a Code Scanning Ruleset: Sample ruleset ](https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Code-Scanning-action-requires-a-Code-Scanning-Ruleset#sample-ruleset)). The alternative to adding a ruleset is to change the condition to not use sarif for this repository. In general, I think the github integration from sarif is prettier/more helpful, so I think that it's the better choice. You can see an example of it working in: - https://github.com/check-spelling-sandbox/PowerToys/pull/23 --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Mike Griese <migrie@microsoft.com> Co-authored-by: Dustin L. Howett <dustin@howett.net>
This commit is contained in:
@@ -44,7 +44,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces a split input array with shorthand feet/inch notation (1', 1'2" etc) to 'x foot in cm'.
|
||||
/// Replaces a split input array with shorthand feet/inch notation (1', 1'2", etc.) to 'x foot in cm'.
|
||||
/// </summary>
|
||||
public static void ShorthandFeetInchHandler(ref string[] split, CultureInfo culture)
|
||||
{
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Microsoft.Plugin.Folder.Sources
|
||||
|
||||
if (isRecursive)
|
||||
{
|
||||
// match everything before and after search term using supported wildcard '*', ie. *searchterm*
|
||||
// match everything before and after search term using supported wildcard '*', i.e. *searchterm*
|
||||
if (string.IsNullOrEmpty(incompleteName))
|
||||
{
|
||||
incompleteName = "*";
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Microsoft.Plugin.Indexer.DriveDetection
|
||||
{
|
||||
public class RegistryWrapper : IRegistryWrapper
|
||||
{
|
||||
// Given the registrypath and the name of the value, to retrieve the data corresponding to that registry key
|
||||
// Given the registry path and the name of the value, to retrieve the data corresponding to that registry key
|
||||
public int GetHKLMRegistryValue(string registryLocation, string valueName)
|
||||
{
|
||||
using (RegistryKey regKey = Registry.LocalMachine.OpenSubKey(registryLocation))
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Microsoft.Plugin.Program.Logger
|
||||
internal static class ProgramLogger
|
||||
{
|
||||
/// <summary>
|
||||
/// Logs an warning
|
||||
/// Logs a warning
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||
internal static void Warn(string message, Exception ex, Type fullClassName, string loadingProgramPath, [CallerMemberName] string methodName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0)
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
},
|
||||
};
|
||||
|
||||
// To set the title to always be the displayname of the packaged application
|
||||
// To set the title to always be the display name of the packaged application
|
||||
result.Title = DisplayName;
|
||||
result.TitleHighlightData = StringMatcher.FuzzySearch(query, Name).MatchData;
|
||||
|
||||
@@ -596,7 +596,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
}
|
||||
else
|
||||
{
|
||||
// for C:\Windows\MiracastView etc
|
||||
// for C:\Windows\MiracastView, etc.
|
||||
path = Path.Combine(Package.Location, "Assets", uri);
|
||||
}
|
||||
|
||||
|
||||
@@ -991,7 +991,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
var paths = new HashSet<string>(defaultHashsetSize);
|
||||
var runCommandPaths = new HashSet<string>(defaultHashsetSize);
|
||||
|
||||
// Parallelize multiple sources, and priority based on paths which most likely contain .lnks which are formatted
|
||||
// Parallelize multiple sources, and priority based on paths which most likely contain .lnk files which are formatted
|
||||
var sources = new (bool IsEnabled, Func<IEnumerable<string>> GetPaths)[]
|
||||
{
|
||||
(true, () => CustomProgramPaths(settings.ProgramSources, settings.ProgramSuffixes)),
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Microsoft.Plugin.Program.Storage
|
||||
|
||||
// InitializeAppInfo will throw if there is no AppxManifest.xml for the package.
|
||||
// Note there are sometimes multiple packages per product and this doesn't necessarily mean that we haven't found the app.
|
||||
// eg. "Could not find file 'C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminalPreview_2020.616.45.0_neutral_~_8wekyb3d8bbwe\\AppxManifest.xml'."
|
||||
// e.g. "Could not find file 'C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminalPreview_2020.616.45.0_neutral_~_8wekyb3d8bbwe\\AppxManifest.xml'."
|
||||
catch (System.IO.FileNotFoundException e)
|
||||
{
|
||||
ProgramLogger.Exception(e.Message, e, GetType(), package.InstalledLocation.ToString());
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace Microsoft.Plugin.Program.Storage
|
||||
|
||||
// fix for https://github.com/microsoft/PowerToys/issues/34391
|
||||
// the msi installer creates a shortcut, which is detected by the PT Run and ends up in calling this OnAppRenamed method
|
||||
// the thread needs to be halted for a short time to avoid locking the new shortcut file as we read it, otherwise the lock causes
|
||||
// the thread needs to be halted for a short time to avoid locking the new shortcut file as we read it; otherwise, the lock causes
|
||||
// in the issue scenario that a warning is popping up during the msi install process.
|
||||
await Task.Delay(OnRenamedEventWaitTime).ConfigureAwait(false);
|
||||
|
||||
@@ -203,12 +203,12 @@ namespace Microsoft.Plugin.Program.Storage
|
||||
}
|
||||
|
||||
// When a URL application is deleted, we can no longer get the HashCode directly from the path because the FullPath a Url app is the URL obtained from reading the file
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1309:Use ordinal string comparison", Justification = "Using CurrentCultureIgnoreCase since application names could be dependent on currentculture See: https://github.com/microsoft/PowerToys/pull/5847/files#r468245190")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1309:Use ordinal string comparison", Justification = "Using CurrentCultureIgnoreCase since application names could be dependent on current culture See: https://github.com/microsoft/PowerToys/pull/5847/files#r468245190")]
|
||||
private Win32Program GetAppWithSameNameAndExecutable(string name, string executableName)
|
||||
{
|
||||
foreach (Win32Program app in Items)
|
||||
{
|
||||
// Using CurrentCultureIgnoreCase since application names could be dependent on currentculture See: https://github.com/microsoft/PowerToys/pull/5847/files#r468245190
|
||||
// Using CurrentCultureIgnoreCase since application names could be dependent on current culture See: https://github.com/microsoft/PowerToys/pull/5847/files#r468245190
|
||||
if (name.Equals(app.Name, StringComparison.CurrentCultureIgnoreCase) && executableName.Equals(app.ExecutableName, StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
return app;
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Microsoft.Plugin.Shell
|
||||
string cmd = query.Search;
|
||||
if (string.IsNullOrEmpty(cmd))
|
||||
{
|
||||
return ResultsFromlHistory();
|
||||
return ResultsFromHistory();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -169,7 +169,7 @@ namespace Microsoft.Plugin.Shell
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<Result> ResultsFromlHistory()
|
||||
private List<Result> ResultsFromHistory()
|
||||
{
|
||||
IEnumerable<Result> history = _settings.Count.OrderByDescending(o => o.Value)
|
||||
.Select(m => new Result
|
||||
@@ -446,7 +446,7 @@ namespace Microsoft.Plugin.Shell
|
||||
|
||||
public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
|
||||
{
|
||||
var resultlist = new List<ContextMenuResult>
|
||||
var resultList = new List<ContextMenuResult>
|
||||
{
|
||||
new ContextMenuResult
|
||||
{
|
||||
@@ -478,7 +478,7 @@ namespace Microsoft.Plugin.Shell
|
||||
},
|
||||
};
|
||||
|
||||
return resultlist;
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public void UpdateSettings(PowerLauncherPluginSettings settings)
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
/// Method to initiate killing the process of a window
|
||||
/// </summary>
|
||||
/// <param name="window">Window data</param>
|
||||
/// <returns>True if the PT Run window should close, otherwise false.</returns>
|
||||
/// <returns>True if the PT Run window should close; otherwise, false.</returns>
|
||||
private static bool KillProcessCommand(Window window)
|
||||
{
|
||||
// Validate process
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
text = text.ToLower(CultureInfo.CurrentCulture);
|
||||
|
||||
// Create a grid to march matches like
|
||||
// eg.
|
||||
// e.g.
|
||||
// a b c a d e c f g
|
||||
// a x x
|
||||
// c x x
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
/// <summary>
|
||||
/// A class to represent a search string
|
||||
/// </summary>
|
||||
/// <remarks>Class was added inorder to be able to attach various context data to
|
||||
/// <remarks>Class was added in order to be able to attach various context data to
|
||||
/// a search string</remarks>
|
||||
internal class SearchString
|
||||
{
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
{
|
||||
if (!NativeMethods.ShowWindow(Hwnd, ShowWindowCommand.Restore))
|
||||
{
|
||||
// ShowWindow doesn't work if the process is running elevated: fallback to SendMessage
|
||||
// ShowWindow doesn't work if the process is running elevated: fall back to SendMessage
|
||||
_ = NativeMethods.SendMessage(Hwnd, Win32Constants.WM_SYSCOMMAND, Win32Constants.SC_RESTORE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
||||
private static string CheckScientificNotation(string input)
|
||||
{
|
||||
/**
|
||||
* NOTE: By the time the expression gets to us, it's already in English format.
|
||||
* NOTE: By the time that the expression gets to us, it's already in English format.
|
||||
*
|
||||
* Regex explanation:
|
||||
* (-?(\d+({0}\d*)?)|-?({0}\d+)): Used to capture one of two types:
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Microsoft.PowerToys.Run.Plugin.OneNote
|
||||
return new List<Result>(0);
|
||||
}
|
||||
|
||||
// If there's cached results for this query, return immediately, otherwise wait for delayedExecution.
|
||||
// If there's cached results for this query, return immediately; otherwise, wait for delayedExecution.
|
||||
var results = _cache.Get<List<Result>>(query.Search);
|
||||
return results ?? Query(query, false);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ namespace Microsoft.PowerToys.Run.Plugin.OneNote
|
||||
return new List<Result>(0);
|
||||
}
|
||||
|
||||
// Get results from cache if they already exist for this query, otherwise query OneNote. Results will be cached for 1 day.
|
||||
// Get results from cache if they already exist for this query; otherwise, query OneNote. Results will be cached for 1 day.
|
||||
var results = _cache.GetOrAdd(query.Search, () =>
|
||||
{
|
||||
var pages = OneNoteProvider.FindPages(query.Search);
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.UnitTest.Helper
|
||||
[TestMethod]
|
||||
public void GetRegistryBaseKeyTestMoreThanOneBaseKey()
|
||||
{
|
||||
var (baseKeyList, _) = RegistryHelper.GetRegistryBaseKey("HKC\\Control Panel\\Accessibility"); /* #no-spell-check-line */
|
||||
var (baseKeyList, _) = RegistryHelper.GetRegistryBaseKey("HKC\\Control Panel\\Accessibility");
|
||||
|
||||
Assert.IsNotNull(baseKeyList);
|
||||
Assert.IsTrue(baseKeyList.Count() > 1);
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Helper
|
||||
/// Open the Windows registry editor and jump to registry key inside the given key (inside the <see cref="RegistryEntry"/>
|
||||
/// </summary>
|
||||
/// <param name="entry">The <see cref="RegistryEntry"/> to jump in</param>
|
||||
/// <returns><see langword="true"/> if the registry editor was successful open, otherwise <see langword="false"/></returns>
|
||||
/// <returns><see langword="true"/> if the registry editor was successful open; otherwise, <see langword="false"/></returns>
|
||||
internal static bool TryToOpenInRegistryEditor(in RegistryEntry entry)
|
||||
{
|
||||
try
|
||||
@@ -119,7 +119,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Helper
|
||||
/// Copy the given text to the clipboard
|
||||
/// </summary>
|
||||
/// <param name="text">The text to copy to the clipboard</param>
|
||||
/// <returns><see langword="true"/>The text successful copy to the clipboard, otherwise <see langword="false"/></returns>
|
||||
/// <returns><see langword="true"/>The text successful copy to the clipboard; otherwise, <see langword="false"/></returns>
|
||||
private static bool TryToCopyToClipBoard(in string text)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Helper
|
||||
/// <param name="query">The query that could contain parts</param>
|
||||
/// <param name="queryKey">The key part of the query</param>
|
||||
/// <param name="queryValueName">The value name part of the query</param>
|
||||
/// <returns><see langword="true"/> when the query search for a key and a value name, otherwise <see langword="false"/></returns>
|
||||
/// <returns><see langword="true"/> when the query search for a key and a value name; otherwise, <see langword="false"/></returns>
|
||||
internal static bool GetQueryParts(in string query, out string queryKey, out string queryValueName)
|
||||
{
|
||||
var sanitizedQuery = SanitizeQuery(query);
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Components
|
||||
/// Copy the given text to the clipboard
|
||||
/// </summary>
|
||||
/// <param name="text">The text to copy to the clipboard</param>
|
||||
/// <returns><see langword="true"/>The text successful copy to the clipboard, otherwise <see langword="false"/></returns>
|
||||
/// <returns><see langword="true"/>The text successful copy to the clipboard; otherwise, <see langword="false"/></returns>
|
||||
/// <remarks>Code copied from TimeZone plugin</remarks>
|
||||
internal static bool CopyToClipBoard(in string text)
|
||||
{
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Components
|
||||
/// <param name="input">String with date/time</param>
|
||||
/// <param name="timestamp">The new <see cref="DateTime"/> object</param>
|
||||
/// <param name="inputParsingErrorMsg">Error message shown to the user</param>
|
||||
/// <returns>True on success, otherwise false</returns>
|
||||
/// <returns>True on success; otherwise, false</returns>
|
||||
internal static bool ParseStringAsDateTime(in string input, out DateTime timestamp, out string inputParsingErrorMsg)
|
||||
{
|
||||
inputParsingErrorMsg = string.Empty;
|
||||
@@ -294,7 +294,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Components
|
||||
/// Test if input is special parsing for Unix time, Unix time in milliseconds, file time, ...
|
||||
/// </summary>
|
||||
/// <param name="input">String with date/time</param>
|
||||
/// <returns>True if yes, otherwise false</returns>
|
||||
/// <returns>True if yes; otherwise, false</returns>
|
||||
internal static bool IsSpecialInputParsing(string input)
|
||||
{
|
||||
return _regexSpecialInputFormats.IsMatch(input);
|
||||
|
||||
@@ -466,7 +466,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to for; and; nor; but; or; so.
|
||||
/// Looks up a localized string similar to "for; and; nor; but; or; so".
|
||||
/// </summary>
|
||||
internal static string Microsoft_plugin_timedate_Search_ConjunctionList {
|
||||
get {
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings.Helper
|
||||
/// Copy the given text to the clipboard
|
||||
/// </summary>
|
||||
/// <param name="text">The text to copy to the clipboard</param>
|
||||
/// <returns><see langword="true"/>The text successful copy to the clipboard, otherwise <see langword="false"/></returns>
|
||||
/// <returns><see langword="true"/>The text successful copy to the clipboard; otherwise, <see langword="false"/></returns>
|
||||
private static bool TryToCopyToClipBoard(in string text)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings.Helper
|
||||
/// Open the settings page of the given <see cref="IWindowsSetting"/>.
|
||||
/// </summary>
|
||||
/// <param name="entry">The <see cref="WindowsSetting"/> that contain the information to open the setting on command level.</param>
|
||||
/// <returns><see langword="true"/> if the settings could be opened, otherwise <see langword="false"/>.</returns>
|
||||
/// <returns><see langword="true"/> if the settings could be opened; otherwise, <see langword="false"/>.</returns>
|
||||
private static bool DoOpenSettingsAction(WindowsSetting entry)
|
||||
{
|
||||
ProcessStartInfo processStartInfo;
|
||||
|
||||
@@ -15,7 +15,7 @@ using Stopwatch = Wox.Infrastructure.Stopwatch;
|
||||
namespace PowerLauncher.Helper
|
||||
{
|
||||
/// <Note>
|
||||
/// On Windows operating system the name of environment variables is case-insensitive. This means if we have a user and machine variable with differences in their name casing (eg. test vs Test), the name casing from machine level is used and won't be overwritten by the user var.
|
||||
/// On Windows operating system the name of environment variables is case-insensitive. This means if we have a user and machine variable with differences in their name casing (e.g. test vs Test), the name casing from machine level is used and won't be overwritten by the user var.
|
||||
/// Example for Window's behavior: test=ValueMachine (Machine level) + TEST=ValueUser (User level) => test=ValueUser (merged)
|
||||
/// To get the same behavior we use "StringComparer.OrdinalIgnoreCase" as compare property for the HashSet and Dictionaries where we merge machine and user variable names.
|
||||
/// </Note>
|
||||
|
||||
@@ -329,7 +329,7 @@ namespace PowerLauncher
|
||||
var result = ((FrameworkElement)e.OriginalSource).DataContext;
|
||||
if (result != null)
|
||||
{
|
||||
// This may be null if the tapped item was one of the context buttons (run as admin etc).
|
||||
// This may be null if the tapped item was one of the context buttons (run as admin, etc.).
|
||||
if (result is ResultViewModel resultVM)
|
||||
{
|
||||
_viewModel.Results.SelectedItem = resultVM;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:p="clr-namespace:PowerLauncher.Properties"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:viewmodel="clr-namespace:PowerLauncher.ViewModel"
|
||||
xmlns:viewModel="clr-namespace:PowerLauncher.ViewModel"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="720"
|
||||
mc:Ignorable="d">
|
||||
@@ -119,13 +119,13 @@
|
||||
FontSize="{DynamicResource TitleFontSize}"
|
||||
IsHitTestVisible="False"
|
||||
TextTrimming="CharacterEllipsis">
|
||||
<viewmodel:ResultsViewModel.FormattedText>
|
||||
<viewModel:ResultsViewModel.FormattedText>
|
||||
<MultiBinding Converter="{StaticResource highlightTextConverter}">
|
||||
<Binding Path="Result.Title" />
|
||||
<Binding Path="Result.TitleHighlightData" />
|
||||
<Binding Path="IsSelected" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type ListViewItem}}" />
|
||||
</MultiBinding>
|
||||
</viewmodel:ResultsViewModel.FormattedText>
|
||||
</viewModel:ResultsViewModel.FormattedText>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
x:Name="Path"
|
||||
|
||||
@@ -280,7 +280,7 @@ namespace PowerLauncher.ViewModel
|
||||
/// <summary>
|
||||
/// Triggers the action on the selected context button
|
||||
/// </summary>
|
||||
/// <returns>False if there is nothing selected, otherwise true</returns>
|
||||
/// <returns>False if there is nothing selected; otherwise, true</returns>
|
||||
public bool ExecuteSelectedContextButton()
|
||||
{
|
||||
if (HasSelectedContextButton())
|
||||
|
||||
@@ -255,7 +255,7 @@ namespace Wox.Infrastructure.Image
|
||||
Log.Exception("Got an exception while trying to detect Adobe Reader / Adobe Acrobat Pro as PDF thumbnail provider. To prevent PT Run from a Dispatcher crash, we report that Adobe Reader / Adobe Acrobat Pro is used and show only the PDF icon in the results.", ex, MethodBase.GetCurrentMethod().DeclaringType);
|
||||
}
|
||||
|
||||
// If we fail to detect it, we return that Adobe is used. Otherwise we could run into the Dispatcher crash.
|
||||
// If we fail to detect it, we return that Adobe is used. Otherwise, we could run into the Dispatcher crash.
|
||||
// (This only results in showing the icon instead of a thumbnail. It has no other functional impact.)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Wox.Infrastructure.Storage
|
||||
{
|
||||
/// <summary>
|
||||
/// The intent of this class is to provide a basic subset of 'list' like operations, without exposing callers to the internal representation
|
||||
/// of the data structure. Currently this is implemented as a list for it's simplicity.
|
||||
/// of the data structure. Currently this is implemented as a list for its simplicity.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">typeof</typeparam>
|
||||
public class ListRepository<T> : IRepository<T>, IEnumerable<T>
|
||||
|
||||
@@ -272,7 +272,7 @@ namespace Wox.Infrastructure
|
||||
// while the score is lower if they are more spread out
|
||||
|
||||
// The length of the match is assigned a larger weight factor.
|
||||
// I.e. the length is more important than where in the string a match is found.
|
||||
// I.e. the length is more important than the location where a match is found.
|
||||
const int matchLenWeightFactor = 2;
|
||||
|
||||
var score = 100 * (query.Length + 1) * matchLenWeightFactor / ((1 + firstIndex) + (matchLenWeightFactor * (matchLen + 1)));
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace Wox.Plugin.Common.VirtualDesktop.Helper
|
||||
byte[] allDeskValue = (byte[])virtualDesktopKey.GetValue("VirtualDesktopIDs", null);
|
||||
if (allDeskValue != null)
|
||||
{
|
||||
// We clear only, if we can read from registry. Otherwise we keep the existing values.
|
||||
// We clear only, if we can read from registry. Otherwise, we keep the existing values.
|
||||
_availableDesktops.Clear();
|
||||
|
||||
// Each guid has a length of 16 elements
|
||||
@@ -135,7 +135,7 @@ namespace Wox.Plugin.Common.VirtualDesktop.Helper
|
||||
else
|
||||
{
|
||||
// The registry value is missing when the user hasn't switched the desktop at least one time before reading the registry. In this case we can set it to desktop one.
|
||||
// We can only set it to desktop one, if we have at least one desktop in the desktops list. Otherwise we keep the existing value.
|
||||
// We can only set it to desktop one, if we have at least one desktop in the desktops list. Otherwise, we keep the existing value.
|
||||
Log.Debug("VirtualDesktopHelper.UpdateDesktopList() failed to read the id for the current desktop form registry.", typeof(VirtualDesktopHelper));
|
||||
_currentDesktop = _availableDesktops.Count >= 1 ? _availableDesktops[0] : _currentDesktop;
|
||||
}
|
||||
@@ -237,7 +237,7 @@ namespace Wox.Plugin.Common.VirtualDesktop.Helper
|
||||
/// Returns the number (position) of a desktop.
|
||||
/// </summary>
|
||||
/// <param name="desktop">The guid of the desktop.</param>
|
||||
/// <returns>Number of the desktop, if found. Otherwise a value of zero.</returns>
|
||||
/// <returns>Number of the desktop, if found. Otherwise, a value of zero.</returns>
|
||||
public int GetDesktopNumber(Guid desktop)
|
||||
{
|
||||
if (_desktopListAutoUpdate)
|
||||
|
||||
@@ -1048,7 +1048,7 @@ namespace Wox.Plugin.Common.Win32
|
||||
|
||||
/// <summary>
|
||||
/// The window has generic "right-aligned" properties. This depends on the window class. This style has
|
||||
/// an effect only if the shell language supports reading-order alignment, otherwise is ignored.
|
||||
/// an effect only if the shell language supports reading-order alignment; otherwise, is ignored.
|
||||
/// </summary>
|
||||
WS_EX_RIGHT = 0x1000,
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Wox.Plugin
|
||||
|
||||
/// <summary>
|
||||
/// Gets search part of a query.
|
||||
/// This will not include action keyword if exclusive plugin gets it, otherwise it should be same as RawQuery.
|
||||
/// This will not include action keyword if exclusive plugin gets it; otherwise, it should be same as RawQuery.
|
||||
/// Since we allow user to switch a exclusive plugin to generic plugin,
|
||||
/// so this property will always give you the "real" query part of the query
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user