mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +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:
@@ -84,7 +84,7 @@ public partial class ListViewModel : PageViewModel, IDisposable
|
||||
|
||||
protected override void OnFilterUpdated(string filter)
|
||||
{
|
||||
//// TODO: Just temp testing, need to think about where we want to filter, as ACVS in View could be done, but then grouping need CVS, maybe we do grouping in view
|
||||
//// TODO: Just temp testing, need to think about where we want to filter, as AdvancedCollectionView in View could be done, but then grouping need CollectionViewSource, maybe we do grouping in view
|
||||
//// and manage filtering below, but we should be smarter about this and understand caching and other requirements...
|
||||
//// Investigate if we re-use src\modules\cmdpal\extensionsdk\Microsoft.CommandPalette.Extensions.Toolkit\ListHelpers.cs InPlaceUpdateList and FilterList?
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Application
|
||||
x:Class="Microsoft.CmdPal.UI.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
xmlns:help="using:Microsoft.CmdPal.UI.Helpers"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
Background="Transparent"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
Default="{StaticResource DefaultContextMenuViewModelTemplate}" />
|
||||
|
||||
<!-- Template for context items in the context item menu -->
|
||||
<DataTemplate x:Key="DefaultContextMenuViewModelTemplate" x:DataType="viewmodels:CommandContextItemViewModel">
|
||||
<DataTemplate x:Key="DefaultContextMenuViewModelTemplate" x:DataType="viewModels:CommandContextItemViewModel">
|
||||
<Grid AutomationProperties.Name="{x:Bind Title, Mode=OneWay}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="32" />
|
||||
@@ -70,7 +70,7 @@
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Template for context items flagged as critical -->
|
||||
<DataTemplate x:Key="CriticalContextMenuViewModelTemplate" x:DataType="viewmodels:CommandContextItemViewModel">
|
||||
<DataTemplate x:Key="CriticalContextMenuViewModelTemplate" x:DataType="viewModels:CommandContextItemViewModel">
|
||||
<Grid AutomationProperties.Name="{x:Bind Title, Mode=OneWay}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="32" />
|
||||
@@ -137,7 +137,7 @@
|
||||
ItemsSource="{x:Bind CurrentPageViewModel.StatusMessages, Mode=OneWay}"
|
||||
Layout="{StaticResource VerticalStackLayout}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewmodels:StatusMessageViewModel">
|
||||
<DataTemplate x:DataType="viewModels:StatusMessageViewModel">
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Margin="0"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
xmlns:local="using:Microsoft.CmdPal.UI.Controls"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
Background="Transparent"
|
||||
mc:Ignorable="d">
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ public sealed partial class SearchBar : UserControl,
|
||||
_debounceTimer.Debounce(
|
||||
() =>
|
||||
{
|
||||
// Actually plumb Filtering to the viewmodel
|
||||
// Actually plumb Filtering to the view model
|
||||
if (CurrentPageViewModel != null)
|
||||
{
|
||||
CurrentPageViewModel.Filter = FilterBox.Text;
|
||||
@@ -282,7 +282,7 @@ public sealed partial class SearchBar : UserControl,
|
||||
{
|
||||
// GH #38712:
|
||||
// The ListPage will notify us of the `InitialSearchText` when
|
||||
// we first load the viewmodel. We can use that as an
|
||||
// we first load the view model. We can use that as an
|
||||
// opportunity to immediately select the search text. That lets
|
||||
// the user start typing a new search without manually
|
||||
// selecting the old one.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
xmlns:local="using:Microsoft.CmdPal.UI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:toolkit="using:CommunityToolkit.WinUI.UI.Controls"
|
||||
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
Background="Transparent"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -35,13 +35,13 @@
|
||||
MarkdownTemplate="{StaticResource NestedMarkdownContentTemplate}"
|
||||
TreeTemplate="{StaticResource TreeContentTemplate}" />
|
||||
|
||||
<DataTemplate x:Key="FormContentTemplate" x:DataType="viewmodels:ContentFormViewModel">
|
||||
<DataTemplate x:Key="FormContentTemplate" x:DataType="viewModels:ContentFormViewModel">
|
||||
<Grid Margin="0,4,4,4" Padding="12,8,8,8">
|
||||
<cmdPalControls:ContentFormControl ViewModel="{x:Bind}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="MarkdownContentTemplate" x:DataType="viewmodels:ContentMarkdownViewModel">
|
||||
<DataTemplate x:Key="MarkdownContentTemplate" x:DataType="viewModels:ContentMarkdownViewModel">
|
||||
<Grid Margin="0,4,4,4" Padding="12,8,8,8">
|
||||
<toolkit:MarkdownTextBlock
|
||||
Background="Transparent"
|
||||
@@ -53,13 +53,13 @@
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="NestedFormContentTemplate" x:DataType="viewmodels:ContentFormViewModel">
|
||||
<DataTemplate x:Key="NestedFormContentTemplate" x:DataType="viewModels:ContentFormViewModel">
|
||||
<Grid>
|
||||
<cmdPalControls:ContentFormControl ViewModel="{x:Bind}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="NestedMarkdownContentTemplate" x:DataType="viewmodels:ContentMarkdownViewModel">
|
||||
<DataTemplate x:Key="NestedMarkdownContentTemplate" x:DataType="viewModels:ContentMarkdownViewModel">
|
||||
<Grid>
|
||||
<toolkit:MarkdownTextBlock
|
||||
Background="Transparent"
|
||||
@@ -71,7 +71,7 @@
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="TreeContentTemplate" x:DataType="viewmodels:ContentTreeViewModel">
|
||||
<DataTemplate x:Key="TreeContentTemplate" x:DataType="viewModels:ContentTreeViewModel">
|
||||
<StackPanel
|
||||
Margin="0,4,4,4"
|
||||
Padding="12,8,8,8"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
xmlns:help="using:Microsoft.CmdPal.UI.Helpers"
|
||||
xmlns:local="using:Microsoft.CmdPal.UI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
Background="Transparent"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
EmptyValue="Collapsed"
|
||||
NotEmptyValue="Visible" />
|
||||
|
||||
<DataTemplate x:Key="TagTemplate" x:DataType="viewmodels:TagViewModel">
|
||||
<DataTemplate x:Key="TagTemplate" x:DataType="viewModels:TagViewModel">
|
||||
<cpcontrols:Tag
|
||||
AutomationProperties.Name="{x:Bind Text, Mode=OneWay}"
|
||||
BackgroundColor="{x:Bind Background, Mode=OneWay}"
|
||||
@@ -39,7 +39,7 @@
|
||||
</DataTemplate>
|
||||
|
||||
<!-- https://learn.microsoft.com/windows/apps/design/controls/itemsview#specify-the-look-of-the-items -->
|
||||
<DataTemplate x:Key="ListItemViewModelTemplate" x:DataType="viewmodels:ListItemViewModel">
|
||||
<DataTemplate x:Key="ListItemViewModelTemplate" x:DataType="viewModels:ListItemViewModel">
|
||||
<Grid
|
||||
Padding="0,12,0,12"
|
||||
AutomationProperties.Name="{x:Bind Title, Mode=OneWay}"
|
||||
|
||||
@@ -244,7 +244,7 @@ public sealed partial class ListPage : Page,
|
||||
}
|
||||
else if (e.NewValue == null)
|
||||
{
|
||||
Logger.LogDebug("cleared viewmodel");
|
||||
Logger.LogDebug("cleared view model");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:pages="using:Microsoft.CmdPal.UI.Pages"
|
||||
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
xmlns:winuiex="using:WinUIEx"
|
||||
Width="800"
|
||||
Height="480"
|
||||
|
||||
@@ -208,7 +208,7 @@ public sealed partial class MainWindow : WindowEx,
|
||||
// Remember, IsIconic == "minimized", which is entirely different state
|
||||
// from "show/hide"
|
||||
// If we're currently minimized, restore us first, before we reveal
|
||||
// our window. Otherwise we'd just be showing a minimized window -
|
||||
// our window. Otherwise, we'd just be showing a minimized window -
|
||||
// which would remain not visible to the user.
|
||||
if (PInvoke.IsIconic(hwnd))
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Page
|
||||
x:Class="Microsoft.CmdPal.UI.Pages.LoadingPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Page
|
||||
x:Class="Microsoft.CmdPal.UI.Settings.ExtensionPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
@@ -12,7 +12,7 @@
|
||||
xmlns:local="using:Microsoft.CmdPal.UI.Settings"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Page.Resources>
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<ItemsRepeater ItemsSource="{x:Bind ViewModel.TopLevelCommands, Mode=OneWay}" Layout="{StaticResource VerticalStackLayout}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewmodels:TopLevelViewModel">
|
||||
<DataTemplate x:DataType="viewModels:TopLevelViewModel">
|
||||
<controls:SettingsExpander
|
||||
DataContext="{x:Bind}"
|
||||
Description="{x:Bind Subtitle, Mode=OneWay}"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
xmlns:local="using:Microsoft.CmdPal.UI.Settings"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid>
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<ItemsRepeater ItemsSource="{x:Bind viewModel.CommandProviders, Mode=OneWay}" Layout="{StaticResource VerticalStackLayout}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewmodels:ProviderSettingsViewModel">
|
||||
<DataTemplate x:DataType="viewModels:ProviderSettingsViewModel">
|
||||
<controls:SettingsCard
|
||||
Click="SettingsCard_Click"
|
||||
DataContext="{x:Bind}"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ptControls="using:Microsoft.CmdPal.UI.Controls"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
xmlns:viewModels="using:Microsoft.CmdPal.UI.ViewModels"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
|
||||
@@ -1 +1 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" />
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" />
|
||||
|
||||
@@ -204,7 +204,7 @@ Let's see what this currently looks like in the Command Palette. First, deploy y
|
||||
|
||||

|
||||
|
||||
Then, open the Command Palette by pressing `Win+Ctl+.` and search for "Search SSH Keys". You should see the command displayed in the root view of the Command Palette like this:
|
||||
Then, open the Command Palette by pressing `Win+Ctrl+.` and search for "Search SSH Keys". You should see the command displayed in the root view of the Command Palette like this:
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ As some examples:
|
||||
that once, we don't need to `CreateProcess` just to find that command title.
|
||||
This is a **frozen** extension.
|
||||
* Similarly for something like the GitHub extension - it's got multiple
|
||||
top-level commands (My issues, Issue search, Repo search, etc), but these
|
||||
top-level commands (My issues, Issue search, Repo search, etc.), but these
|
||||
top-level commands never change. This is a **frozen** extension.
|
||||
* The "Quick Links" extension has a dynamic list of top-level commands.
|
||||
This is a **fresh** extension.[^3]
|
||||
@@ -392,7 +392,7 @@ command), we need to quickly load that app and get the command for it.
|
||||
1. If the cached command had an `id`, try to look up the command with
|
||||
`ICommandProvider.GetCommand(id)`, passing the `id`. If that returns an
|
||||
item, we can move on to the next stem
|
||||
2. Otherwise (the command wasn't assigned an ID, or `GetCommand` returned
|
||||
2. Otherwise, (the command wasn't assigned an ID, or `GetCommand` returned
|
||||
null): all `TopLevelItems` on that `CommandProvider`.
|
||||
* Search through all the returned commands with the same `id` or
|
||||
`icon/title/subtitle/name`, and return that one.
|
||||
@@ -457,7 +457,7 @@ it be cheap from an engineering standpoint.
|
||||
|
||||
### From winget
|
||||
|
||||
Winget on the other hand, does allow packages to specify arbitrary tags, and let
|
||||
WinGet on the other hand, does allow packages to specify arbitrary tags, and let
|
||||
apps query them easily. We can use that as a system to load a list of packages
|
||||
available via winget directly in DevPal. We'll specify a well-known tag that
|
||||
developers can use in their winget package manifest to specify that their
|
||||
@@ -611,7 +611,7 @@ This will create a single command in DevPal that, when selected, will open
|
||||
Hacker News in the user's default web browser.
|
||||
|
||||
Commands can also be `Page`s, which represent additional "nested" pages within
|
||||
DevPal. When the user selects an command that implements `IPage`, DevPal will
|
||||
DevPal. When the user selects a command that implements `IPage`, DevPal will
|
||||
navigate to a page for that command, rather than calling `Invoke` on it. Skip
|
||||
ahead to [Pages](#Pages) for more information on the different types of pages.
|
||||
|
||||
@@ -628,7 +628,7 @@ different types depending on where the command is being used:
|
||||
* `IListPage.GetItems`
|
||||
* Sender is the `IListItem` for the list item selected for that command
|
||||
* `ICommandItem.MoreCommands` (context menus)
|
||||
* Sender is the `IListItem` which the command was attached to for a list page, or
|
||||
* Sender is the `IListItem` which the command was attached to a list page, or
|
||||
* the `ICommandItem` of the top-level command (if this is a context item on a top level command)
|
||||
* `IContentPage.Commands`
|
||||
* Sender is the `IContentPage` itself
|
||||
@@ -656,7 +656,7 @@ Use cases for each `CommandResultKind`:
|
||||
* `Dismiss` - Close DevPal after the action is executed. All current state
|
||||
is dismissed as well. On the next launch, DevPal will start from the main
|
||||
page with a blank query.
|
||||
* Ex: An action that opens an application. The Puser doesn't need DevPal
|
||||
* Ex: An action that opens an application. The user doesn't need DevPal
|
||||
open after the application is opened, nor do they need the query they used
|
||||
to find the action.
|
||||
* `GoHome` - Navigate back to the main page of DevPal, but keep it open.
|
||||
@@ -752,7 +752,7 @@ which the user can quickly filter and search through.
|
||||
|
||||
Lists can be either "static" or "dynamic":
|
||||
* A **static** list leaves devpal in charge of filtering the list of items,
|
||||
based on the query the user typed.
|
||||
based on the query that the user typed.
|
||||
* These are implementations of the default `IListPage`.
|
||||
* In this case, DevPal will use a fuzzy string match over the `Name` of the
|
||||
action, the `Subtitle`, and any `Text` on the `Tag`s.
|
||||
@@ -959,7 +959,7 @@ as the user navigates the list.
|
||||
|
||||
Consider the Windows Registry command. When the page is initially loaded, it
|
||||
displays only the top-level registry keys (`HKEY_CURRENT_USER`,
|
||||
`HKEY_LOCAL_MACHINE`, etc). If the user types `HKC`, the command will filter the
|
||||
`HKEY_LOCAL_MACHINE`, etc.). If the user types `HKC`, the command will filter the
|
||||
results down to just `HKEY_CURRENT_USER`, `HKEY_CLASSES_ROOT` and
|
||||
`HKEY_CURRENT_CONFIG`. However, if the user at this point taps the right-arrow
|
||||
key, DevPall will use the `TextToSuggest` from the `HKEY_CURRENT_USER`
|
||||
@@ -1375,7 +1375,7 @@ app's icon.
|
||||
|
||||

|
||||
|
||||
(However, the buttons in the gif for "Open", "Uninstall", etc, are not part of
|
||||
(However, the buttons in the gif for "Open", "Uninstall", etc., are not part of
|
||||
the `Details`, they are part of the "more commands" dropdown. **It's a mockup**)
|
||||
|
||||
<!-- This block needs to appear in the idl _before_ IListItem, but from a doc
|
||||
@@ -1509,7 +1509,7 @@ settings for your extension being lost.
|
||||
|
||||
Providers may also specify a set of `FallbackCommands`[^2]. These are special
|
||||
top-level items which allow extensions to have dynamic top-level items which
|
||||
respond to the text the user types on the main list page.
|
||||
respond to the text that the user types on the main list page.
|
||||
|
||||
These are implemented with a special `IFallbackHandler` interface. This is an
|
||||
object that will be informed whenever the query changes in List page hosting it.
|
||||
|
||||
@@ -469,7 +469,7 @@ public class UWPApplication : IProgram
|
||||
}
|
||||
else
|
||||
{
|
||||
// for C:\Windows\MiracastView etc
|
||||
// for C:\Windows\MiracastView, etc.
|
||||
path = Path.Combine(Package.Location, "Assets", uri);
|
||||
}
|
||||
|
||||
|
||||
@@ -827,7 +827,7 @@ public class Win32Program : IProgram
|
||||
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)),
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Microsoft.CmdPal.Ext.Apps.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>
|
||||
|
||||
@@ -92,7 +92,7 @@ internal sealed partial class PackageRepository : ListRepository<UWPApplication>
|
||||
|
||||
// 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 ex)
|
||||
{
|
||||
Logger.LogError(ex.Message);
|
||||
|
||||
@@ -107,7 +107,7 @@ internal sealed partial class Win32ProgramRepository : ListRepository<Programs.W
|
||||
|
||||
// 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(1000).ConfigureAwait(false);
|
||||
|
||||
@@ -205,12 +205,12 @@ internal sealed partial class Win32ProgramRepository : ListRepository<Programs.W
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
||||
@@ -73,7 +73,7 @@ public static class CalculateHelper
|
||||
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:
|
||||
|
||||
@@ -42,7 +42,7 @@ public sealed partial class FallbackCalculatorItem : FallbackCommandItem
|
||||
_copyCommand.Name = string.IsNullOrWhiteSpace(query) ? string.Empty : Resources.calculator_copy_command_name;
|
||||
Title = result.Title;
|
||||
|
||||
// we have to make the subtitle the equation,
|
||||
// we have to make the subtitle into an equation,
|
||||
// so that we will still string match the original query
|
||||
// Otherwise, something like 1+2 will have a title of "3" and not match
|
||||
Subtitle = query;
|
||||
|
||||
@@ -55,7 +55,7 @@ internal static partial class QueryHelper
|
||||
/// <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);
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ShellListPageHelpers
|
||||
var cmd = query;
|
||||
if (string.IsNullOrEmpty(cmd))
|
||||
{
|
||||
results = ResultsFromlHistory();
|
||||
results = ResultsFromHistory();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -90,16 +90,16 @@ public class ShellListPageHelpers
|
||||
|
||||
public List<CommandContextItem> LoadContextMenus(ListItem listItem)
|
||||
{
|
||||
var resultlist = new List<CommandContextItem>
|
||||
var resultList = new List<CommandContextItem>
|
||||
{
|
||||
new(new ExecuteItem(listItem.Title, _settings, RunAsType.Administrator)),
|
||||
new(new ExecuteItem(listItem.Title, _settings, RunAsType.OtherUser )),
|
||||
};
|
||||
|
||||
return resultlist;
|
||||
return resultList;
|
||||
}
|
||||
|
||||
private List<ListItem> ResultsFromlHistory()
|
||||
private List<ListItem> ResultsFromHistory()
|
||||
{
|
||||
IEnumerable<ListItem> history = _settings.Count.OrderByDescending(o => o.Value)
|
||||
.Select(m => new ListItem(new ExecuteItem(m.Key, _settings))
|
||||
|
||||
@@ -158,7 +158,7 @@ internal static class TimeAndDateHelper
|
||||
/// <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;
|
||||
@@ -309,7 +309,7 @@ internal static class TimeAndDateHelper
|
||||
/// 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);
|
||||
|
||||
@@ -502,7 +502,7 @@ namespace Microsoft.CmdPal.Ext.TimeDate {
|
||||
}
|
||||
|
||||
/// <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>
|
||||
public static string Microsoft_plugin_timedate_Search_ConjunctionList {
|
||||
get {
|
||||
|
||||
@@ -30,7 +30,7 @@ internal sealed partial class EndTaskCommand : InvokableCommand
|
||||
/// 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 KillProcess(Window window)
|
||||
{
|
||||
// Validate process
|
||||
|
||||
@@ -35,7 +35,7 @@ internal static class FuzzyMatching
|
||||
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.CmdPal.Ext.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 sealed class SearchString
|
||||
{
|
||||
|
||||
@@ -163,7 +163,7 @@ internal sealed class Window
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -993,7 +993,7 @@ public enum ExtendedWindowStyles : uint
|
||||
|
||||
/// <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,
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public class VirtualDesktopHelper
|
||||
var allDeskValue = (byte[]?)virtualDesktopKey.GetValue("VirtualDesktopIDs", null) ?? Array.Empty<byte>();
|
||||
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
|
||||
@@ -134,7 +134,7 @@ public class VirtualDesktopHelper
|
||||
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.
|
||||
ExtensionHost.LogMessage(new LogMessage() { Message = "VirtualDesktopHelper.UpdateDesktopList() failed to read the id for the current desktop form registry." });
|
||||
_currentDesktop = _availableDesktops.Count >= 1 ? _availableDesktops[0] : _currentDesktop;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ public class VirtualDesktopHelper
|
||||
/// 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)
|
||||
|
||||
@@ -32,7 +32,7 @@ internal sealed partial class ServiceCommand : InvokableCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
Icon = new IconInfo("\xEDB5"); // Playbadge12 icon
|
||||
Icon = new IconInfo("\xEDB5"); // PlayBadge12 icon
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,18 +49,18 @@ _You **can** combine them_
|
||||
|
||||
### Lists
|
||||
|
||||
**Inordered:**
|
||||
**Unordered:**
|
||||
|
||||
* Milk
|
||||
* Bread
|
||||
* Wholegrain
|
||||
* Whole grain
|
||||
* Butter
|
||||
|
||||
Result:
|
||||
|
||||
* Milk
|
||||
* Bread
|
||||
* Wholegrain
|
||||
* Whole grain
|
||||
* Butter
|
||||
|
||||
**Ordered:**
|
||||
|
||||
@@ -269,7 +269,7 @@ public partial class StringMatcher
|
||||
// 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)));
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<file src="..\Microsoft.CommandPalette.Extensions\x64\release\Microsoft.CommandPalette.Extensions\Microsoft.CommandPalette.Extensions.dll" target="runtimes\win-x64\native\"/>
|
||||
<file src="..\Microsoft.CommandPalette.Extensions\arm64\release\Microsoft.CommandPalette.Extensions\Microsoft.CommandPalette.Extensions.dll" target="runtimes\win-arm64\native\"/>
|
||||
|
||||
<!-- Not putting in the following the lib folder because we don't want plugin project to directly reference the winmd -->
|
||||
<!-- Not putting the following into the lib folder because we don't want plugin project to directly reference the winmd -->
|
||||
<file src="..\Microsoft.CommandPalette.Extensions\x64\release\Microsoft.CommandPalette.Extensions\Microsoft.CommandPalette.Extensions.winmd" target="winmd\"/>
|
||||
|
||||
<file src="..\README.md" target="docs\" />
|
||||
|
||||
Reference in New Issue
Block a user