diff --git a/.github/actions/spell-check/allow/names.txt b/.github/actions/spell-check/allow/names.txt index 0ebacd1b41..2d9bb89b75 100644 --- a/.github/actions/spell-check/allow/names.txt +++ b/.github/actions/spell-check/allow/names.txt @@ -7,6 +7,7 @@ imageresizer kbm keyboardmanager markdownpreviewhandler +mousewithoutborders mwb oobe pasteplain @@ -28,6 +29,7 @@ videoconference # USERS +Advaith alekhyareddy Aleks angularsen diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 9b738e6d53..8ff1469510 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1,3 +1,6 @@ +# FALSE POSITIVES +## "PackagemanagerWrapper.cs" should be "PackageManagerWrapper.cs" +## NOTICE.MD > MOZILLA PUBLIC LICENSE v1.1 aaaa abcdefghjkmnpqrstuvxyz abgr @@ -35,8 +38,8 @@ ALPHATYPE AModifier AMPROPERTY AMPROPSETID -animatedvisuals ANDSCANS +animatedvisuals ansicolor ANull AOC @@ -52,7 +55,6 @@ appdata APPEXECLINK appium Applicationcan -applicationframehost appmanifest APPNAME appref @@ -296,6 +298,7 @@ ddf DDxgi Deact debugbreak +declatory decryptor Dedup DEFAULTBOOTSTRAPPERINSTALLFOLDER @@ -723,7 +726,6 @@ Jsons jsonval junja jxr -Kazakhstani kdc keybd KEYBDDATA @@ -744,7 +746,6 @@ Knownfolders KSPROPERTY Kybd languagesjson -lastbuildstate lastcodeanalysissucceeded Lastdevice LASTEXITCODE @@ -1070,6 +1071,7 @@ overlaywindow Oversampling OWNDC OWNERDRAW +Packagemanager PACL PAINTSTRUCT PALETTEWINDOW @@ -1215,7 +1217,6 @@ qit QITAB QITABENT qoi -qps Quarternary QUERYENDSESSION QUERYOPEN @@ -1549,7 +1550,6 @@ TDevice telem telephon templatenamespace -Tenge testhost testprocess TEXCOORD @@ -1570,14 +1570,12 @@ timeutil Titlecase tkcontrols tkconverters -TKey TLayout tlb tlbimp TMPVAR TNP toggleswitch -toolkitcontrols toolkitconverters Toolset toolwindow @@ -1595,7 +1593,6 @@ trl Tsd TServer TStr -TValue tweakme TWF tymed @@ -1616,7 +1613,6 @@ ums uncompilable UNCPRIORITY UNDNAME -unescape UNICODETEXT uninstantiated uniquifier @@ -1851,10 +1847,3 @@ zonable zoneset Zoneszonabletester zzz - -# FALSE POSITIVES - -## NOTICE.MD > MOZILLA PUBLIC LICENSE v1.1 -declatory -## "PackagemanagerWrapper.cs" should be "PackageManagerWrapper.cs" -Packagemanager diff --git a/.pipelines/verifyAndSetLatestVCToolsVersion.ps1 b/.pipelines/verifyAndSetLatestVCToolsVersion.ps1 index 1644c01e73..3d140a6c9b 100644 --- a/.pipelines/verifyAndSetLatestVCToolsVersion.ps1 +++ b/.pipelines/verifyAndSetLatestVCToolsVersion.ps1 @@ -1,5 +1,5 @@ -$LatestVCToolsVersion = (([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml)).instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.Redist.14.Latest" -and $_.chip -eq "x64" }).version; +$LatestVCToolsVersion = (([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml)).instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.CRT.Source" }).version; Write-Output "Latest VCToolsVersion: $LatestVCToolsVersion" Write-Output "Updating VCToolsVersion environment variable for job" -Write-Output "##vso[task.setvariable variable=VCToolsVersion]$LatestVCToolsVersion" \ No newline at end of file +Write-Output "##vso[task.setvariable variable=VCToolsVersion]$LatestVCToolsVersion" diff --git a/Directory.Build.props b/Directory.Build.props index f932d0036d..f4a108e69a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -59,10 +59,17 @@ 202310210737 - $(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);packages\Microsoft.WindowsAppSDK.*\tools\net472\ApplicationInsights.config + + $(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns); + \**\ApplicationInsights.config; + $(LocalAppData)\Microsoft\VSApplicationInsights\**; + $(LocalAppData)\Microsoft\Windows\INetCache\**; + A:\; + E:\; + - + + + @@ -50,8 +51,8 @@ - - + + @@ -60,13 +61,18 @@ - + + - - + + + + + + @@ -74,7 +80,8 @@ - + + diff --git a/NOTICE.md b/NOTICE.md index 9a7db68301..235cff2ad8 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1314,7 +1314,7 @@ EXHIBIT A -Mozilla Public License. - hyjiacan.pinyin4net 4.1.1 - Interop.Microsoft.Office.Interop.OneNote 1.1.0.2 - LazyCache 2.4.0 -- Mages 2.0.1 +- Mages 2.0.2 - Markdig.Signed 0.34.0 - Microsoft.CodeAnalysis.NetAnalyzers 8.0.0 - Microsoft.Data.Sqlite 8.0.0 @@ -1328,7 +1328,7 @@ EXHIBIT A -Mozilla Public License. - Microsoft.Toolkit.Uwp.Notifications 7.1.2 - Microsoft.Web.WebView2 1.0.2088.41 - Microsoft.Win32.SystemEvents 8.0.0 -- Microsoft.Windows.Compatibility 8.0.0 +- Microsoft.Windows.Compatibility 8.0.1 - Microsoft.Windows.CsWin32 0.2.46-beta - Microsoft.Windows.CsWinRT 2.0.4 - Microsoft.Windows.SDK.BuildTools 10.0.22621.2428 @@ -1338,8 +1338,8 @@ EXHIBIT A -Mozilla Public License. - Microsoft.Xaml.Behaviors.Wpf 1.1.39 - ModernWpfUI 0.9.4 - Moq 4.18.4 -- MSTest.TestAdapter 3.1.1 -- MSTest.TestFramework 3.1.1 +- MSTest.TestAdapter 3.2.0 +- MSTest.TestFramework 3.2.0 - NLog.Extensions.Logging 5.3.8 - NLog.Schema 5.2.8 - ScipBe.Common.Office.OneNote 3.0.1 @@ -1351,6 +1351,7 @@ EXHIBIT A -Mozilla Public License. - System.ComponentModel.Composition 8.0.0 - System.Configuration.ConfigurationManager 8.0.0 - System.Data.OleDb 8.0.0 +- System.Data.SqlClient 4.8.6 - System.Diagnostics.EventLog 8.0.0 - System.Diagnostics.PerformanceCounter 8.0.0 - System.Drawing.Common 8.0.1 diff --git a/README.md b/README.md index 4d8e8276d7..7836fe1aac 100644 --- a/README.md +++ b/README.md @@ -40,19 +40,19 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline Go to the [Microsoft PowerToys GitHub releases page][github-release-link] and click on `Assets` at the bottom to show the files available in the release. Please use the appropriate PowerToys installer that matches your machine's architecture and install scope. For most, it is `x64` and per-user. -[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=project%3Amicrosoft%2FPowerToys%2F51 -[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=project%3Amicrosoft%2FPowerToys%2F50 -[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.77.0/PowerToysUserSetup-0.77.0-x64.exe -[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.77.0/PowerToysUserSetup-0.77.0-arm64.exe -[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.77.0/PowerToysSetup-0.77.0-x64.exe -[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.77.0/PowerToysSetup-0.77.0-arm64.exe +[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=project%3Amicrosoft%2FPowerToys%2F52 +[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=project%3Amicrosoft%2FPowerToys%2F51 +[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.78.0/PowerToysUserSetup-0.78.0-x64.exe +[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.78.0/PowerToysUserSetup-0.78.0-arm64.exe +[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.78.0/PowerToysSetup-0.78.0-x64.exe +[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.78.0/PowerToysSetup-0.78.0-arm64.exe | Description | Filename | sha256 hash | |----------------|----------|-------------| -| Per user - x64 | [PowerToysUserSetup-0.77.0-x64.exe][ptUserX64] | 3485D3F45A3DE6ED7FA151A4CE9D6F941491C30E83AB51FD59B4ADCD20611F1A | -| Per user - ARM64 | [PowerToysUserSetup-0.77.0-arm64.exe][ptUserArm64] | 762DF383A01006A20C0BAB2D321667E855236EBA7108CDD475E4E2A8AB752E0E | -| Machine wide - x64 | [PowerToysSetup-0.77.0-x64.exe][ptMachineX64] | 1B6D4247313C289B07A3BF3531E215B3F9BEDBE9254919637F2AC502B4773C31 | -| Machine wide - ARM64 | [PowerToysSetup-0.77.0-arm64.exe][ptMachineArm64] | CF740B3AC0EB5C23E18B07ACC2D0C6EC5F4CE4B3A2EDC67C2C9FDF6EF78F0352 | +| Per user - x64 | [PowerToysUserSetup-0.78.0-x64.exe][ptUserX64] | 120B1CEFC94D76EC593A61D717BBB2E12AF195D19E04C811F519D3F9B9B3B5C0 | +| Per user - ARM64 | [PowerToysUserSetup-0.78.0-arm64.exe][ptUserArm64] | 3C3C8A8A549ABDD1C5E5DA7DC22D254F7BBD0F9DC05DA17E51020B153662F083 | +| Machine wide - x64 | [PowerToysSetup-0.78.0-x64.exe][ptMachineX64] | 19E025381588ABAEC209CDD0A18BB779EE58FC24646D898C2A7C38A4858EAEDB | +| Machine wide - ARM64 | [PowerToysSetup-0.78.0-arm64.exe][ptMachineArm64] | 5C70054A8991885A958F066B00D7FAFE608C730FC7A99178D6C64A1F03A3C109 | This is our preferred method. @@ -98,112 +98,143 @@ For guidance on developing for PowerToys, please read the [developer docs](/doc/ Our [prioritized roadmap][roadmap] of features and utilities that the core team is focusing on. -### 0.77 - December 2023 Update +### 0.78 - January 2024 Update -In this release, we focused on new features, stability and improvements. +In this release, we focused on stability and improvements. **Highlights** - - New utility: Command Not Found PowerShell 7.4 module - adds the ability to detect failed commands in PowerShell 7.4 and suggest a package to install using winget. Thanks [@carlos-zamora](https://github.com/carlos-zamora)! - - Keyboard manager does not register low level hook if there are no remappings anymore. - - Added support for QOI file type in Peek. Thanks [@pedrolamas](https://github.com/pedrolamas)! - - Added support for loading 3rd-party plugins with additional dependencies in PowerToys Run. Thanks [@coreyH](https://github.com/CoreyHayward)! + - New languages added: Arabic (Saudi Arabia), Hebrew, Persian and Ukrainian. We are going to assume we have some bugs. We want to identify & fix them and are open for community help. + - Many dependencies updated, aiming for security and stability. + - Fixed commonly reported PowerToys Run startup crashes after an upgrade. + - New settings and GPO policies to help control behavior after an upgrade. Thanks [@htcfreek](https://github.com/htcfreek)! + +Here are some screenshots of the new languages: +![Arabic SA Settings screenshot](https://github.com/microsoft/PowerToys/assets/26118718/be27096d-6c03-4b09-afc4-478ca427e3ec) +![Hebrew Settings screenshot](https://github.com/microsoft/PowerToys/assets/26118718/e1435060-1f94-4e41-adee-1d0a609584ca) +![Persian Settings screenshot](https://github.com/microsoft/PowerToys/assets/26118718/8592dcb7-8a04-4831-9325-a8b9b05787df) +![Ukrainian Settings screenshot](https://github.com/microsoft/PowerToys/assets/26118718/24242dd8-eb17-4859-b2e4-1e5c63ffbffd) ### General - - Bump WPF-UI package version to fix crashes related to theme changes. (This was a hotfix for 0.76) - - Fixed typo in version change notification. Thanks [@PesBandi](https://github.com/PesBandi)! - - Code improvements and fixed silenced warnings introduced by upgrade to .NET 8. - - Update copyright year for 2024. - - Added setting to disable warning notifications about detecting an application running as Administrator. + - Added Arabic (Saudi Arabia) translation. + - Added Hebrew translation. + - Added Persian translation. + - Added Ukrainian translation. + - Improved the file watcher used across many utilities to consume less resources. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! ### AlwaysOnTop - - Show notification when elevated app is in the foreground but AlwaysOnTop is running non-elevated. + - Fixed an invisible border issue when the border color was set to the black color. + - Added the AlwayOnTop icon to the base application executable. Thanks [@ckirby19](https://github.com/ckirby19)! ### Command Not Found - - Added a new utility: A Command Not Found PowerShell 7.4 module. It adds the ability to detect failed commands in PowerShell 7.4 and suggest a package to install using winget. Thanks [@carlos-zamora](https://github.com/carlos-zamora)! - -### Environment Variables - - - Fixed issue causing Environment Variables window not to appear as a foreground window. - -### FancyZones - - - Fixed snapping specific apps (e.g. Facebook messenger). (This was a hotfix for 0.76) - - Fixed behavior of Move newly created windows to current active monitor setting to keep maximize state on moving. Thanks [@quyenvsp](https://github.com/quyenvsp)! - - Fixed issue causing FancyZones Editor layout window to be zoned. + - Signed the PowerShell scripts used by the Command Not Found installation process. ### File Explorer add-ons - - Fixed WebView2 based previewers issue caused by the latest WebView update. (This was a hotfix for 0.76) + - Fixed an issue causing SVG Thumbnail generation to hang when trying to preview SVG files at the same time. + +### File Locksmith + + - Improved the context menu entry caption. Thanks [@niels9001](https://github.com/niels9001)! + +### Find My Mouse + + - Added more settings to tune shake detection when activating through mouse shake. ### Hosts File Editor - - Fixed issue causing settings not to be preserved on update. + - Added a feature to duplicate an entry. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! + +### Installer + + - Included the new languages localization files in the installer. ### Image Resizer - - Fixed crash caused by WpfUI ThemeWatcher. (This was a hotfix for 0.76) - -### Keyboard Manager - - - Do not register low level hook if there are no remappings. + - Improved the context menu entry caption. Thanks [@niels9001](https://github.com/niels9001)! ### Peek - - Improved icon and title showing for previewed files. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! - - Added QOI file type support. Thanks [@pedrolamas](https://github.com/pedrolamas)! + - Added a missing tooltip for the file size. Thanks [@HydroH](https://github.com/HydroH)! + +### PowerRename + + - Improved and added localization to the context menu entry caption. Thanks [@niels9001](https://github.com/niels9001)! ### PowerToys Run - - Fixed results list UI element height for different maximum number of results value. (This was a hotfix for 0.76) - - Fixed icon extraction for .lnk files. (This was a hotfix for 0.76) - - Fixed search box UI glitch when FlowDirection is RightToLeft. (This was a hotfix for 0.76) - - Fixed theme setting. (This was a hotfix for 0.76) - - Fixed error reporting window UI issue. Thanks [@niels9001](https://github.com/niels9001)! - - UI improvements and ability to show/hide plugins overview panel. Thanks [@niels9001](https://github.com/niels9001)! - - Allow interaction with plugin hints. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! - - Switch to WPF-UI theme manager. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! - - Fixed issue causing 3rd party plugin's dependencies dll not being loaded properly. Thanks [@coreyH](https://github.com/CoreyHayward)! - - Added configurable font sizes. Thanks [@niels9001](https://github.com/niels9001)! - - Changed the text color of plugin hints to improve the contrast when light theme is used. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! - - Fix scientific notation errors in Calculator plugin. Thanks [@viggyd](https://github.com/viggyd)! - - Add URI/URL features to Value generator plugin. Thanks [@htcfreek](https://github.com/htcfreek)! + - Removed references to unused settings from the code, which were causing crashes on some machines. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! + - Fixed an issue causing a scrollbar to be out of view. Thanks [@niels9001](https://github.com/niels9001)! + - Added logic to try and detect running games to full screen detection. Thanks [@anaisbetts](https://github.com/anaisbetts)! + - Added support for converting negative values in the Unit Converter plugin. Thanks [@Dub1shu](https://github.com/Dub1shu)! + - Fixed stale results in the Visual Studio Code Workspaces plugin by checking if files still exist. Thanks [@anderspk](https://github.com/anderspk)! + - Fixed an activation crash that occurred after 0.77 on some configurations. + - Fixed a startup crash that occurred when saving the new version of settings after an upgrade. + - You can now calculate bigger hexadecimal numbers in the Calculator plugin. + - The "max results to show before scrolling" setting can now also be applied to the initial plugin hint listing. ### Quick Accent - - Moved Greek specific characters from All language set to Greek. Thanks [@PesBandi](https://github.com/PesBandi)! - - Add more mathematical symbols. Thanks [@kevinfu2](https://github.com/kevinfu2)! + - Added the ellipses character to all languages. Thanks [@HydroH](https://github.com/HydroH)! + - Added an option to not activate when playing a game. Thanks [@HydroH](https://github.com/HydroH)! + - Added the E with breve and pilcrow characters to all languages. Thanks [@PesBandi](https://github.com/PesBandi)! ### Settings - - Fixed exception occurring on theme change. - - Fix "What's new" icon. Thanks [@niels9001](https://github.com/niels9001)! - - Remove obsolete UI Font icon properties. Thanks [@Jay-o-Way](https://github.com/Jay-o-Way)! - - OOBE UI improvements. Thanks [@Jay-o-Way](https://github.com/Jay-o-Way)! - - XAML Binding improvements. Thanks [@Jay-o-Way](https://github.com/Jay-o-Way)! - - Fixed crash caused by ThemeListener constructor exceptions. + - Removed the Command Not Found listing from the Settings dashboard and flyout, since it can't really be enabled or disabled from there. + - Added a settings and GPO rule to disable opening the What's New OOBE page after an update. Thanks [@htcfreek](https://github.com/htcfreek)! + - Added a settings and GPO rule to disable toast notifications about new updates being available. Thanks [@htcfreek](https://github.com/htcfreek)! + - Fixed an issue causing the Settings window to not be brought to the foreground after activating through the system tray icon. + - Standardized accent brush and corner radius on the dashboard page. + - Improved UI and messages for GPO locked settings. Thanks [@htcfreek](https://github.com/htcfreek)! + - Fixed an issue causing the OOBE window to maximize and hide the system taskbar. + - Reworked the update settings in the General page. Thanks [@htcfreek](https://github.com/htcfreek)! + - Tweaked UI for the update settings in the General page. Thanks [@niels9001](https://github.com/niels9001)! + - Updated the modules images in the Settings and OOBE screens. Thanks [@niels9001](https://github.com/niels9001)! + - Updated OOBE descriptions to take into account the changes in context menu captions. Thanks [@niels9001](https://github.com/niels9001)! ### Documentation - - Improved docs for adding new languages to monaco. Thanks [@PesBandi](https://github.com/PesBandi)! - - Update README.md to directly state x64 & ARM processor in requirements. - - Added Scoop plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@Quriz](https://github.com/Quriz)! + - Added Spotify plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@waaverecords](https://github.com/waaverecords)! + - Added InputTyper and ClipboardManager plugins to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@CoreyHayward](https://github.com/CoreyHayward)! + - Added CurrencyConverter plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@Advaith3600](https://github.com/Advaith3600)! + - Updated and cleaned up the new PowerToys plugin checklist documentation. Thanks [@Parvezkhan0](https://github.com/Parvezkhan0) and [@hlaueriksson](https://github.com/hlaueriksson)! + - Added a documentation page to describe status code colors for Mouse Without Borders. Thanks [@ckirby19](https://github.com/ckirby19)! ### Development - - Adopted XamlStyler for PowerToys Run source code. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! - - Consolidate Microsoft.Windows.SDK.BuildTools across solution. - - Upgraded Boost's lib to v1.84. - - Upgraded HelixToolkit packages to the latest versions. - - Updated sdl baselines. + - Fixed dependency issues on upgrading .NET from 8.0.0 to 8.0.1. + - Upgraded Microsoft.Extensions.ObjectPool from .NET 5 to .NET 8. + - Upgraded the Windows SDK Build Tools to 10.0.22621.2428. + - Upgraded the Windows Implementation Library to 1.0.231216.1. + - Upgraded NLog.Schema to 5.2.8 and NLog.Extensions.Logging to 5.3.8. + - Upgraded Markdig.Signed to 0.34.0. + - Upgraded Microsoft.NET.Test.Sdk to 17.8. + - Upgraded CommunityToolkit.WinUI dependencies to 8.0.240109. + - Upgraded CommunityToolkit.Mvvm to 8.2.2. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! + - Upgraded Windows App SDK to 1.4.4. Thanks [@snickler](https://github.com/snickler)! + - Upgraded WPFUI version to 3.0.0-preview.13. Thanks [@niels9001](https://github.com/niels9001)! + - Upgraded StyleCop.Analyzers to 1.2.0-beta.556. Thanks [@davidegiacometti](https://github.com/davidegiacometti)! + - Upgraded Microsoft.Windows.Compatibility to 8.0.1. + - Upgraded System.Data.SqlClient to 4.8.6. + - Consolidate XAML Namespaces across the solutions. Thanks [@Jay-o-Way](https://github.com/Jay-o-Way)! + - Removed the toolkit labs package source reference, since the controls we were using made it to the generally available community toolkit. + - Added Microsoft.MSBuildCache to experiment with build caching to reduce pipeline runs duration. Thanks [@dfederm](https://github.com/dfederm)! + - Configured the release CI to follow the latest 1ES pipeline release version again. + - Removed the copyright year from assembly information. Thanks [@Aaron-Junker](https://github.com/Aaron-Junker)! + - Added the Command Not Found entry to the GitHub templates. + - Removed unused code for a GPO policy to control auto updating of PowerToys. Thanks [@htcfreek](https://github.com/htcfreek)! + - Improved code behind for getting the localization of context menu entries. + - Locked some terms in resource files to avoid localization. -#### What is being planned for version 0.78 +#### What is being planned for version 0.79 -For [v0.78][github-next-release-work], we'll work on the items below: +For [v0.79][github-next-release-work], we'll work on the items below: + - Stability / bug fixes - Language selection - Automated UI testing through WinAppDriver - Develop support for Desired State Configuration @@ -211,8 +242,6 @@ For [v0.78][github-next-release-work], we'll work on the items below: ![ColorPicker UI refresh WIP](https://github.com/microsoft/PowerToys/assets/9866362/ceebe54b-de63-4ce7-afcb-2cd4280bf4d1) - - Stability / bug fixes - ## PowerToys Community The PowerToys team is extremely grateful to have the [support of an amazing active community][community-link]. The work you do is incredibly important. PowerToys wouldn’t be nearly what it is today without your help filing bugs, updating documentation, guiding the design, or writing features. We want to say thank you and take time to recognize your work. Month by month, you directly help make PowerToys a better piece of software. diff --git a/doc/devdocs/modules/mousewithoutborders.md b/doc/devdocs/modules/mousewithoutborders.md new file mode 100644 index 0000000000..3a8f981087 --- /dev/null +++ b/doc/devdocs/modules/mousewithoutborders.md @@ -0,0 +1,22 @@ +# Mouse Without Borders module +This file contains the documentation for the Mouse Without Borders PowerToy module. +## Table of Contents: +- [Mouse Without Borders module](#mouse-without-borders-module) + - [Table of Contents](#table-of-contents) + - [Status colors](#status-colors) + +## Status colors +The following colors are used to indicate the connection status to the user when trying to connect to another computer: + +| Connection Status | Color | Hex Code | +| :-----: | :---: | :---: | +| NA | Dark Grey | `#00717171` | +| Resolving | Yellow | `#FFFFFF00` | +| Connecting | Orange | `#FFFFA500` | +| Handshaking | Blue | `#FF0000FF` | +| Error | Red | `#FFFF0000` | +| ForceClosed | Purple | `#FF800080` | +| InvalidKey | Brown | `#FFA52A2A` | +| Timeout | Pink | `#FFFFC0CB` | +| SendError | Maroon | `#FF800000` | +| Connected | Green | `#FF008000` | diff --git a/doc/images/icons/FancyZones_MDL2.svg b/doc/images/icons/FancyZones_MDL2.svg deleted file mode 100644 index 5173874aa1..0000000000 --- a/doc/images/icons/FancyZones_MDL2.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/doc/images/overview/Awake_large.png b/doc/images/overview/Awake_large.png index 1402f76c5e..6c8381b3e3 100644 Binary files a/doc/images/overview/Awake_large.png and b/doc/images/overview/Awake_large.png differ diff --git a/doc/images/overview/Awake_small.png b/doc/images/overview/Awake_small.png index be65d12f1c..3cebee3f32 100644 Binary files a/doc/images/overview/Awake_small.png and b/doc/images/overview/Awake_small.png differ diff --git a/doc/images/overview/CommandNotFound_large.png b/doc/images/overview/CommandNotFound_large.png new file mode 100644 index 0000000000..b6cd49ff8c Binary files /dev/null and b/doc/images/overview/CommandNotFound_large.png differ diff --git a/doc/images/overview/CommandNotFound_small.png b/doc/images/overview/CommandNotFound_small.png new file mode 100644 index 0000000000..91fbaad9bb Binary files /dev/null and b/doc/images/overview/CommandNotFound_small.png differ diff --git a/doc/images/overview/CropAndLock_large.png b/doc/images/overview/CropAndLock_large.png new file mode 100644 index 0000000000..fe825e22eb Binary files /dev/null and b/doc/images/overview/CropAndLock_large.png differ diff --git a/doc/images/overview/CropAndLock_small.png b/doc/images/overview/CropAndLock_small.png new file mode 100644 index 0000000000..55bd32ca51 Binary files /dev/null and b/doc/images/overview/CropAndLock_small.png differ diff --git a/doc/images/overview/EnvironmentVariables_large.png b/doc/images/overview/EnvironmentVariables_large.png new file mode 100644 index 0000000000..96400df609 Binary files /dev/null and b/doc/images/overview/EnvironmentVariables_large.png differ diff --git a/doc/images/overview/EnvironmentVariables_small.png b/doc/images/overview/EnvironmentVariables_small.png new file mode 100644 index 0000000000..226f073acb Binary files /dev/null and b/doc/images/overview/EnvironmentVariables_small.png differ diff --git a/doc/images/overview/FileExplorerPreview_large.png b/doc/images/overview/FileExplorerPreview_large.png new file mode 100644 index 0000000000..1118415bf0 Binary files /dev/null and b/doc/images/overview/FileExplorerPreview_large.png differ diff --git a/doc/images/overview/FileExplorerPreview_small.png b/doc/images/overview/FileExplorerPreview_small.png new file mode 100644 index 0000000000..00965ca07f Binary files /dev/null and b/doc/images/overview/FileExplorerPreview_small.png differ diff --git a/doc/images/overview/FileLocksmith_large.png b/doc/images/overview/FileLocksmith_large.png new file mode 100644 index 0000000000..027ec353e8 Binary files /dev/null and b/doc/images/overview/FileLocksmith_large.png differ diff --git a/doc/images/overview/FileLocksmith_small.png b/doc/images/overview/FileLocksmith_small.png new file mode 100644 index 0000000000..7c2fcbdd3d Binary files /dev/null and b/doc/images/overview/FileLocksmith_small.png differ diff --git a/doc/images/overview/HostFileEditor_large.png b/doc/images/overview/HostFileEditor_large.png new file mode 100644 index 0000000000..2dc457e5cd Binary files /dev/null and b/doc/images/overview/HostFileEditor_large.png differ diff --git a/doc/images/overview/HostFileEditor_small.png b/doc/images/overview/HostFileEditor_small.png new file mode 100644 index 0000000000..acd004d1a2 Binary files /dev/null and b/doc/images/overview/HostFileEditor_small.png differ diff --git a/doc/images/overview/ImageResizer_large.png b/doc/images/overview/ImageResizer_large.png index edf3615e74..5a0ad9b141 100644 Binary files a/doc/images/overview/ImageResizer_large.png and b/doc/images/overview/ImageResizer_large.png differ diff --git a/doc/images/overview/ImageResizer_small.png b/doc/images/overview/ImageResizer_small.png index 8f227de84a..3d3f1c8f3c 100644 Binary files a/doc/images/overview/ImageResizer_small.png and b/doc/images/overview/ImageResizer_small.png differ diff --git a/doc/images/overview/MouseWithoutBorders_large.png b/doc/images/overview/MouseWithoutBorders_large.png new file mode 100644 index 0000000000..baba639afc Binary files /dev/null and b/doc/images/overview/MouseWithoutBorders_large.png differ diff --git a/doc/images/overview/MouseWithoutBorders_small.png b/doc/images/overview/MouseWithoutBorders_small.png new file mode 100644 index 0000000000..77aed66258 Binary files /dev/null and b/doc/images/overview/MouseWithoutBorders_small.png differ diff --git a/doc/images/overview/Original/Awake.png b/doc/images/overview/Original/Awake.png index 9622431f12..584562ca99 100644 Binary files a/doc/images/overview/Original/Awake.png and b/doc/images/overview/Original/Awake.png differ diff --git a/doc/images/overview/Original/CommandNotFound.png b/doc/images/overview/Original/CommandNotFound.png new file mode 100644 index 0000000000..eb79bf0a94 Binary files /dev/null and b/doc/images/overview/Original/CommandNotFound.png differ diff --git a/doc/images/overview/Original/CropAndLock.png b/doc/images/overview/Original/CropAndLock.png new file mode 100644 index 0000000000..852c4887ac Binary files /dev/null and b/doc/images/overview/Original/CropAndLock.png differ diff --git a/doc/images/overview/Original/EnvironmentVariables.png b/doc/images/overview/Original/EnvironmentVariables.png new file mode 100644 index 0000000000..dda04d4df0 Binary files /dev/null and b/doc/images/overview/Original/EnvironmentVariables.png differ diff --git a/doc/images/overview/Original/FileExplorerPreview.png b/doc/images/overview/Original/FileExplorerPreview.png new file mode 100644 index 0000000000..c894bbca4b Binary files /dev/null and b/doc/images/overview/Original/FileExplorerPreview.png differ diff --git a/doc/images/overview/Original/FileLocksmith.png b/doc/images/overview/Original/FileLocksmith.png new file mode 100644 index 0000000000..4fe5b2e0fd Binary files /dev/null and b/doc/images/overview/Original/FileLocksmith.png differ diff --git a/doc/images/overview/Original/HostFileEditor.png b/doc/images/overview/Original/HostFileEditor.png new file mode 100644 index 0000000000..84f0dca81f Binary files /dev/null and b/doc/images/overview/Original/HostFileEditor.png differ diff --git a/doc/images/overview/Original/ImageResizer.png b/doc/images/overview/Original/ImageResizer.png index ce820cf950..52c52fc145 100644 Binary files a/doc/images/overview/Original/ImageResizer.png and b/doc/images/overview/Original/ImageResizer.png differ diff --git a/doc/images/overview/Original/MouseWithoutBorders.png b/doc/images/overview/Original/MouseWithoutBorders.png new file mode 100644 index 0000000000..3f5c7dc53c Binary files /dev/null and b/doc/images/overview/Original/MouseWithoutBorders.png differ diff --git a/doc/images/overview/Original/PasteAsPlainText.png b/doc/images/overview/Original/PasteAsPlainText.png new file mode 100644 index 0000000000..68f3c67e31 Binary files /dev/null and b/doc/images/overview/Original/PasteAsPlainText.png differ diff --git a/doc/images/overview/Original/Peek.png b/doc/images/overview/Original/Peek.png new file mode 100644 index 0000000000..57b496118d Binary files /dev/null and b/doc/images/overview/Original/Peek.png differ diff --git a/doc/images/overview/Original/QuickAccent.png b/doc/images/overview/Original/QuickAccent.png index 3c4bf6cd0f..d4f9bbf625 100644 Binary files a/doc/images/overview/Original/QuickAccent.png and b/doc/images/overview/Original/QuickAccent.png differ diff --git a/doc/images/overview/Original/RegistryPreview.png b/doc/images/overview/Original/RegistryPreview.png new file mode 100644 index 0000000000..325f7f08a8 Binary files /dev/null and b/doc/images/overview/Original/RegistryPreview.png differ diff --git a/doc/images/overview/PasteAsPlainText_large.png b/doc/images/overview/PasteAsPlainText_large.png new file mode 100644 index 0000000000..dfc83a2f33 Binary files /dev/null and b/doc/images/overview/PasteAsPlainText_large.png differ diff --git a/doc/images/overview/PasteAsPlainText_small.png b/doc/images/overview/PasteAsPlainText_small.png new file mode 100644 index 0000000000..866c49933a Binary files /dev/null and b/doc/images/overview/PasteAsPlainText_small.png differ diff --git a/doc/images/overview/Peek_large.png b/doc/images/overview/Peek_large.png new file mode 100644 index 0000000000..ab0e9abe42 Binary files /dev/null and b/doc/images/overview/Peek_large.png differ diff --git a/doc/images/overview/Peek_small.png b/doc/images/overview/Peek_small.png new file mode 100644 index 0000000000..8040bf3b2f Binary files /dev/null and b/doc/images/overview/Peek_small.png differ diff --git a/doc/images/overview/QuickAccent_large.png b/doc/images/overview/QuickAccent_large.png index a398f9d690..491cf80f4f 100644 Binary files a/doc/images/overview/QuickAccent_large.png and b/doc/images/overview/QuickAccent_large.png differ diff --git a/doc/images/overview/QuickAccent_small.png b/doc/images/overview/QuickAccent_small.png index 6ae9299ac6..1a1e2ccce7 100644 Binary files a/doc/images/overview/QuickAccent_small.png and b/doc/images/overview/QuickAccent_small.png differ diff --git a/doc/images/overview/RegistryPreview_large.png b/doc/images/overview/RegistryPreview_large.png new file mode 100644 index 0000000000..1433e4dd5c Binary files /dev/null and b/doc/images/overview/RegistryPreview_large.png differ diff --git a/doc/images/overview/RegistryPreview_small.png b/doc/images/overview/RegistryPreview_small.png new file mode 100644 index 0000000000..7a75a39009 Binary files /dev/null and b/doc/images/overview/RegistryPreview_small.png differ diff --git a/doc/thirdPartyRunPlugins.md b/doc/thirdPartyRunPlugins.md index 0e9f4a62ab..bfcbc44029 100644 --- a/doc/thirdPartyRunPlugins.md +++ b/doc/thirdPartyRunPlugins.md @@ -36,4 +36,5 @@ Contact the developers of a plugin directly for assistance with a specific plugi | [Scoop](https://github.com/Quriz/PowerToysRunScoop) | [Quriz](https://github.com/Quriz) | Search and install packages from Scoop | | [Spotify](https://github.com/waaverecords/PowerToys-Run-Spotify) | [waaverecords](https://github.com/waaverecords) | Search Spotify and control its player | | [Input Typer](https://github.com/CoreyHayward/PowerToys-Run-InputTyper) | [CoreyHayward](https://github.com/CoreyHayward) | Type the input as if sent from a keyboard | -| [Clipboard Manager](https://github.com/CoreyHayward/PowerToys-Run-ClipboardManager) | [CoreyHayward](https://github.com/CoreyHayward) | Search and paste text from your clipboard history | \ No newline at end of file +| [Clipboard Manager](https://github.com/CoreyHayward/PowerToys-Run-ClipboardManager) | [CoreyHayward](https://github.com/CoreyHayward) | Search and paste text from your clipboard history | +| [Currency Converter](https://github.com/Advaith3600/PowerToys-Run-Currency-Converter) | [advaith3600](https://github.com/advaith3600) | Convert real and crypto currencies | diff --git a/installer/PowerToysSetup/Resources.wxs b/installer/PowerToysSetup/Resources.wxs index e8828940ab..c4bf93d59b 100644 --- a/installer/PowerToysSetup/Resources.wxs +++ b/installer/PowerToysSetup/Resources.wxs @@ -6,7 +6,7 @@ - + @@ -16,14 +16,20 @@ - + + + + + + + @@ -54,6 +60,8 @@ + + @@ -74,8 +82,11 @@ - + + + + @@ -84,9 +95,15 @@ + + + + + + @@ -131,6 +148,9 @@ + + + @@ -441,14 +461,20 @@ - + + + + + + + @@ -479,6 +505,8 @@ + + diff --git a/installer/PowerToysSetup/Settings.wxs b/installer/PowerToysSetup/Settings.wxs index a31903d643..8963dabff0 100644 --- a/installer/PowerToysSetup/Settings.wxs +++ b/installer/PowerToysSetup/Settings.wxs @@ -14,13 +14,13 @@ - + - + diff --git a/installer/PowerToysSetup/generateAllFileComponents.ps1 b/installer/PowerToysSetup/generateAllFileComponents.ps1 index f233ac5da6..d9d8b6845d 100644 --- a/installer/PowerToysSetup/generateAllFileComponents.ps1 +++ b/installer/PowerToysSetup/generateAllFileComponents.ps1 @@ -180,7 +180,7 @@ Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListNa Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName SettingsV2AssetsFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\Settings\""" Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName SettingsV2AssetsModulesFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\Settings\Modules\""" Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName SettingsV2OOBEAssetsModulesFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\Settings\Modules\OOBE\""" -Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName SettingsV2OOBEAssetsFluentIconsFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\Settings\FluentIcons\""" +Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName SettingsV2OOBEAssetsFluentIconsFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\Settings\Icons\""" Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""SettingsV2AssetsFiles"" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot" Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""SettingsV2AssetsModulesFiles"" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot" Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""SettingsV2OOBEAssetsModulesFiles"" -wxsFilePath $PSScriptRoot\Settings.wxs -regroot $registryroot" diff --git a/nuget.config b/nuget.config index 0643a02af3..cb38015f4a 100644 --- a/nuget.config +++ b/nuget.config @@ -1,7 +1,8 @@ - + - + + diff --git a/packages.config b/packages.config index c99cd91fd7..144320fc45 100644 --- a/packages.config +++ b/packages.config @@ -1,6 +1,6 @@ - - - + + + \ No newline at end of file diff --git a/src/common/utils/gpo.h b/src/common/utils/gpo.h index 66fe34a10a..d1ded85f64 100644 --- a/src/common/utils/gpo.h +++ b/src/common/utils/gpo.h @@ -65,7 +65,6 @@ namespace powertoys_gpo { const std::wstring POLICY_DISABLE_AUTOMATIC_UPDATE_DOWNLOAD = L"AutomaticUpdateDownloadDisabled"; const std::wstring POLICY_SUSPEND_NEW_UPDATE_TOAST = L"SuspendNewUpdateAvailableToast"; const std::wstring POLICY_DISABLE_NEW_UPDATE_TOAST = L"DisableNewUpdateAvailableToast"; - const std::wstring POLICY_DISABLE_PERIODIC_UPDATE_CHECK = L"PeriodicUpdateCheckDisabled"; const std::wstring POLICY_DISABLE_SHOW_WHATS_NEW_AFTER_UPDATES = L"DoNotShowWhatsNewAfterUpdates"; // The registry value names for other PowerToys policies. @@ -412,11 +411,6 @@ namespace powertoys_gpo { return getConfiguredValue(POLICY_DISABLE_NEW_UPDATE_TOAST); } - inline gpo_rule_configured_t getDisablePeriodicUpdateCheckValue() - { - return getConfiguredValue(POLICY_DISABLE_PERIODIC_UPDATE_CHECK); - } - inline gpo_rule_configured_t getDisableShowWhatsNewAfterUpdatesValue() { return getConfiguredValue(POLICY_DISABLE_SHOW_WHATS_NEW_AFTER_UPDATES); diff --git a/src/common/utils/resources.h b/src/common/utils/resources.h index ffb88ca3a7..7a7fd637ea 100644 --- a/src/common/utils/resources.h +++ b/src/common/utils/resources.h @@ -21,3 +21,4 @@ inline std::wstring get_resource_string(UINT resource_id, HINSTANCE instance, co extern "C" IMAGE_DOS_HEADER __ImageBase; // Wrapper for getting a string from the resource file. Returns the resource id text when fails. #define GET_RESOURCE_STRING(resource_id) get_resource_string(resource_id, reinterpret_cast(&__ImageBase), L#resource_id) +#define GET_RESOURCE_STRING_FALLBACK(resource_id, fallback) get_resource_string(resource_id, reinterpret_cast(&__ImageBase), fallback) diff --git a/src/gpo/assets/PowerToys.admx b/src/gpo/assets/PowerToys.admx index 06757271a0..fef8e1021d 100644 --- a/src/gpo/assets/PowerToys.admx +++ b/src/gpo/assets/PowerToys.admx @@ -451,18 +451,6 @@ - diff --git a/src/gpo/assets/en-US/PowerToys.adml b/src/gpo/assets/en-US/PowerToys.adml index 0fb97927af..9850a68a1c 100644 --- a/src/gpo/assets/en-US/PowerToys.adml +++ b/src/gpo/assets/en-US/PowerToys.adml @@ -59,11 +59,11 @@ If enabled, per-user installation is not allowed. If disabled or not configured, per-user installation is allowed. - This policy configures whether automatic downloads of available updates are disabled or not. (On metered connections updates are never downloaded.) + This policy configures whether the automatic download and installation of available updates is disabled or not. (On metered connections updates are never downloaded.) -If enabled, automatic downloads are disabled. +If enabled, automatic download and installation is disabled. -If disabled or not configured, the user is in control of automatic downloads setting. +If disabled or not configured, the user can control this in the settings. This policy configures whether the action center notification for new updates is suspended for 2 minor releases. (Example: if the installed version is v0.60.0, then the next notification is shown for the v0.63.* release.) @@ -80,12 +80,6 @@ This policy has no effect if the update notification is disabled by the policy " If enabled, the notification is disabled. If disabled or not configured, the user can control if the notification is shown or not. - - This policy allows you to disable automatic update checks running in the background. (The manual check in PT Settings is not affected by this policy.) - -If enabled, the automatic update checks are disabled. - -If disabled or not configured, the automatic update checks are enabled. This policy allows you to configure if the window with the release notes is shown after updates. @@ -165,7 +159,6 @@ Note: Changes require a restart of PowerToys Run. Do not show the release notes after updates Suspend Action Center notification for new updates Disable Action Center notification for new updates - Disable automatic update checks Allow Experimentation Configure enabled state for all plugins Configure enabled state for individual plugins diff --git a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp index 4fdf4cef89..fabd02d951 100644 --- a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp +++ b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp @@ -9,6 +9,7 @@ #include #include +#include // Implementations of inherited IUnknown methods @@ -42,9 +43,7 @@ IFACEMETHODIMP_(ULONG) ExplorerCommand::Release() IFACEMETHODIMP ExplorerCommand::GetTitle(IShellItemArray* psiItemArray, LPWSTR* ppszName) { - WCHAR buffer[128]; - LoadStringW(globals::instance, IDS_FILELOCKSMITH_COMMANDTITLE, buffer, ARRAYSIZE(buffer)); - return SHStrDupW(buffer, ppszName); + return SHStrDup(context_menu_caption.c_str(), ppszName); } IFACEMETHODIMP ExplorerCommand::GetIcon(IShellItemArray* psiItemArray, LPWSTR* ppszIcon) @@ -126,18 +125,15 @@ IFACEMETHODIMP ExplorerCommand::QueryContextMenu(HMENU hmenu, UINT indexMenu, UI HRESULT hr = E_UNEXPECTED; if (m_data_obj && !(uFlags & (CMF_DEFAULTONLY | CMF_VERBSONLY | CMF_OPTIMIZEFORINVOKE))) { + wchar_t menuName[128] = { 0 }; + wcscpy_s(menuName, ARRAYSIZE(menuName), context_menu_caption.c_str()); + MENUITEMINFO mii; mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_STRING | MIIM_FTYPE | MIIM_ID | MIIM_STATE; mii.wID = idCmdFirst++; mii.fType = MFT_STRING; - - hr = GetTitle(NULL, &mii.dwTypeData); - if (FAILED(hr)) - { - return hr; - } - + mii.dwTypeData = (PWSTR)menuName; mii.fState = MFS_ENABLED; // icon from file @@ -237,6 +233,7 @@ HRESULT ExplorerCommand::s_CreateInstance(IUnknown* pUnkOuter, REFIID riid, void ExplorerCommand::ExplorerCommand() { ++globals::ref_count; + context_menu_caption = GET_RESOURCE_STRING_FALLBACK(IDS_FILELOCKSMITH_CONTEXT_MENU_ENTRY, L"Unlock with File Locksmith"); } ExplorerCommand::~ExplorerCommand() diff --git a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h index 9da12236be..dda50f9949 100644 --- a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h +++ b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h @@ -49,4 +49,5 @@ private: std::atomic m_ref_count = 1; IDataObject* m_data_obj = NULL; + std::wstring context_menu_caption; }; diff --git a/src/modules/FileLocksmith/FileLocksmithExt/Resources.resx b/src/modules/FileLocksmith/FileLocksmithExt/Resources.resx index 64aa4f4b98..f8cd42f70a 100644 --- a/src/modules/FileLocksmith/FileLocksmithExt/Resources.resx +++ b/src/modules/FileLocksmith/FileLocksmithExt/Resources.resx @@ -117,9 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - What's using this file? - This text will be shown when the user opens the context menu (right clicks) a file. + + Unlock with File Locksmith + This text will be shown when the user opens the context menu (right clicks) a file. File Locksmith is the product name, do not loc. File Locksmith diff --git a/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml b/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml index 700c9da144..c7b9023cb8 100644 --- a/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml +++ b/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml @@ -185,6 +185,17 @@ ScopeOwner="{x:Bind Entries}" /> + + + + + + + + Are you sure you want to delete this entry? + + Duplicate + Refers to the action of duplicate an existing entry + Duplicate entry diff --git a/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj b/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj index 18bf39e7e3..11b35d02b1 100644 --- a/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj +++ b/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj @@ -72,6 +72,7 @@ + diff --git a/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj b/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj index 2e7a227a47..9e922c28ad 100644 --- a/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj +++ b/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj @@ -218,6 +218,7 @@ + diff --git a/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj b/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj index 8a7d487fc5..99dd80f63f 100644 --- a/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj +++ b/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj @@ -81,6 +81,7 @@ + diff --git a/src/modules/imageresizer/ImageResizerContextMenu/Resources.resx b/src/modules/imageresizer/ImageResizerContextMenu/Resources.resx index f72fd33367..b559126fb3 100644 --- a/src/modules/imageresizer/ImageResizerContextMenu/Resources.resx +++ b/src/modules/imageresizer/ImageResizerContextMenu/Resources.resx @@ -117,8 +117,8 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Resize pictures + + Resize with Image Resizer Image Resizer diff --git a/src/modules/imageresizer/ImageResizerContextMenu/dllmain.cpp b/src/modules/imageresizer/ImageResizerContextMenu/dllmain.cpp index 83a53cd373..347475fd90 100644 --- a/src/modules/imageresizer/ImageResizerContextMenu/dllmain.cpp +++ b/src/modules/imageresizer/ImageResizerContextMenu/dllmain.cpp @@ -51,10 +51,7 @@ public: // IExplorerCommand IFACEMETHODIMP GetTitle(_In_opt_ IShellItemArray* items, _Outptr_result_nullonfailure_ PWSTR* name) { - wchar_t strResizePictures[64] = { 0 }; - LoadString(g_hInst, IDS_RESIZE_PICTURES_TITLE, strResizePictures, ARRAYSIZE(strResizePictures)); - - return SHStrDup(strResizePictures, name); + return SHStrDup(context_menu_caption.c_str(), name); } IFACEMETHODIMP GetIcon(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* icon) @@ -272,7 +269,7 @@ private: std::thread create_pipe_thread; HANDLE hPipe = INVALID_HANDLE_VALUE; - std::wstring app_name = L"ImageResizer"; + std::wstring context_menu_caption = GET_RESOURCE_STRING_FALLBACK(IDS_IMAGERESIZER_CONTEXT_MENU_ENTRY, L"Resize with Image Resizer"); }; CoCreatableClass(ImageResizerContextMenuCommand) diff --git a/src/modules/imageresizer/dll/ContextMenuHandler.cpp b/src/modules/imageresizer/dll/ContextMenuHandler.cpp index fddf2b4497..dd86eed5fb 100644 --- a/src/modules/imageresizer/dll/ContextMenuHandler.cpp +++ b/src/modules/imageresizer/dll/ContextMenuHandler.cpp @@ -18,7 +18,8 @@ CContextMenuHandler::CContextMenuHandler() { m_pidlFolder = NULL; m_pdtobj = NULL; - app_name = GET_RESOURCE_STRING(IDS_RESIZE_PICTURES); + context_menu_caption = GET_RESOURCE_STRING_FALLBACK(IDS_IMAGERESIZER_CONTEXT_MENU_ENTRY, L"Resize with Image Resizer"); + context_menu_caption_here = GET_RESOURCE_STRING_FALLBACK(IDS_IMAGERESIZER_CONTEXT_MENU_ENTRY_HERE, L"Resize with Image Resizer here"); } CContextMenuHandler::~CContextMenuHandler() @@ -105,22 +106,16 @@ HRESULT CContextMenuHandler::QueryContextMenu(_In_ HMENU hmenu, UINT indexMenu, if (type == PERCEIVED_TYPE_IMAGE) { HRESULT hr = E_UNEXPECTED; - wchar_t strResizePictures[64] = { 0 }; + wchar_t strResizePictures[128] = { 0 }; // If handling drag-and-drop... if (m_pidlFolder) { - // Suppressing C6031 warning since return value is not required. -#pragma warning(suppress : 6031) - // Load 'Resize pictures here' string - LoadString(g_hInst_imageResizer, IDS_RESIZE_PICTURES_HERE, strResizePictures, ARRAYSIZE(strResizePictures)); - dragDropFlag = true; + dragDropFlag=true; + wcscpy_s(strResizePictures, ARRAYSIZE(strResizePictures), context_menu_caption_here.c_str()); } else { - // Suppressing C6031 warning since return value is not required. -#pragma warning(suppress : 6031) - // Load 'Resize pictures' string - LoadString(g_hInst_imageResizer, IDS_RESIZE_PICTURES, strResizePictures, ARRAYSIZE(strResizePictures)); + wcscpy_s(strResizePictures, ARRAYSIZE(strResizePictures), context_menu_caption.c_str()); } MENUITEMINFO mii; @@ -348,7 +343,7 @@ HRESULT CContextMenuHandler::ResizePictures(CMINVOKECOMMANDINFO* pici, IShellIte HRESULT __stdcall CContextMenuHandler::GetTitle(IShellItemArray* /*psiItemArray*/, LPWSTR* ppszName) { - return SHStrDup(app_name.c_str(), ppszName); + return SHStrDup(context_menu_caption.c_str(), ppszName); } HRESULT __stdcall CContextMenuHandler::GetIcon(IShellItemArray* /*psiItemArray*/, LPWSTR* ppszIcon) diff --git a/src/modules/imageresizer/dll/ContextMenuHandler.h b/src/modules/imageresizer/dll/ContextMenuHandler.h index f2cbb83928..ba1465df88 100644 --- a/src/modules/imageresizer/dll/ContextMenuHandler.h +++ b/src/modules/imageresizer/dll/ContextMenuHandler.h @@ -51,7 +51,8 @@ private: PCIDLIST_ABSOLUTE m_pidlFolder; IDataObject* m_pdtobj; HBITMAP m_hbmpIcon = nullptr; - std::wstring app_name; + std::wstring context_menu_caption; + std::wstring context_menu_caption_here; }; OBJECT_ENTRY_AUTO(__uuidof(ContextMenuHandler), CContextMenuHandler) \ No newline at end of file diff --git a/src/modules/imageresizer/dll/Resources.resx b/src/modules/imageresizer/dll/Resources.resx index 15dd06dd60..73d162a129 100644 --- a/src/modules/imageresizer/dll/Resources.resx +++ b/src/modules/imageresizer/dll/Resources.resx @@ -117,11 +117,11 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Resize pictures + + Resize with Image Resizer - - Resize pictures here + + Resize with Image Resizer here Image Resizer diff --git a/src/modules/imageresizer/ui/App.xaml b/src/modules/imageresizer/ui/App.xaml index b43baa5b60..27b50ccee3 100644 --- a/src/modules/imageresizer/ui/App.xaml +++ b/src/modules/imageresizer/ui/App.xaml @@ -13,24 +13,6 @@ - - - - - - - - - - - - diff --git a/src/modules/imageresizer/ui/ViewModels/InputViewModel.cs b/src/modules/imageresizer/ui/ViewModels/InputViewModel.cs index 42b1b459a3..5290e28573 100644 --- a/src/modules/imageresizer/ui/ViewModels/InputViewModel.cs +++ b/src/modules/imageresizer/ui/ViewModels/InputViewModel.cs @@ -2,6 +2,8 @@ // The Brice Lambson licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/ +using System; +using System.Collections.Generic; using System.Linq; using System.Windows.Input; using Common.UI; @@ -55,6 +57,10 @@ namespace ImageResizer.ViewModels public Settings Settings { get; } + public IEnumerable ResizeFitValues { get => Enum.GetValues(typeof(ResizeFit)).Cast(); } + + public IEnumerable ResizeUnitValues { get => Enum.GetValues(typeof(ResizeUnit)).Cast(); } + public ICommand ResizeCommand { get; } public ICommand CancelCommand { get; } diff --git a/src/modules/imageresizer/ui/Views/EnumValueConverter.cs b/src/modules/imageresizer/ui/Views/EnumValueConverter.cs index 46f1a11111..4eb0abdd25 100644 --- a/src/modules/imageresizer/ui/Views/EnumValueConverter.cs +++ b/src/modules/imageresizer/ui/Views/EnumValueConverter.cs @@ -35,7 +35,10 @@ namespace ImageResizer.Views .Append(parameter); } - var targetValue = Resources.ResourceManager.GetString(builder.ToString(), culture); + // Fixes #16792 - Looks like culture defaults to en-US, so wrong resource is being fetched. +#pragma warning disable CA1304 // Specify CultureInfo + var targetValue = Resources.ResourceManager.GetString(builder.ToString()); +#pragma warning restore CA1304 // Specify CultureInfo if (toLower) { diff --git a/src/modules/imageresizer/ui/Views/InputPage.xaml b/src/modules/imageresizer/ui/Views/InputPage.xaml index 81f23238ed..0b90254fd0 100644 --- a/src/modules/imageresizer/ui/Views/InputPage.xaml +++ b/src/modules/imageresizer/ui/Views/InputPage.xaml @@ -178,8 +178,17 @@ Grid.Column="1" HorizontalAlignment="Stretch" AutomationProperties.Name="{x:Static p:Resources.Resize_Type}" - ItemsSource="{Binding Source={StaticResource ResizeFitValues}}" - Text="{Binding ElementName=SizeComboBox, Path=SelectedValue.Fit, Mode=TwoWay}" /> + ItemsSource="{Binding ResizeFitValues, Mode=OneWay}" + SelectedIndex="0"> + + + + + + + ItemsSource="{Binding ResizeUnitValues, Mode=OneWay}" + SelectedIndex="0"> + + + + + + diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Properties/Resources.Designer.cs index 657e7ce987..172e9230a4 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Resources { diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Properties/Resources.Designer.cs index 88e011f1bf..38ed677a3e 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Properties/Resources.Designer.cs @@ -88,7 +88,7 @@ namespace Community.PowerToys.Run.Plugin.ValueGenerator.Properties { } /// - /// Looks up a localized string similar to A plugin to calculate hashes and generate values.. + /// Looks up a localized string similar to Calculates hashes and generate values.. /// public static string plugin_description { get { diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Properties/Resources.resx b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Properties/Resources.resx index 5c07f6d5b8..98d4a99b05 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Properties/Resources.resx +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Properties/Resources.resx @@ -127,7 +127,7 @@ Value Generator Error - A plugin to calculate hashes and generate values. + Calculates hashes and generate values. Value Generator diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Properties/Resources.Designer.cs index 7fab0f5b08..df09aada0b 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Properties/Resources.Designer.cs @@ -70,7 +70,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch.Properties { } /// - /// Looks up a localized string similar to Search the web with your default search engine.. + /// Looks up a localized string similar to Searches the web with your default search engine.. /// public static string plugin_description { get { diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Properties/Resources.resx b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Properties/Resources.resx index 3a440a10c4..de27cbb170 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Properties/Resources.resx +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.WebSearch/Properties/Resources.resx @@ -121,7 +121,7 @@ the default browser - Search the web with your default search engine. + Searches the web with your default search engine. Don't include in global results on queries that are URIs diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/Win32Program.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/Win32Program.cs index a54b4497f3..728edb4ecf 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/Win32Program.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/Win32Program.cs @@ -930,15 +930,15 @@ namespace Microsoft.Plugin.Program.Programs private static bool TryGetIcoPathForRunCommandProgram(Win32Program program, out string icoPath) { + icoPath = null; + if (program.AppType != ApplicationType.RunCommand) { - icoPath = null; return false; } if (string.IsNullOrEmpty(program.FullPath)) { - icoPath = null; return false; } @@ -946,6 +946,11 @@ namespace Microsoft.Plugin.Program.Programs try { var redirectionPath = ReparsePoint.GetTarget(program.FullPath); + if (string.IsNullOrEmpty(redirectionPath)) + { + return false; + } + icoPath = ExpandEnvironmentVariables(redirectionPath); return true; } diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Properties/Resources.Designer.cs index d7a19e8fbb..3505b1576e 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Properties/Resources.Designer.cs @@ -61,7 +61,7 @@ namespace Microsoft.Plugin.Shell.Properties { } /// - /// Looks up a localized string similar to Find and run executable file. + /// Looks up a localized string similar to Find and run the executable file. /// public static string find_executable_file_and_run_it { get { @@ -178,7 +178,7 @@ namespace Microsoft.Plugin.Shell.Properties { } /// - /// Looks up a localized string similar to Executes commands (e.g 'ping', 'cmd').. + /// Looks up a localized string similar to Executes commands (e.g. 'ping', 'cmd').. /// public static string wox_plugin_cmd_plugin_description { get { @@ -223,7 +223,7 @@ namespace Microsoft.Plugin.Shell.Properties { } /// - /// Looks up a localized string similar to All entries that using the Windows Terminal forcing the Windows Terminal as console host regardless of the system setting. + /// Looks up a localized string similar to All entries using the Windows Terminal force the Windows Terminal as the console host regardless of the system settings. /// public static string wox_shell_command_execution_description { get { diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Properties/Resources.resx b/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Properties/Resources.resx index abc9cd26ae..dc72f33069 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Properties/Resources.resx +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Properties/Resources.resx @@ -121,7 +121,7 @@ Shell - Executes commands (e.g 'ping', 'cmd'). + Executes commands (e.g. 'ping', 'cmd'). this command has been executed {0} times diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/NumberTranslatorTests.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/NumberTranslatorTests.cs index d51c0dc734..b8f3dad617 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/NumberTranslatorTests.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/NumberTranslatorTests.cs @@ -162,5 +162,22 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests Assert.IsNotNull(result); Assert.AreEqual(expectedResult, result); } + + [DataTestMethod] + [DataRow("en-US", "0xF000", "0xF000")] + [DataRow("en-US", "0xf4572220", "4099351072")] + [DataRow("en-US", "0x12345678", "305419896")] + public void Translate_LargeHexadecimalNumbersToDecimal(string sourceCultureName, string input, string expectedResult) + { + // Arrange + var translator = NumberTranslator.Create(new CultureInfo(sourceCultureName, false), new CultureInfo("en-US", false)); + + // Act + var result = translator.Translate(input); + + // Assert + Assert.IsNotNull(result); + Assert.AreEqual(expectedResult, result); + } } } diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/QueryTests.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/QueryTests.cs index 92bc417947..746206d8ed 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/QueryTests.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/QueryTests.cs @@ -233,5 +233,26 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests Assert.AreEqual(answer.ToString(CultureInfo.CurrentCulture), result); Assert.AreEqual(answer.ToString(CultureInfo.CurrentCulture), resultWithKeyword); } + + [DataTestMethod] + [DataRow("0x1234+0x1234", 9320)] + [DataRow("0x1234-0x1234", 0)] + [DataRow("0x12345678+0x12345678", 610839792)] + [DataRow("0xf4572220-0xf4572410", -496)] + public void RightAnswerForLargeHexadecimalNumbers(string typedString, double answer) + { + // Setup + Mock
main = new(); + Query expectedQuery = new(typedString); + Query expectedQueryWithKeyword = new("=" + typedString, "="); + + // Act + var result = main.Object.Query(expectedQuery).FirstOrDefault()?.Title; + var resultWithKeyword = main.Object.Query(expectedQueryWithKeyword).FirstOrDefault()?.Title; + + // Assert + Assert.AreEqual(answer.ToString(CultureInfo.CurrentCulture), result); + Assert.AreEqual(answer.ToString(CultureInfo.CurrentCulture), resultWithKeyword); + } } } diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/NumberTranslator.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/NumberTranslator.cs index ce27a728bc..5de28ba775 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/NumberTranslator.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/NumberTranslator.cs @@ -74,7 +74,25 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator { if (hexToken.StartsWith("0x", StringComparison.InvariantCultureIgnoreCase)) { - outputBuilder.Append(hexToken); + // Mages engine has issues processing large hex number (larger than 7 hex digits + 0x prefix = 9 characters). So we convert it to decimal and pass it to the engine. + if (hexToken.Length > 9) + { + try + { + long num = Convert.ToInt64(hexToken, 16); + string numStr = num.ToString(cultureFrom); + outputBuilder.Append(numStr); + } + catch (Exception) + { + outputBuilder.Append(hexToken); + } + } + else + { + outputBuilder.Append(hexToken); + } + continue; } diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.Designer.cs index 7bff7af0e8..3ac08d3ab9 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.Designer.cs @@ -169,7 +169,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties { } /// - /// Looks up a localized string similar to Does mathematical calculations (e.g. 5*3-2).. + /// Looks up a localized string similar to Calculates mathematical equations (e.g. 5*3-2).. /// public static string wox_plugin_calculator_plugin_description { get { diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx index 1ec670e192..a51a01975e 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx @@ -121,7 +121,7 @@ Calculator - Does mathematical calculations (e.g. 5*3-2). + Calculates mathematical equations (e.g. 5*3-2). Calculation result is not a valid number (NaN) diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.Designer.cs index 024b19525a..9f56f4ee43 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.Designer.cs @@ -61,7 +61,7 @@ namespace Microsoft.PowerToys.Run.Plugin.History.Properties { } /// - /// Looks up a localized string similar to Quick access to previously selected results.. + /// Looks up a localized string similar to Accesses previously selected results.. /// public static string wox_plugin_history_plugin_description { get { diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.resx b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.resx index 5b49095d4a..5bf6726694 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.resx +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.resx @@ -121,7 +121,7 @@ History - Quick access to previously selected results. + Accesses previously selected results. Failed to process the input diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Microsoft.PowerToys.Run.Plugin.PowerToys.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Microsoft.PowerToys.Run.Plugin.PowerToys.csproj index 057a41460d..4b500715e5 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Microsoft.PowerToys.Run.Plugin.PowerToys.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Microsoft.PowerToys.Run.Plugin.PowerToys.csproj @@ -81,39 +81,39 @@ PreserveNewest - + Images\ColorPicker.png PreserveNewest - + Images\FancyZones.png PreserveNewest - + Images\CropAndLock.png PreserveNewest - + Images\Hosts.png PreserveNewest - + Images\PowerOcr.png PreserveNewest - + Images\RegistryPreview.png PreserveNewest - + Images\ScreenRuler.png PreserveNewest - + Images\ShortcutGuide.png PreserveNewest - + Images\EnvironmentVariables.png PreserveNewest diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Properties/Resources.Designer.cs index 4f01b8edb3..ca87a8b9c4 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Properties/Resources.Designer.cs @@ -133,7 +133,7 @@ namespace Microsoft.PowerToys.Run.Plugin.PowerToys.Properties { } /// - /// Looks up a localized string similar to Open PowerToys utilities and settings.. + /// Looks up a localized string similar to Opens PowerToys utilities and settings.. /// internal static string Plugin_Description { get { diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Properties/Resources.resx b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Properties/Resources.resx index 325697d375..7e7274f682 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Properties/Resources.resx +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Properties/Resources.resx @@ -148,7 +148,7 @@ "Hosts File Editor" is the name of the utility - Open PowerToys utilities and settings. + Opens PowerToys utilities and settings. PowerToys diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Properties/Resources.Designer.cs index c51facb076..89704313de 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Properties/Resources.Designer.cs @@ -3328,7 +3328,7 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings.Properties { } /// - /// Looks up a localized string similar to Plugin to search for Windows settings. + /// Looks up a localized string similar to Searches Windows settings. /// internal static string PluginDescription { get { diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Properties/Resources.resx b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Properties/Resources.resx index abe0c86962..d51434ba5a 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Properties/Resources.resx +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Properties/Resources.resx @@ -1439,7 +1439,8 @@ Area Gaming - Plugin to search for Windows settings + Searches Windows settings + {Locked="Windows"} Windows settings diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Properties/Resources.Designer.cs index ba2a902906..61df500f17 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Properties/Resources.Designer.cs @@ -79,7 +79,7 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsTerminal.Properties { } /// - /// Looks up a localized string similar to Windows Terminal supports a "quake" feature where a terminal window is accessible using a global hotkey. Enable this option to open profiles in this window.. + /// Looks up a localized string similar to Windows Terminal supports a "quake" feature where a terminal window is accessible using a global hotkey. Enable this option to open profiles in a new tab in this window.. /// internal static string open_quake_description { get { @@ -88,7 +88,7 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsTerminal.Properties { } /// - /// Looks up a localized string similar to Open Windows Terminal profiles.. + /// Looks up a localized string similar to Opens Windows Terminal profiles.. /// internal static string plugin_description { get { diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Properties/Resources.resx b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Properties/Resources.resx index 09acd59b45..14fd94486e 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Properties/Resources.resx +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsTerminal/Properties/Resources.resx @@ -129,7 +129,7 @@ Quake is a well-known computer game. Don't localize. See https://en.wikipedia.org/wiki/Quake_(video_game) - Open Windows Terminal profiles. + Opens Windows Terminal profiles. Windows Terminal @@ -143,4 +143,4 @@ Show hidden profiles - + \ No newline at end of file diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml b/src/modules/launcher/PowerLauncher/MainWindow.xaml index 43f7d9ac27..764dee2bba 100644 --- a/src/modules/launcher/PowerLauncher/MainWindow.xaml +++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml @@ -51,7 +51,7 @@ diff --git a/src/modules/launcher/PowerLauncher/Storage/QueryHistory.cs b/src/modules/launcher/PowerLauncher/Storage/QueryHistory.cs index 79621dde24..61cf6c40f4 100644 --- a/src/modules/launcher/PowerLauncher/Storage/QueryHistory.cs +++ b/src/modules/launcher/PowerLauncher/Storage/QueryHistory.cs @@ -41,5 +41,23 @@ namespace PowerLauncher.Storage }); } } + + public void Update() + { + for (int i = Items.Count - 1; i >= 0; i--) + { + if (string.IsNullOrEmpty(Items[i].Query)) + { + Items.RemoveAt(i); + } + else + { + if (Items[i].ExecutedDateTime == DateTime.MinValue) + { + Items[i].ExecutedDateTime = DateTime.Now; + } + } + } + } } } diff --git a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs index 7f7098acd8..0e81bcaa75 100644 --- a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs +++ b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs @@ -9,6 +9,7 @@ using System.Globalization; using System.Linq; using System.Reflection; using System.Text; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; using System.Windows; @@ -1033,7 +1034,24 @@ namespace PowerLauncher.ViewModel { if (!_saved) { + if (_historyItemsStorage.CheckVersionMismatch()) + { + if (!_historyItemsStorage.TryLoadData()) + { + _history.Update(); + } + } + _historyItemsStorage.Save(); + + if (_userSelectedRecordStorage.CheckVersionMismatch()) + { + if (!_userSelectedRecordStorage.TryLoadData()) + { + _userSelectedRecord.Update(); + } + } + _userSelectedRecordStorage.Save(); _saved = true; diff --git a/src/modules/launcher/PowerLauncher/ViewModel/SettingWindowViewModel.cs b/src/modules/launcher/PowerLauncher/ViewModel/SettingWindowViewModel.cs index a86be57be6..97773f6b24 100644 --- a/src/modules/launcher/PowerLauncher/ViewModel/SettingWindowViewModel.cs +++ b/src/modules/launcher/PowerLauncher/ViewModel/SettingWindowViewModel.cs @@ -2,9 +2,11 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Text.Json; using Wox.Infrastructure.Storage; using Wox.Infrastructure.UserSettings; using Wox.Plugin; +using Wox.Plugin.Logger; namespace PowerLauncher.ViewModel { @@ -16,6 +18,22 @@ namespace PowerLauncher.ViewModel { _storage = new WoxJsonStorage(); Settings = _storage.Load(); + + // Check information file for version mismatch + try + { + if (_storage.CheckVersionMismatch()) + { + if (!_storage.TryLoadData()) + { + _storage.Clear(); + } + } + } + catch (JsonException e) + { + Log.Exception($"Error in Load of PowerToysRunSettings: {e.Message}", e, GetType()); + } } public PowerToysRunSettings Settings { get; } diff --git a/src/modules/launcher/Wox.Infrastructure/Alphabet.cs b/src/modules/launcher/Wox.Infrastructure/Alphabet.cs index fb81591047..7e630cdc34 100644 --- a/src/modules/launcher/Wox.Infrastructure/Alphabet.cs +++ b/src/modules/launcher/Wox.Infrastructure/Alphabet.cs @@ -24,9 +24,8 @@ public class Alphabet : IAlphabet PinyinFormat.WITHOUT_TONE; private ConcurrentDictionary _pinyinCache; - private WoxJsonStorage> _pinyinStorage; + private WoxJsonStorage> _pinyinStorage; private PowerToysRunSettings _settings; - private Dictionary __cache; public void Initialize(PowerToysRunSettings settings) { @@ -38,8 +37,8 @@ public class Alphabet : IAlphabet { Stopwatch.Normal("|Wox.Infrastructure.Alphabet.Initialize|Preload pinyin cache", () => { - _pinyinStorage = new WoxJsonStorage>("Pinyin"); - SetPinyinCacheAsDictionary(__cache = _pinyinStorage.Load()); + _pinyinStorage = new WoxJsonStorage>("Pinyin"); + _pinyinCache = _pinyinStorage.Load(); // force pinyin library static constructor initialize Pinyin4Net.GetPinyin('一', _pinyinFormat); @@ -204,9 +203,4 @@ public class Alphabet : IAlphabet { return new Dictionary(_pinyinCache); } - - private void SetPinyinCacheAsDictionary(Dictionary usage) - { - _pinyinCache = new ConcurrentDictionary(usage); - } } diff --git a/src/modules/launcher/Wox.Infrastructure/Storage/JsonStorage`1.cs b/src/modules/launcher/Wox.Infrastructure/Storage/JsonStorage`1.cs index 9181364855..b51d9a0df8 100644 --- a/src/modules/launcher/Wox.Infrastructure/Storage/JsonStorage`1.cs +++ b/src/modules/launcher/Wox.Infrastructure/Storage/JsonStorage`1.cs @@ -3,9 +3,11 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; using System.Globalization; using System.IO; using System.IO.Abstractions; +using System.Linq; using System.Text.Json; using Wox.Plugin.Logger; @@ -20,6 +22,8 @@ namespace Wox.Infrastructure.Storage private static readonly IPath Path = FileSystem.Path; private static readonly IFile File = FileSystem.File; + private readonly object _saveLock = new object(); + // use property initialization instead of DefaultValueAttribute // easier and flexible for default value of object private static readonly JsonSerializerOptions _serializerOptions = new JsonSerializerOptions @@ -28,6 +32,15 @@ namespace Wox.Infrastructure.Storage IncludeFields = true, PropertyNameCaseInsensitive = true, WriteIndented = true, + UnmappedMemberHandling = System.Text.Json.Serialization.JsonUnmappedMemberHandling.Disallow, + }; + + private static readonly JsonSerializerOptions _deserializerOptions = new JsonSerializerOptions + { + DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.Never, + IncludeFields = true, + PropertyNameCaseInsensitive = true, + WriteIndented = true, }; private T _data; @@ -44,20 +57,10 @@ namespace Wox.Infrastructure.Storage private const int _jsonStorage = 1; private StoragePowerToysVersionInfo _storageHelper; - public T Load() + public virtual T Load() { _storageHelper = new StoragePowerToysVersionInfo(FilePath, _jsonStorage); - // Depending on the version number of the previously installed PT Run, delete the cache if it is found to be incompatible - if (_storageHelper.ClearCache) - { - if (File.Exists(FilePath)) - { - File.Delete(FilePath); - Log.Info($"Deleting cached data at <{FilePath}>", GetType()); - } - } - if (File.Exists(FilePath)) { var serialized = File.ReadAllText(FilePath); @@ -82,7 +85,7 @@ namespace Wox.Infrastructure.Storage { try { - _data = JsonSerializer.Deserialize(serialized, _serializerOptions); + _data = JsonSerializer.Deserialize(serialized, _deserializerOptions); } catch (JsonException e) { @@ -121,18 +124,59 @@ namespace Wox.Infrastructure.Storage } public void Save() + { + lock (_saveLock) + { + try + { + string serialized = JsonSerializer.Serialize(_data, _serializerOptions); + File.WriteAllText(FilePath, serialized); + _storageHelper.Close(); + + Log.Info($"Saving cached data at <{FilePath}>", GetType()); + } + catch (IOException e) + { + Log.Exception($"Error in saving data at <{FilePath}>", e, GetType()); + } + } + } + + public void Clear() + { + if (File.Exists(FilePath)) + { + File.Delete(FilePath); + LoadDefault(); + Log.Info($"Deleting cached data at <{FilePath}>", GetType()); + } + } + + public bool CheckVersionMismatch() + { + // Skip the fields check if the version hasn't changed. + // This optimization prevents unnecessary fields processing when the cache + // is already up to date, enhancing performance and reducing IO operations + if (!_storageHelper.ClearCache) + { + return false; + } + + _storageHelper.ClearCache = false; + return true; + } + + public bool TryLoadData() { try { - string serialized = JsonSerializer.Serialize(_data, _serializerOptions); - File.WriteAllText(FilePath, serialized); - _storageHelper.Close(); - - Log.Info($"Saving cached data at <{FilePath}>", GetType()); + JsonSerializer.Deserialize(File.ReadAllText(FilePath), _serializerOptions); + return true; } - catch (IOException e) + catch (JsonException e) { - Log.Exception($"Error in saving data at <{FilePath}>", e, GetType()); + Log.Exception($"Error in TryLoadData at <{FilePath}>", e, GetType()); + return false; } } } diff --git a/src/modules/launcher/Wox.Infrastructure/Storage/PluginJsonStorage`1.cs b/src/modules/launcher/Wox.Infrastructure/Storage/PluginJsonStorage`1.cs index d372615408..a6cdc5bda3 100644 --- a/src/modules/launcher/Wox.Infrastructure/Storage/PluginJsonStorage`1.cs +++ b/src/modules/launcher/Wox.Infrastructure/Storage/PluginJsonStorage`1.cs @@ -3,7 +3,9 @@ // See the LICENSE file in the project root for more information. using System.IO.Abstractions; +using System.Text.Json; using Wox.Plugin; +using Wox.Plugin.Logger; namespace Wox.Infrastructure.Storage { @@ -23,5 +25,28 @@ namespace Wox.Infrastructure.Storage FilePath = Path.Combine(DirectoryPath, $"{dataType.Name}{FileSuffix}"); } + + public override T Load() + { + var data = base.Load(); + + // Check information file for version mismatch + try + { + if (CheckVersionMismatch()) + { + if (!TryLoadData()) + { + Clear(); + } + } + } + catch (JsonException e) + { + Log.Exception($"Error in Load of PluginJsonStorage: {e.Message}", e, GetType()); + } + + return data.NonNull(); + } } } diff --git a/src/modules/launcher/Wox.Infrastructure/Storage/StoragePowerToysVersionInfo.cs b/src/modules/launcher/Wox.Infrastructure/Storage/StoragePowerToysVersionInfo.cs index 132c1ef3c0..e8a18c7a79 100644 --- a/src/modules/launcher/Wox.Infrastructure/Storage/StoragePowerToysVersionInfo.cs +++ b/src/modules/launcher/Wox.Infrastructure/Storage/StoragePowerToysVersionInfo.cs @@ -3,7 +3,9 @@ // See the LICENSE file in the project root for more information. using System; +using System.IO; using System.IO.Abstractions; +using Wox.Plugin.Logger; namespace Wox.Infrastructure.Storage { @@ -123,8 +125,15 @@ namespace Wox.Infrastructure.Storage public void Close() { - // Update the Version file to the current version of powertoys - File.WriteAllText(FilePath, currentPowerToysVersion); + try + { + // Update the Version file to the current version of powertoys + File.WriteAllText(FilePath, currentPowerToysVersion); + } + catch (System.Exception e) + { + Log.Exception($"Error in saving version at <{FilePath}>", e, GetType()); + } } } } diff --git a/src/modules/launcher/Wox.Plugin/UserSelectedRecord.cs b/src/modules/launcher/Wox.Plugin/UserSelectedRecord.cs index f821e8477a..4989c7a51a 100644 --- a/src/modules/launcher/Wox.Plugin/UserSelectedRecord.cs +++ b/src/modules/launcher/Wox.Plugin/UserSelectedRecord.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Text.Json.Serialization; namespace Wox.Plugin @@ -73,6 +74,34 @@ namespace Wox.Plugin } } + public void Update() + { + foreach (var key in Records.Keys.ToList()) + { + // Check if any of the specified fields are empty + if (string.IsNullOrEmpty(Records[key].IconPath) || + string.IsNullOrEmpty(Records[key].Title) || + string.IsNullOrEmpty(Records[key].SubTitle) || + string.IsNullOrEmpty(Records[key].Search) || + string.IsNullOrEmpty(Records[key].PluginID)) + { + Records.Remove(key); + } + else + { + if (Records[key].SelectedCount == 0) + { + Records[key].SelectedCount = 1; + } + + if (Records[key].LastSelected == DateTime.MinValue) + { + Records[key].LastSelected = DateTime.UtcNow; + } + } + } + } + public UserSelectedRecordItem GetSelectedData(Result result) { ArgumentNullException.ThrowIfNull(result); diff --git a/src/modules/peek/Peek.FilePreviewer/Controls/UnsupportedFilePreview/InformationalPreviewControl.xaml b/src/modules/peek/Peek.FilePreviewer/Controls/UnsupportedFilePreview/InformationalPreviewControl.xaml index 5fa0dc3ef4..c15a7bb959 100644 --- a/src/modules/peek/Peek.FilePreviewer/Controls/UnsupportedFilePreview/InformationalPreviewControl.xaml +++ b/src/modules/peek/Peek.FilePreviewer/Controls/UnsupportedFilePreview/InformationalPreviewControl.xaml @@ -42,7 +42,11 @@ - + + + + + diff --git a/src/modules/peek/Peek.UI/Extensions/WindowExtensions.cs b/src/modules/peek/Peek.UI/Extensions/WindowExtensions.cs index c7fd32a875..b4f9b58b57 100644 --- a/src/modules/peek/Peek.UI/Extensions/WindowExtensions.cs +++ b/src/modules/peek/Peek.UI/Extensions/WindowExtensions.cs @@ -2,7 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; using ManagedCommon; using Microsoft.UI.Xaml; @@ -25,12 +24,31 @@ namespace Peek.UI.Extensions internal static void CenterOnMonitor(this Window window, HWND hwndDesktop, double? width = null, double? height = null) { var hwndToCenter = new HWND(window.GetWindowHandle()); + + // If the window is maximized, restore to normal state before change its size + var placement = default(WINDOWPLACEMENT); + if (PInvoke.GetWindowPlacement(hwndToCenter, ref placement)) + { + if (placement.showCmd == SHOW_WINDOW_CMD.SW_MAXIMIZE) + { + placement.showCmd = SHOW_WINDOW_CMD.SW_SHOWNORMAL; + if (!PInvoke.SetWindowPlacement(hwndToCenter, in placement)) + { + Logger.LogError($"SetWindowPlacement failed with error {Marshal.GetLastWin32Error()}"); + } + } + } + else + { + Logger.LogError($"GetWindowPlacement failed with error {Marshal.GetLastWin32Error()}"); + } + var monitor = PInvoke.MonitorFromWindow(hwndDesktop, MONITOR_FROM_FLAGS.MONITOR_DEFAULTTONEAREST); MONITORINFO info = default(MONITORINFO); info.cbSize = 40; PInvoke.GetMonitorInfo(monitor, ref info); var dpi = PInvoke.GetDpiForWindow(new HWND(hwndDesktop)); - PInvoke.GetWindowRect(new HWND(hwndToCenter), out RECT windowRect); + PInvoke.GetWindowRect(hwndToCenter, out RECT windowRect); var scalingFactor = dpi / 96d; var w = width.HasValue ? (int)(width * scalingFactor) : windowRect.right - windowRect.left; var h = height.HasValue ? (int)(height * scalingFactor) : windowRect.bottom - windowRect.top; @@ -38,7 +56,8 @@ namespace Peek.UI.Extensions var cy = (info.rcMonitor.bottom + info.rcMonitor.top) / 2; var left = cx - (w / 2); var top = cy - (h / 2); - SetWindowPosOrThrow(new HWND(hwndToCenter), default(HWND), left, top, w, h, SET_WINDOW_POS_FLAGS.SWP_SHOWWINDOW); + + SetWindowPosOrThrow(hwndToCenter, default(HWND), left, top, w, h, SET_WINDOW_POS_FLAGS.SWP_NOACTIVATE); } private static void SetWindowPosOrThrow(HWND hWnd, HWND hWndInsertAfter, int x, int y, int cx, int cy, SET_WINDOW_POS_FLAGS uFlags) diff --git a/src/modules/peek/Peek.UI/NativeMethods.txt b/src/modules/peek/Peek.UI/NativeMethods.txt index 3e15b22f94..e65e72c12f 100644 --- a/src/modules/peek/Peek.UI/NativeMethods.txt +++ b/src/modules/peek/Peek.UI/NativeMethods.txt @@ -17,4 +17,6 @@ _SVGIO MONITORINFO GetWindowRect SET_WINDOW_POS_FLAGS -SetWindowPos \ No newline at end of file +SetWindowPos +GetWindowPlacement +SetWindowPlacement \ No newline at end of file diff --git a/src/modules/poweraccent/PowerAccent.Core/Languages.cs b/src/modules/poweraccent/PowerAccent.Core/Languages.cs index 0dfde06b24..6ad6eb59c5 100644 --- a/src/modules/poweraccent/PowerAccent.Core/Languages.cs +++ b/src/modules/poweraccent/PowerAccent.Core/Languages.cs @@ -154,7 +154,7 @@ namespace PowerAccent.Core LetterKey.VK_B => new[] { "ḃ" }, LetterKey.VK_C => new[] { "ċ", "°C", "©", "ℂ", "∁" }, LetterKey.VK_D => new[] { "ḍ", "ḋ", "∂" }, - LetterKey.VK_E => new[] { "∈", "∃", "∄", "∉" }, + LetterKey.VK_E => new[] { "∈", "∃", "∄", "∉", "ĕ" }, LetterKey.VK_F => new[] { "ḟ", "°F" }, LetterKey.VK_G => new[] { "ģ", "ǧ", "ġ", "ĝ", "ǥ" }, LetterKey.VK_H => new[] { "ḣ", "ĥ", "ħ" }, @@ -164,7 +164,7 @@ namespace PowerAccent.Core LetterKey.VK_M => new[] { "ṁ" }, LetterKey.VK_N => new[] { "ņ", "ṅ", "ⁿ", "ℕ" }, LetterKey.VK_O => new[] { "ȯ", "∅" }, - LetterKey.VK_P => new[] { "ṗ", "℗", "∏" }, + LetterKey.VK_P => new[] { "ṗ", "℗", "∏", "¶" }, LetterKey.VK_Q => new[] { "ℚ" }, LetterKey.VK_R => new[] { "ṙ", "®", "ℝ" }, LetterKey.VK_S => new[] { "ṡ", "§", "∑" }, @@ -176,7 +176,7 @@ namespace PowerAccent.Core LetterKey.VK_Y => new[] { "ẏ", "ꝡ" }, LetterKey.VK_Z => new[] { "ʒ", "ǯ", "ℤ" }, LetterKey.VK_COMMA => new[] { "∙", "₋", "⁻", "–", "√" }, // – is in VK_MINUS for other languages, but not VK_COMMA, so we add it here. - LetterKey.VK_PERIOD => new[] { "\u0300", "\u0301", "\u0302", "\u0303", "\u0304", "\u0308", "\u030C" }, + LetterKey.VK_PERIOD => new[] { "…", "\u0300", "\u0301", "\u0302", "\u0303", "\u0304", "\u0308", "\u030C" }, LetterKey.VK_MINUS => new[] { "~", "‐", "‑", "‒", "—", "―", "⁓", "−", "⸺", "⸻", "∓" }, LetterKey.VK_SLASH_ => new[] { "÷", "√" }, LetterKey.VK_DIVIDE_ => new[] { "÷", "√" }, diff --git a/src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs b/src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs index c40021b2a8..84f07b7224 100644 --- a/src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs +++ b/src/modules/poweraccent/PowerAccent.Core/Services/SettingsService.cs @@ -56,6 +56,9 @@ public class SettingsService ActivationKey = settings.Properties.ActivationKey; _keyboardListener.UpdateActivationKey((int)ActivationKey); + DoNotActivateOnGameMode = settings.Properties.DoNotActivateOnGameMode; + _keyboardListener.UpdateDoNotActivateOnGameMode(DoNotActivateOnGameMode); + InputTime = settings.Properties.InputTime.Value; _keyboardListener.UpdateInputTime(InputTime); @@ -123,6 +126,21 @@ public class SettingsService } } + private bool _doNotActivateOnGameMode = true; + + public bool DoNotActivateOnGameMode + { + get + { + return _doNotActivateOnGameMode; + } + + set + { + _doNotActivateOnGameMode = value; + } + } + private Position _position = Position.Top; public Position Position diff --git a/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.cpp b/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.cpp index 68aa84383f..6969d7dd58 100644 --- a/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.cpp +++ b/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.cpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace winrt::PowerToys::PowerAccentKeyboardService::implementation { @@ -85,6 +86,11 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation m_settings.activationKey = static_cast(activationKey); } + void KeyboardListener::UpdateDoNotActivateOnGameMode(bool doNotActivateOnGameMode) + { + m_settings.doNotActivateOnGameMode = doNotActivateOnGameMode; + } + void KeyboardListener::UpdateInputTime(int32_t inputTime) { m_settings.inputTime = std::chrono::milliseconds(inputTime); @@ -112,6 +118,11 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation } } + bool KeyboardListener::IsSuppressedByGameMode() + { + return m_settings.doNotActivateOnGameMode && detect_game_mode(); + } + bool KeyboardListener::IsForegroundAppExcluded() { std::lock_guard lock(m_mutex_excluded_apps); @@ -180,7 +191,7 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation } } - if (!m_toolbarVisible && letterPressed != LetterKey::None && triggerPressed && !IsForegroundAppExcluded()) + if (!m_toolbarVisible && letterPressed != LetterKey::None && triggerPressed && !IsSuppressedByGameMode() && !IsForegroundAppExcluded()) { Logger::debug(L"Show toolbar. Letter: {}, Trigger: {}", letterPressed, triggerPressed); diff --git a/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.h b/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.h index 8d735a1510..79f8ac1acd 100644 --- a/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.h +++ b/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.h @@ -16,6 +16,7 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation struct PowerAccentSettings { PowerAccentActivationKey activationKey{ PowerAccentActivationKey::Both }; + bool doNotActivateOnGameMode{ true }; std::chrono::milliseconds inputTime{ 300 }; // Should match with UI.Library.PowerAccentSettings.DefaultInputTimeMs std::vector excludedApps; }; @@ -36,6 +37,7 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation void SetIsLanguageLetterDelegate(IsLanguageLetter IsLanguageLetterDelegate); void UpdateActivationKey(int32_t activationKey); + void UpdateDoNotActivateOnGameMode(bool doNotActivateOnGameMode); void UpdateInputTime(int32_t inputTime); void UpdateExcludedApps(std::wstring_view excludedApps); @@ -44,6 +46,7 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation private: bool OnKeyDown(KBDLLHOOKSTRUCT info) noexcept; bool OnKeyUp(KBDLLHOOKSTRUCT info) noexcept; + bool IsSuppressedByGameMode(); bool IsForegroundAppExcluded(); static inline KeyboardListener* s_instance; diff --git a/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.idl b/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.idl index f435e97991..03126bf5be 100644 --- a/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.idl +++ b/src/modules/poweraccent/PowerAccentKeyboardService/KeyboardListener.idl @@ -80,6 +80,7 @@ namespace PowerToys void SetNextCharEvent(event NextChar nextCharEvent); void SetIsLanguageLetterDelegate(IsLanguageLetter isLanguageLetterDelegate); void UpdateActivationKey(Int32 activationKey); + void UpdateDoNotActivateOnGameMode(Boolean doNotActivateOnGameMode); void UpdateInputTime(Int32 inputTime); void UpdateExcludedApps(String excludedApps); } diff --git a/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.rc b/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.base.rc similarity index 92% rename from src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.rc rename to src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.base.rc index 5fa3c8b90d..13d81a9aaa 100644 --- a/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.rc +++ b/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.base.rc @@ -1,6 +1,6 @@ #include -#include "resource.h" -#include "../../../common/version/version.h" +#include "Generated Files/resource.h" +#include "../../../../common/version/version.h" #define APSTUDIO_READONLY_SYMBOLS #include "winres.h" diff --git a/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj b/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj index 7627a74612..053695376f 100644 --- a/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj +++ b/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj @@ -1,6 +1,9 @@ + + + 16.0 Win32Proj @@ -85,7 +88,8 @@ MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv - + + @@ -97,7 +101,8 @@ MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv - + + @@ -110,6 +115,9 @@ MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv{51920f1f-c28c-4adf-8660-4238766796c2} + + + diff --git a/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj.filters b/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj.filters index 704ecb00cf..946d27585c 100644 --- a/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj.filters +++ b/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj.filters @@ -21,7 +21,7 @@ Header Files - + Header Files @@ -38,9 +38,18 @@ Resource Files + + Header Files + + + Resource Files + + + Resource Files + - + Resource Files diff --git a/src/modules/powerrename/PowerRenameContextMenu/Resources.resx b/src/modules/powerrename/PowerRenameContextMenu/Resources.resx new file mode 100644 index 0000000000..8ce3303bc9 --- /dev/null +++ b/src/modules/powerrename/PowerRenameContextMenu/Resources.resx @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + PowerRename + do not loc, product name + + + Rename with PowerRename + PowerRename is a product name. do not loc it + + diff --git a/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp b/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp index f372907ab6..d3fe2af629 100644 --- a/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp +++ b/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp @@ -16,8 +16,11 @@ #include #include +#include "Generated Files/resource.h" + #include #include +#include #include #include #include @@ -60,7 +63,7 @@ public: // IExplorerCommand IFACEMETHODIMP GetTitle(_In_opt_ IShellItemArray* items, _Outptr_result_nullonfailure_ PWSTR* name) { - return SHStrDup(app_name.c_str(), name); + return SHStrDup(context_menu_caption.c_str(), name); } IFACEMETHODIMP GetIcon(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* icon) @@ -261,7 +264,7 @@ private: std::thread create_pipe_thread; HANDLE hPipe = INVALID_HANDLE_VALUE; - std::wstring app_name = L"PowerRename"; + std::wstring context_menu_caption = GET_RESOURCE_STRING_FALLBACK(IDS_POWERRENAME_CONTEXT_MENU_ENTRY, L"Rename with PowerRename"); }; CoCreatableClass(PowerRenameContextMenuCommand) diff --git a/src/modules/powerrename/PowerRenameContextMenu/resource.h b/src/modules/powerrename/PowerRenameContextMenu/resource.base.h similarity index 100% rename from src/modules/powerrename/PowerRenameContextMenu/resource.h rename to src/modules/powerrename/PowerRenameContextMenu/resource.base.h diff --git a/src/modules/powerrename/dll/PowerRenameExt.cpp b/src/modules/powerrename/dll/PowerRenameExt.cpp index 95b42089a4..9e9f2910e7 100644 --- a/src/modules/powerrename/dll/PowerRenameExt.cpp +++ b/src/modules/powerrename/dll/PowerRenameExt.cpp @@ -22,7 +22,7 @@ struct InvokeStruct CPowerRenameMenu::CPowerRenameMenu() { ModuleAddRef(); - app_name = GET_RESOURCE_STRING(IDS_POWERRENAME_APP_NAME); + context_menu_caption = GET_RESOURCE_STRING_FALLBACK(IDS_POWERRENAME_CONTEXT_MENU_ENTRY, L"Rename with PowerRename"); } CPowerRenameMenu::~CPowerRenameMenu() @@ -87,8 +87,8 @@ HRESULT CPowerRenameMenu::QueryContextMenu(HMENU hMenu, UINT index, UINT uIDFirs HRESULT hr = E_UNEXPECTED; if (m_spdo && !(uFlags & (CMF_DEFAULTONLY | CMF_VERBSONLY | CMF_OPTIMIZEFORINVOKE))) { - wchar_t menuName[64] = { 0 }; - LoadString(g_hInst, IDS_POWERRENAME, menuName, ARRAYSIZE(menuName)); + wchar_t menuName[128] = { 0 }; + wcscpy_s(menuName, ARRAYSIZE(menuName), context_menu_caption.c_str()); MENUITEMINFO mii; mii.cbSize = sizeof(MENUITEMINFO); @@ -251,7 +251,7 @@ HRESULT CPowerRenameMenu::RunPowerRename(CMINVOKECOMMANDINFO* pici, IShellItemAr HRESULT __stdcall CPowerRenameMenu::GetTitle(IShellItemArray* /*psiItemArray*/, LPWSTR* ppszName) { - return SHStrDup(app_name.c_str(), ppszName); + return SHStrDup(context_menu_caption.c_str(), ppszName); } HRESULT __stdcall CPowerRenameMenu::GetIcon(IShellItemArray* /*psiItemArray*/, LPWSTR* ppszIcon) diff --git a/src/modules/powerrename/dll/PowerRenameExt.h b/src/modules/powerrename/dll/PowerRenameExt.h index c67c6d5610..5383d88777 100644 --- a/src/modules/powerrename/dll/PowerRenameExt.h +++ b/src/modules/powerrename/dll/PowerRenameExt.h @@ -72,5 +72,5 @@ private: std::atomic m_refCount = 1; HBITMAP m_hbmpIcon = nullptr; CComPtr m_spdo; - std::wstring app_name; + std::wstring context_menu_caption; }; diff --git a/src/modules/powerrename/dll/Resources.resx b/src/modules/powerrename/dll/Resources.resx index 2347ab2bc6..0cb356f56d 100644 --- a/src/modules/powerrename/dll/Resources.resx +++ b/src/modules/powerrename/dll/Resources.resx @@ -125,6 +125,10 @@ PowerRename do not loc, product name + + Rename with Po&werRename + PowerRename is a product name. do not loc it. The & allows to use W as a keyboard accelerator. + A Windows Shell extension for more advanced bulk renaming using search and replace or regular expressions. diff --git a/src/modules/previewpane/SvgThumbnailProvider/Program.cs b/src/modules/previewpane/SvgThumbnailProvider/Program.cs index 71172f0ac1..d25e3ee188 100644 --- a/src/modules/previewpane/SvgThumbnailProvider/Program.cs +++ b/src/modules/previewpane/SvgThumbnailProvider/Program.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Globalization; +using ManagedCommon; namespace Microsoft.PowerToys.ThumbnailHandler.Svg { @@ -17,6 +18,7 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg public static void Main(string[] args) { ApplicationConfiguration.Initialize(); + Logger.InitializeLogger("\\FileExplorer_localLow\\SvgThumbnails\\logs", true); if (args != null) { if (args.Length == 2) diff --git a/src/modules/previewpane/SvgThumbnailProvider/SvgThumbnailProvider.cs b/src/modules/previewpane/SvgThumbnailProvider/SvgThumbnailProvider.cs index 5d5d750e5e..e4e636ef26 100644 --- a/src/modules/previewpane/SvgThumbnailProvider/SvgThumbnailProvider.cs +++ b/src/modules/previewpane/SvgThumbnailProvider/SvgThumbnailProvider.cs @@ -7,6 +7,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; using Common.Utilities; +using ManagedCommon; using Microsoft.Web.WebView2.Core; using Microsoft.Web.WebView2.WinForms; @@ -197,8 +198,10 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg _browser.NavigateToString(SvgContents); } } - catch (Exception) + catch (Exception ex) { + Logger.LogError($"Failed running webView2Environment completed for {FilePath} : ", ex); + thumbnailDone.Set(); } }); diff --git a/src/modules/previewpane/SvgThumbnailProvider/SvgThumbnailProvider.csproj b/src/modules/previewpane/SvgThumbnailProvider/SvgThumbnailProvider.csproj index 09d3112f57..9bdd514571 100644 --- a/src/modules/previewpane/SvgThumbnailProvider/SvgThumbnailProvider.csproj +++ b/src/modules/previewpane/SvgThumbnailProvider/SvgThumbnailProvider.csproj @@ -52,5 +52,6 @@ + \ No newline at end of file diff --git a/src/runner/UpdateUtils.cpp b/src/runner/UpdateUtils.cpp index c2297e630d..4558b37cb3 100644 --- a/src/runner/UpdateUtils.cpp +++ b/src/runner/UpdateUtils.cpp @@ -200,14 +200,6 @@ void ProcessNewVersionInfo(const github_version_info& version_info, void PeriodicUpdateWorker() { - // Check if periodic update check is disabled by GPO. - // This policy code is implemented but not active. It is for later usage in PT version after 1.0 release. - //if (powertoys_gpo::getDisablePeriodicUpdateCheckValue() == powertoys_gpo::gpo_rule_configured_enabled) - //{ - // Logger::info(L"Initialization of periodic update checks stopped. Periodic update checks are disabled by GPO."); - // return; - //} - for (;;) { auto state = UpdateState::read(); diff --git a/src/settings-ui/Settings.UI.Library/PowerAccentProperties.cs b/src/settings-ui/Settings.UI.Library/PowerAccentProperties.cs index 2d17e8ebdc..f471f51c13 100644 --- a/src/settings-ui/Settings.UI.Library/PowerAccentProperties.cs +++ b/src/settings-ui/Settings.UI.Library/PowerAccentProperties.cs @@ -12,6 +12,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library [JsonPropertyName("activation_key")] public PowerAccentActivationKey ActivationKey { get; set; } + [JsonPropertyName("do_not_activate_on_game_mode")] + public bool DoNotActivateOnGameMode { get; set; } + [JsonPropertyName("toolbar_position")] public StringProperty ToolbarPosition { get; set; } @@ -36,6 +39,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library public PowerAccentProperties() { ActivationKey = PowerAccentActivationKey.Both; + DoNotActivateOnGameMode = true; ToolbarPosition = "Top center"; InputTime = new IntProperty(PowerAccentSettings.DefaultInputTimeMs); SelectedLang = "ALL"; diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsSettings.png b/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsSettings.png deleted file mode 100644 index a67a0589bb..0000000000 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsSettings.png and /dev/null differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsAlwaysOnTop.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/AlwaysOnTop.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsAlwaysOnTop.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/AlwaysOnTop.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsAwake.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/Awake.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsAwake.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/Awake.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsColorPicker.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/ColorPicker.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsColorPicker.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/ColorPicker.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsCmdNotFound.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/CommandNotFound.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsCmdNotFound.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/CommandNotFound.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsCropAndLock.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/CropAndLock.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsCropAndLock.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/CropAndLock.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsEnvironmentVariables.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/EnvironmentVariables.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsEnvironmentVariables.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/EnvironmentVariables.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsFancyZones.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/FancyZones.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsFancyZones.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/FancyZones.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsFileExplorerPreview.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/FileExplorerPreview.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsFileExplorerPreview.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/FileExplorerPreview.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsFileLocksmith.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/FileLocksmith.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsFileLocksmith.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/FileLocksmith.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsFindMyMouse.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/FindMyMouse.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsFindMyMouse.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/FindMyMouse.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsHosts.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/Hosts.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsHosts.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/Hosts.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsImageResizer.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/ImageResizer.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsImageResizer.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/ImageResizer.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsKeyboardManager.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/KeyboardManager.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsKeyboardManager.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/KeyboardManager.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsMouseCrosshairs.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/MouseCrosshairs.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsMouseCrosshairs.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/MouseCrosshairs.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsMouseHighlighter.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/MouseHighlighter.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsMouseHighlighter.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/MouseHighlighter.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsMouseJump.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/MouseJump.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsMouseJump.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/MouseJump.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsMouseUtils.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/MouseUtils.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsMouseUtils.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/MouseUtils.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsMouseWithoutBorders.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/MouseWithoutBorders.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsMouseWithoutBorders.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/MouseWithoutBorders.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPastePlain.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/PasteAsPlainText.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPastePlain.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/PasteAsPlainText.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPeek.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/Peek.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPeek.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/Peek.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPowerRename.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/PowerRename.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPowerRename.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/PowerRename.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPowerToys.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/PowerToys.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPowerToys.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/PowerToys.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPowerToysRun.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/PowerToysRun.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPowerToysRun.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/PowerToysRun.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPowerAccent.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/QuickAccent.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPowerAccent.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/QuickAccent.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsRegistryPreview.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/RegistryPreview.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsRegistryPreview.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/RegistryPreview.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsScreenRuler.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/ScreenRuler.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsScreenRuler.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/ScreenRuler.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsShortcutGuide.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/ShortcutGuide.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsShortcutGuide.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/ShortcutGuide.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPowerOcr.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/TextExtractor.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsPowerOcr.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/TextExtractor.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsVideoConferenceMute.png b/src/settings-ui/Settings.UI/Assets/Settings/Icons/VideoConferenceMute.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/FluentIcons/FluentIconsVideoConferenceMute.png rename to src/settings-ui/Settings.UI/Assets/Settings/Icons/VideoConferenceMute.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/Awake.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/Awake.png index 1402f76c5e..6c8381b3e3 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/Awake.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/Awake.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/CmdNotFound.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/CmdNotFound.png index 4b06c4de36..b6cd49ff8c 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/CmdNotFound.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/CmdNotFound.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/CropAndLock.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/CropAndLock.png index d374783648..fe825e22eb 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/CropAndLock.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/CropAndLock.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/EnvironmentVariables.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/EnvironmentVariables.png index 97e2ab67e6..96400df609 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/EnvironmentVariables.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/EnvironmentVariables.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/FileExplorerPreview.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/FileExplorerPreview.png new file mode 100644 index 0000000000..1118415bf0 Binary files /dev/null and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/FileExplorerPreview.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/FileLocksmith.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/FileLocksmith.png index 0df62b4b24..027ec353e8 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/FileLocksmith.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/FileLocksmith.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/HostsFileEditor.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/HostsFileEditor.png index 91da9da4b5..2dc457e5cd 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/HostsFileEditor.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/HostsFileEditor.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/ImageResizer.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/ImageResizer.png index edf3615e74..5a0ad9b141 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/ImageResizer.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/ImageResizer.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/MouseUtils.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/MouseUtils.png index d1e4e520d8..828a720958 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/MouseUtils.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/MouseUtils.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/MouseWithoutBorders.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/MouseWithoutBorders.png index 4261e4e16b..1feaebe507 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/MouseWithoutBorders.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/MouseWithoutBorders.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Awake.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Awake.png index 2b27459cbb..9e59e7c385 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Awake.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Awake.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/CmdNotFound.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/CmdNotFound.png index f40d8ae08c..c0f71d4894 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/CmdNotFound.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/CmdNotFound.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/CropAndLock.gif b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/CropAndLock.gif index 951392aaf7..9ebc1ec519 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/CropAndLock.gif and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/CropAndLock.gif differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/EnvironmentVariables.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/EnvironmentVariables.png index dcfb68d067..f544a733d6 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/EnvironmentVariables.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/EnvironmentVariables.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/FileExplorer.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/FileExplorer.png index e57ecc3585..d7c826a7a4 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/FileExplorer.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/FileExplorer.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/HostsFileEditor.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/HostsFileEditor.png index d89e8e422f..6cd27b5a02 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/HostsFileEditor.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/HostsFileEditor.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/ImageResizer.gif b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/ImageResizer.gif index e60e5d1d86..52a0fb0629 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/ImageResizer.gif and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/ImageResizer.gif differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/MouseWithoutBorders.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/MouseWithoutBorders.png index 578f55152e..1e615046bc 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/MouseWithoutBorders.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/MouseWithoutBorders.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/OOBEPTHero.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PTHero.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/OOBEPTHero.png rename to src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PTHero.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/OOBEPTHeroShort.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PTHeroShort.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/OOBEPTHeroShort.png rename to src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PTHeroShort.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PasteAsPlainText.gif b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PasteAsPlainText.gif new file mode 100644 index 0000000000..86c6c80c2e Binary files /dev/null and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PasteAsPlainText.gif differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PastePlain.gif b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PastePlain.gif deleted file mode 100644 index a9f6c089b7..0000000000 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PastePlain.gif and /dev/null differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Peek.gif b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Peek.gif deleted file mode 100644 index 8dd16485f1..0000000000 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Peek.gif and /dev/null differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Peek.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Peek.png new file mode 100644 index 0000000000..7cb528674a Binary files /dev/null and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Peek.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PowerAccent.gif b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PowerAccent.gif deleted file mode 100644 index 3a897e1045..0000000000 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PowerAccent.gif and /dev/null differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PowerRename.gif b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PowerRename.gif index b99cd466df..5f66cc841e 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PowerRename.gif and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PowerRename.gif differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/QuickAccent.gif b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/QuickAccent.gif new file mode 100644 index 0000000000..80fa31a0a7 Binary files /dev/null and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/QuickAccent.gif differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/RegistryPreview.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/RegistryPreview.png index 754005de39..24938f17ef 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/RegistryPreview.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/RegistryPreview.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Run.gif b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Run.gif index 2eb870b1d3..caf0ac67cf 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Run.gif and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/Run.gif differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/OOBEShortcutGuide.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/ShortcutGuide.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/OOBEShortcutGuide.png rename to src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/ShortcutGuide.png diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PowerOCR.gif b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/TextExtractor.gif similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/PowerOCR.gif rename to src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/TextExtractor.gif diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/PasteAsPlainText.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/PasteAsPlainText.png new file mode 100644 index 0000000000..dfc83a2f33 Binary files /dev/null and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/PasteAsPlainText.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/PastePlain.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/PastePlain.png deleted file mode 100644 index cd5860fe7f..0000000000 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/PastePlain.png and /dev/null differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/Peek.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/Peek.png index 5c56e0cdd4..ab0e9abe42 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/Peek.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/Peek.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/PowerAccent.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/PowerAccent.png deleted file mode 100644 index a398f9d690..0000000000 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/PowerAccent.png and /dev/null differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/PowerPreview.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/PowerPreview.png deleted file mode 100644 index be7b2ec073..0000000000 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/PowerPreview.png and /dev/null differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/QuickAccent.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/QuickAccent.png new file mode 100644 index 0000000000..491cf80f4f Binary files /dev/null and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/QuickAccent.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/RegistryPreview.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/RegistryPreview.png index 4afbf66f06..1433e4dd5c 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/RegistryPreview.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/RegistryPreview.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/Run.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/Run.png new file mode 100644 index 0000000000..063e51be4c Binary files /dev/null and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/Run.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/PowerOCR.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/TextExtractor.png similarity index 100% rename from src/settings-ui/Settings.UI/Assets/Settings/Modules/PowerOCR.png rename to src/settings-ui/Settings.UI/Assets/Settings/Modules/TextExtractor.png diff --git a/src/settings-ui/Settings.UI/Helpers/ModuleHelper.cs b/src/settings-ui/Settings.UI/Helpers/ModuleHelper.cs index 25d5fb4f59..a1936dfccf 100644 --- a/src/settings-ui/Settings.UI/Helpers/ModuleHelper.cs +++ b/src/settings-ui/Settings.UI/Helpers/ModuleHelper.cs @@ -30,10 +30,13 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers { switch (moduleType) { - case ModuleType.MousePointerCrosshairs: return "ms-appx:///Assets/Settings/FluentIcons/FluentIconsMouseCrosshairs.png"; - case ModuleType.MeasureTool: return "ms-appx:///Assets/Settings/FluentIcons/FluentIconsScreenRuler.png"; - case ModuleType.PowerLauncher: return $"ms-appx:///Assets/Settings/FluentIcons/FluentIconsPowerToysRun.png"; - default: return $"ms-appx:///Assets/Settings/FluentIcons/FluentIcons{moduleType}.png"; + case ModuleType.PowerOCR: return "ms-appx:///Assets/Settings/Icons/TextExtractor.png"; + case ModuleType.PastePlain: return "ms-appx:///Assets/Settings/Icons/PasteAsPlainText.png"; + case ModuleType.PowerAccent: return "ms-appx:///Assets/Settings/Icons/QuickAccent.png"; + case ModuleType.MousePointerCrosshairs: return "ms-appx:///Assets/Settings/Icons/MouseCrosshairs.png"; + case ModuleType.MeasureTool: return "ms-appx:///Assets/Settings/Icons/ScreenRuler.png"; + case ModuleType.PowerLauncher: return $"ms-appx:///Assets/Settings/Icons/PowerToysRun.png"; + default: return $"ms-appx:///Assets/Settings/Icons/{moduleType}.png"; } } @@ -132,38 +135,6 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers } } - public static Color GetModuleAccentColor(ModuleType moduleType) - { - return moduleType switch - { - ModuleType.AlwaysOnTop => Color.FromArgb(255, 74, 196, 242), // #4ac4f2 - ModuleType.Awake => Color.FromArgb(255, 40, 177, 233), // #28b1e9 - ModuleType.ColorPicker => Color.FromArgb(255, 7, 129, 211), // #0781d3 - ModuleType.CropAndLock => Color.FromArgb(255, 32, 166, 228), // #20a6e4 - ModuleType.EnvironmentVariables => Color.FromArgb(255, 16, 132, 208), // #1084d0 - ModuleType.FancyZones => Color.FromArgb(255, 65, 209, 247), // #41d1f7 - ModuleType.FileLocksmith => Color.FromArgb(255, 245, 161, 20), // #f5a114 - ModuleType.FindMyMouse => Color.FromArgb(255, 104, 109, 112), // #686d70 - ModuleType.Hosts => Color.FromArgb(255, 16, 132, 208), // #1084d0 - ModuleType.ImageResizer => Color.FromArgb(255, 85, 207, 248), // #55cff8 - ModuleType.KeyboardManager => Color.FromArgb(255, 224, 231, 238), // #e0e7ee - ModuleType.MouseHighlighter => Color.FromArgb(255, 17, 126, 199), // #117ec7 - ModuleType.MouseJump => Color.FromArgb(255, 240, 240, 239), // #f0f0ef - ModuleType.MousePointerCrosshairs => Color.FromArgb(255, 25, 115, 182), // #1973b6 - ModuleType.MouseWithoutBorders => Color.FromArgb(255, 31, 164, 227), // #1fa4e3 - ModuleType.PastePlain => Color.FromArgb(255, 243, 156, 16), // #f39c10 - ModuleType.Peek => Color.FromArgb(255, 255, 214, 103), // #ffd667 - ModuleType.PowerRename => Color.FromArgb(255, 43, 186, 243), // #2bbaf3 - ModuleType.PowerLauncher => Color.FromArgb(255, 51, 191, 240), // #33bff0 - ModuleType.PowerAccent => Color.FromArgb(255, 84, 89, 92), // #54595c - ModuleType.RegistryPreview => Color.FromArgb(255, 17, 80, 138), // #11508a - ModuleType.MeasureTool => Color.FromArgb(255, 135, 144, 153), // #879099 - ModuleType.ShortcutGuide => Color.FromArgb(255, 193, 202, 209), // #c1cad1 - ModuleType.PowerOCR => Color.FromArgb(255, 24, 153, 224), // #1899e0 - _ => Color.FromArgb(255, 255, 255, 255), // never called, all values listed above - }; - } - public static System.Type GetModulePageType(ModuleType moduleType) { return moduleType switch diff --git a/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs index e38010f590..4454fa13a7 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs @@ -90,7 +90,9 @@ namespace Microsoft.PowerToys.Settings.UI if (type != null) { settingsWindow.NavigateToSection(type); - } + + WindowHelpers.BringToForeground(settingsWindow.GetWindowHandle()); + } if (ensurePageIsSelected) { diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml index ae8bd5e077..54a2c096be 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/AppsListPage.xaml @@ -91,7 +91,7 @@ Glyph="" Visibility="{x:Bind IsLocked, Converter={StaticResource BoolToInvertedVisibilityConverter}, ConverterParameter=True, Mode=OneWay}"> - + - + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverviewAlternate.xaml b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverviewAlternate.xaml index 7cafdb134f..713a082d86 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverviewAlternate.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeOverviewAlternate.xaml @@ -9,7 +9,7 @@ @@ -39,7 +39,7 @@ + Source="ms-appx:///Assets/Settings/Icons/FancyZones.png" /> + Source="ms-appx:///Assets/Settings/Icons/PowerToysRun.png" /> + Source="ms-appx:///Assets/Settings/Icons/ColorPicker.png" /> + Source="ms-appx:///Assets/Settings/Icons/AlwaysOnTop.png" /> - + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePeek.xaml b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePeek.xaml index 2739994ac3..f5340a7899 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePeek.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePeek.xaml @@ -7,7 +7,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> - + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePowerAccent.xaml b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePowerAccent.xaml index 4ca9f0bda5..9ba7558169 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePowerAccent.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePowerAccent.xaml @@ -8,7 +8,7 @@ xmlns:tk7controls="using:CommunityToolkit.WinUI.UI.Controls" mc:Ignorable="d"> - + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePowerOCR.xaml b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePowerOCR.xaml index 715c29057e..282753bb24 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePowerOCR.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobePowerOCR.xaml @@ -8,7 +8,7 @@ xmlns:tk7controls="using:CommunityToolkit.WinUI.UI.Controls" mc:Ignorable="d"> - + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShellPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShellPage.xaml index 8122520df8..53fc661ed4 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShellPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShellPage.xaml @@ -59,103 +59,103 @@ - + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml index f7a7dc0559..7b73486617 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml @@ -7,7 +7,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> - + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OobeWindow.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OobeWindow.xaml.cs index 40dee8b61c..096a76b8a1 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OobeWindow.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OobeWindow.xaml.cs @@ -20,7 +20,7 @@ namespace Microsoft.PowerToys.Settings.UI /// /// An empty window that can be used on its own or navigated to within a Frame. /// - public sealed partial class OobeWindow : WindowEx + public sealed partial class OobeWindow : WindowEx, IDisposable { private PowerToysModules initialModule; @@ -31,6 +31,8 @@ namespace Microsoft.PowerToys.Settings.UI private WindowId _windowId; private IntPtr _hWnd; private AppWindow _appWindow; + private WindowMessageMonitor _msgMonitor; + private bool disposedValue; public OobeWindow(PowerToysModules initialModule) { @@ -59,8 +61,8 @@ namespace Microsoft.PowerToys.Settings.UI this.initialModule = initialModule; - var msgMonitor = new WindowMessageMonitor(this); - msgMonitor.WindowMessageReceived += (_, e) => + _msgMonitor = new WindowMessageMonitor(this); + _msgMonitor.WindowMessageReceived += (_, e) => { const int WM_NCLBUTTONDBLCLK = 0x00A3; if (e.Message.MessageId == WM_NCLBUTTONDBLCLK) @@ -132,5 +134,22 @@ namespace Microsoft.PowerToys.Settings.UI mainWindow.CloseHiddenWindow(); } } + + private void Dispose(bool disposing) + { + if (!disposedValue) + { + _msgMonitor?.Dispose(); + + disposedValue = true; + } + } + + public void Dispose() + { + // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml index 1057c67181..aead2cb5eb 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml @@ -18,12 +18,12 @@ diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml index 8db0aae0b4..6179f87a08 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ColorPickerPage.xaml @@ -28,12 +28,12 @@ Orientation="Vertical"> - - - - - - - - @@ -355,7 +348,7 @@ Glyph="" Visibility="{x:Bind IsLocked, Converter={StaticResource BoolToInvertedVisibilityConverter}, ConverterParameter=True, Mode=OneWay}"> - + - + - \ No newline at end of file + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/EnvironmentVariablesPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/EnvironmentVariablesPage.xaml index 7d61d944da..3dc0b6bfcb 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/EnvironmentVariablesPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/EnvironmentVariablesPage.xaml @@ -14,12 +14,12 @@ - - - + + + @@ -33,7 +33,7 @@ FontWeight="SemiBold" NavigateUri="https://github.com/microsoft/PowerToys/releases/" /> - + - - + + + + + + + + + + + + + + + - - + + - - + + - - -