Compare commits

..

9 Commits

Author SHA1 Message Date
Shawn Yuan
e0c0e7bb76 Fixed keyvisual issue for pt run (#41539)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #41468 
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

---------

Signed-off-by: Shawn Yuan <shuaiyuan@microsoft.com>
2026-01-05 13:38:43 +08:00
Michael Clayton
dfede67993 Ready for Review - [Mouse Without Borders] - refactoring "Common" classes (Part 7 of 7) (#44283)
## Summary of the Pull Request

**Part 7** (last part) of a [slow-running 7-part
refactor](https://github.com/microsoft/PowerToys/issues/35155#issuecomment-2583334110)
of the giant "Common" class in Mouse Without Borders into individual
classes with tighter private scope.

In this PR:

* Extract the "Common" code from the following files:
  * ```Common.cs```-> ```Core/Common.cs```
  * ```IClipboardHelper.cs/Common``` -> ```Core/IpcChannelHelper.cs```
* Update references to the types in the new locations
* Update unit test to verify functionality has only changed in an
expected way
* Make members private or internal as applicable

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Addresses #35155 
- [x] **Communication:** I've discussed this with core contributors
already. If work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [x] **Localization:** All end user facing strings can be localized
   - no changes in this PR
- [x] **Dev docs:** Added/updated
   - no changes in this PR
- [x] **New binaries:** Added on the required places
   - no changes in this PR
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [x] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx
   - no changes in this PR

<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

### Run manual tests from [Test Checklist
Template](5bc7201ae2/doc/releases/tests-checklist-template.md (mouse-without-borders)):

* Install PowerToys on two PCs in the same local network:
   - [x]     Verify that PowerToys is properly installed on both PCs.
   - [x]     Configure Windows Firewall Rules
- ```netsh advfirewall firewall add rule
name="PowerToys.MouseWithoutBorders - mc" dir=in action=allow
program="C:\src\mc\PowerToys\x64\Debug\PowerToys.exe" enable=yes
remoteip=any profile=any protocol=tcp```
   
 * Setup Connection:
- [x] Open MWB's settings on the first PC and click the "New Key"
button. Verify that a new security key is generated.
- [x] Copy the generated security key and paste it in the corresponding
input field in the settings of MWB on the second PC. Also enter the name
of the first PC in the required field.
- [x] Press "Connect" and verify that the machine layout now includes
two PC tiles, each displaying their respective PC names.
   
 * Verify Connection Status:
- [x] Ensure that the border of the remote PC turns green, indicating a
successful connection.
- [x] Enter an incorrect security key and verify that the border of the
remote PC turns red, indicating a failed connection.
   
 * Test Remote Mouse/Keyboard Control:
- [x] With the PCs connected, test the mouse/keyboard control from one
PC to another. Verify that the mouse/keyboard inputs are correctly
registered on the other PC.
- [ ] Test remote mouse/keyboard control across all four PCs, if
available. Verify that inputs are correctly registered on each connected
PC when the mouse is active there.
     - unable to test - only 2 machines available
   
 * Test Remote Control with Elevated Apps:
- note - the main PowerToys.exe must be running as a **non**-admin for
these tests
- [x] Open an elevated app on one of the PCs. Verify that without "Use
Service" enabled, PowerToys does not control the elevated app.
- [x] Enable "Use Service" in MWB's settings (need to run PowerToys.exe
as admin to enable "Use Service", then restart PowerToys.exe as
non-admin). Verify that PowerToys can now control the elevated app
remotely. Verify that MWB processes are running as LocalSystem, while
the MWB helper process is running non-elevated.
- ```get-process -Name "PowerToys.MouseWithoutBorders*" -IncludeUserName
| format-table Id, ProcessName, UserName```
- [x] Process: ```PowerToys.MouseWithoutBorders.exe``` - running as
```SYSTEM```
- [x] Process: ```PowerToys.MouseWithoutBorders.Helper.exe``` - running
as current user
- ```get-service -Name "PowerToys.*" | ft Status, Name, UserName;
get-ciminstance -Class "Win32_Service" -Filter "Name like 'PowerToys%'"
| ft ProcessId, Name```
- [x] Service: ```PowerToys.MWB.Service``` - running as ```Local
System```
- [x] Toggle "Use Service" again, verify that each time you do that, the
MWB processes are restarted.
- [x] Run PowerToys elevated on one of the machines, verify that you can
control elevated apps remotely now on that machine.

* Test Module Enable Status:
- [x] For all combinations of "Use Service"/"Run PowerToys as admin",
try enabling/disabling MWB module and verify that it's indeed being
toggled using task manager.
   
 * Test Disconnection/Reconnection:
- [x] Disconnect one of the PCs from network. Verify that the machine
layout updates to reflect the disconnection.
   - [x]     Do the same, but now by exiting PowerToys.
   - [x]     Start PowerToys again, verify that the PCs are reconnected.
  
 * Test Various Local Network Conditions:
- [ ] Test MWB performance under various network conditions (e.g., low
bandwidth, high latency). Verify that the tool maintains a stable
connection and functions correctly.

 * Clipboard Sharing:
- [x] Copy some text on one PC and verify that the same text can be
pasted on another PC.
- [x] Use the screenshot key and Win+Shift+S to take a screenshot on one
PC and verify that the screenshot can be pasted on another PC.
- [x] Copy a file in Windows Explorer and verify that the file can be
pasted on another PC. Make sure the file size is below 100MB.
- [x] Try to copy multiple files and directories and verify that it's
not possible (only the first selected file is being copied).
 
 * Drag and Drop:
- [ ] Drag a file from Windows Explorer on one PC, cross the screen
border onto another PC, and release it there. Verify that the file is
copied to the other PC. Make sure the file size is below 100MB.
- [ ] While dragging the file, verify that a corresponding icon is
displayed under the mouse cursor.
- [ ] Without moving the mouse from one PC to the target PC, press
CTRL+ALT+F1/2/3/4 hotkey to switch to the target PC directly and verify
that file sharing/dropping is not working.

 * Lock and Unlock with "Use Service" Enabled:
   - [x]     Enable "Use Service" in MWB's settings.
- [x] Lock a remote PC using Win+L, move the mouse to it remotely, and
try to unlock it. Verify that you can unlock the remote PC.
- [x] Disable "Use Service" in MWB's settings, lock the remote PC, move
the mouse to it remotely, and try to unlock it. Verify that you can't
unlock the remote PC.

 * Test Settings:
- [ ] Change the rest of available settings on MWB page and verify that
each setting works as described.

### Group Policy Tests

See https://learn.microsoft.com/en-us/windows/powertoys/grouppolicy

- [ ] Install *.admx / *.adml and check settings behave as expected
  - [ ] I'll expand the list of settings here when I get this far :-)
- [ ] HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys
  - [x]     ConfigureEnabledUtilityMouseWithoutBorders
- [x] ```[missing]``` - "Activation -> Enable Mouse Without Borders"
enabled, with GPO warning hidden
- ```reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v
ConfigureEnabledUtilityMouseWithoutBorders /f```
- [x] ```0``` - "Activation -> Enable Mouse Without Borders" set to
"off" and disabled, with GPO warning visible
- ```reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v
ConfigureEnabledUtilityMouseWithoutBorders /t REG_DWORD /d 0 /f```
- [x] ```1``` - "Activation -> Enable Mouse Without Borders" set to "on"
and disabled, with GPO warning visible
- ```reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v
ConfigureEnabledUtilityMouseWithoutBorders /t REG_DWORD /d 1 /f```
  - [ ] MwbClipboardSharingEnabled
  - [ ] MwbFileTransferEnabled
  - [ ] MwbUseOriginalUserInterface
  - [ ] MwbDisallowBlockingScreensaver
  - [ ] MwbSameSubnetOnly
  - [ ] MwbValidateRemoteIp
  - [x]     MwbDisableUserDefinedIpMappingRules
- [x] ```[missing]``` - "Advanced Settings -> IP address mapping"
enabled, with GPO warning hidden
- ```reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v
MwbDisableUserDefinedIpMappingRules /f```
- [x] ```0``` - "Advanced Settings -> IP address mapping" enabled, with
GPO warning hidden
- ```reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v
MwbDisableUserDefinedIpMappingRules /t REG_DWORD /d 0 /f```
- [x] ```1``` - "Advanced Settings -> IP address mapping" disabled, with
GPO warning visible
- ```reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v
MwbDisableUserDefinedIpMappingRules /t REG_DWORD /d 1 /f```
  - [x]     MwbPolicyDefinedIpMappingRules
- [x] ```[missing]``` - "Advanced Settings -> IP address mapping"
enabled, with GPO warning and GPO values hidden
- ```reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v
MwbPolicyDefinedIpMappingRules /f```
- [x] ```[empty value]``` - "Advanced Settings -> IP address mapping"
enabled, with GPO warning hidden and GPO values hidden
- ```reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v
MwbPolicyDefinedIpMappingRules /t REG_MULTI_SZ /d "" /f```
- [x] ```[non-empty value]``` - "Advanced Settings -> IP address
mapping" enabled, with GPO warning visible and GPO values visible
- ```reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\PowerToys /v
MwbPolicyDefinedIpMappingRules /t REG_MULTI_SZ /d "aaa 10.0.0.1\0bbb
10.0.0.2" /f```
2026-01-05 12:02:12 +08:00
Kai Tao
1438a628ad Find My Mouse: Add telemetry for trigger source (#44446)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Verified trace successfully locally
2026-01-05 11:12:25 +08:00
Kazeem Quadri
1b6b446915 Add Drag and Drop For Environment Variables (#40105)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
This PR introduces drag-and-drop functionality for environment
variables, allowing users to easily update the order of variables based
on their preferences. Users can now rearrange variables directly in the
UI by dragging and dropping, making it more intuitive and efficient to
customise the order without manual editing.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [X] **Closes:** #33554 33554
- [X] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
Updated `EnvironmentVariablesMainPage.xaml` to use a `ListView` instead
of an `ItemsControl`, enabling item dragging and reordering. The new
`ListView` features a grid layout with a `FontIcon`, `TextBox`, and
`Button`, while maintaining visibility control through data binding.

Added `EditVariableValuesList_DragItemsCompleted` method in
`EnvironmentVariablesMainPage.xaml.cs` to update the text box with the
new order of items after drag-and-drop operations, ensuring consistency
with the underlying data model.
<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
- Manually tested the affected functionality.
- Change was minimal and did not impact existing automated tests.
- Verified that the new/modified feature works as expected and did not
cause regressions in related areas.

---------

Co-authored-by: Leilei Zhang <leilzh@microsoft.com>
2026-01-05 09:30:02 +08:00
safocl
78b0139bc3 powerrename: fix union usage (#42845)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #42843
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
fix undefined behavior when using union in the `IFACEMETHODIMP
CPowerRenameRegEx::PutFileTime(_In_ SYSTEMTIME fileTime)` function

a69f7fa806/src/modules/powerrename/lib/PowerRenameRegEx.cpp (L299)

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-01-04 19:33:16 +08:00
Kai Tao
709c4bbf6b Cmdpal: PowerToys extension localization (#44520)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Localization for cmdpal powertoys extension
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-01-04 15:18:27 +08:00
Ruben Fricke
bb3435322f Fix broken style.md links in devdocs (#44457)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Fix two broken links to style.md in devcods. This file was moved to
development/style.md in PR #43399, but these references were not
updated.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [x] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
Fixed broken links in:
  - doc/devdocs/readme.md (line 60)
  - doc/devdocs/guidance.md (line 61)
  
<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Manually verified that the links resolve correctly.
2026-01-04 12:23:45 +08:00
NOXX - Commiter
d43e1d8cb2 Add Antygravity plugin to third-party plugins list (#44392)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2026-01-04 11:12:47 +08:00
Shawn Yuan
1a145fd136 Fix peek issue (#44456)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
This pull request focuses on improving the security and behavior of
Markdown file previews. The main changes include disabling HTML
rendering in Markdown to prevent potential security issues, and ensuring
that the `IsDevFilePreview` flag is set correctly when previewing
Markdown files.

**Markdown rendering and preview behavior:**

* Disabled HTML rendering in the Markdown pipeline by adding
`.DisableHtml()` in `MarkdownHelper.MarkdownHtml`, which helps prevent
XSS and other security issues in file previews.
* Explicitly set `IsDevFilePreview` to `false` when handling Markdown
files in `WebBrowserPreviewer`, ensuring correct preview state.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #xxx
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2025-12-29 14:23:16 +08:00
68 changed files with 4262 additions and 1973 deletions

View File

@@ -58,8 +58,8 @@ string validUIDisplayString = Resources.ValidUIDisplayString;
## More On Coding Guidance
Please review these brief docs below relating to our coding standards, etc.
* [Coding Style](./style.md)
* [Code Organization](./readme.md)
* [Coding Style](development/style.md)
* [Code Organization](readme.md)
[VS Resource Editor]: https://learn.microsoft.com/cpp/windows/resource-editors?view=vs-2019

View File

@@ -57,7 +57,7 @@ Once you've discussed your proposed feature/fix/etc. with a team member, and an
## Rules
- **Follow the pattern of what you already see in the code.**
- [Coding style](style.md).
- [Coding style](development/style.md).
- Try to package new functionality/components into libraries that have nicely defined interfaces.
- Package new functionality into classes or refactor existing functionality into a class as you extend the code.
- When adding new classes/methods/changing existing code, add new unit tests or update the existing tests.

View File

@@ -50,6 +50,7 @@ Contact the developers of a plugin directly for assistance with a specific plugi
| [Hotkeys](https://github.com/ruslanlap/PowerToysRun-Hotkeys) | [ruslanlap](https://github.com/ruslanlap) | Create, manage, and trigger custom keyboard shortcuts directly from PowerToys Run. |
| [RandomGen](https://github.com/ruslanlap/PowerToysRun-RandomGen) | [ruslanlap](https://github.com/ruslanlap) | 🎲 Generate random data instantly with a single keystroke. Perfect for developers, testers, designers, and anyone who needs quick access to random data. Features include secure passwords, PINs, names, business data, dates, numbers, GUIDs, color codes, and more. Especially useful for designers who need random color codes and placeholder content. |
| [Open With Cursor](https://github.com/VictorNoxx/PowerToys-Run-Cursor/) | [VictorNoxx](https://github.com/VictorNoxx) | Open Visual Studio, VS Code recents with Cursor AI |
| [Open With Antygravity](https://github.com/artickc/PowerToys-Run-Antygravity) | [artickc](https://github.com/artickc) | Open Visual Studio, VS Code recents with Cursor AI |
| [CheatSheets](https://github.com/ruslanlap/PowerToysRun-CheatSheets) | [ruslanlap](https://github.com/ruslanlap) | 📚 Find cheat sheets and command examples instantly from tldr pages, cheat.sh, and devhints.io. Features include favorites system, categories, offline mode, and smart caching. |
| [QuickAI](https://github.com/ruslanlap/PowerToysRun-QuickAi) | [ruslanlap](https://github.com/ruslanlap) | AI-powered assistance with instant, smart responses from multiple providers (Groq, Together, Fireworks, OpenRouter, Cohere) |

View File

@@ -466,27 +466,39 @@
TextChanged="EditVariableDialogValueTxtBox_TextChanged"
TextWrapping="Wrap" />
<MenuFlyoutSeparator Visibility="{Binding ShowAsList, Converter={StaticResource BoolToVisibilityConverter}}" />
<ItemsControl
<ListView
x:Name="EditVariableValuesList"
Margin="0,-8,0,12"
HorizontalAlignment="Stretch"
AllowDrop="True"
CanDragItems="True"
CanReorderItems="True"
DragItemsCompleted="EditVariableValuesList_DragItemsCompleted"
ItemsSource="{Binding ValuesList, Mode=TwoWay}"
Visibility="{Binding ShowAsList, Converter={StaticResource BoolToVisibilityConverter}}">
<ItemsControl.ItemTemplate>
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="32" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="40" />
</Grid.ColumnDefinitions>
<FontIcon
Grid.Column="0"
Margin="0,0,8,0"
FontSize="16"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Glyph="&#xE759;" />
<TextBox
Grid.Column="1"
Background="Transparent"
BorderBrush="Transparent"
LostFocus="EditVariableValuesListTextBox_LostFocus"
Text="{Binding Text}" />
<Button
x:Uid="More_Options_Button"
Grid.Column="1"
Grid.Column="2"
VerticalAlignment="Center"
Content="&#xE712;"
FontFamily="{ThemeResource SymbolThemeFontFamily}"
@@ -523,8 +535,8 @@
</Button>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
</ScrollViewer>
</ContentDialog>

View File

@@ -16,6 +16,8 @@ namespace EnvironmentVariablesUILib
{
public sealed partial class EnvironmentVariablesMainPage : Page
{
private const string ValueListSeparator = ";";
private sealed class RelayCommandParameter
{
public RelayCommandParameter(Variable variable, VariablesSet set)
@@ -440,7 +442,7 @@ namespace EnvironmentVariablesUILib
variable.ValuesList.Move(index, index - 1);
}
var newValues = string.Join(";", variable.ValuesList?.Select(x => x.Text).ToArray());
var newValues = string.Join(ValueListSeparator, variable.ValuesList?.Select(x => x.Text).ToArray());
EditVariableDialogValueTxtBox.Text = newValues;
}
@@ -461,7 +463,7 @@ namespace EnvironmentVariablesUILib
variable.ValuesList.Move(index, index + 1);
}
var newValues = string.Join(";", variable.ValuesList?.Select(x => x.Text).ToArray());
var newValues = string.Join(ValueListSeparator, variable.ValuesList?.Select(x => x.Text).ToArray());
EditVariableDialogValueTxtBox.Text = newValues;
}
@@ -476,7 +478,7 @@ namespace EnvironmentVariablesUILib
var variable = EditVariableDialog.DataContext as Variable;
variable.ValuesList.Remove(listItem);
var newValues = string.Join(";", variable.ValuesList?.Select(x => x.Text).ToArray());
var newValues = string.Join(ValueListSeparator, variable.ValuesList?.Select(x => x.Text).ToArray());
EditVariableDialogValueTxtBox.Text = newValues;
}
@@ -492,7 +494,7 @@ namespace EnvironmentVariablesUILib
var index = variable.ValuesList.IndexOf(listItem);
variable.ValuesList.Insert(index, new Variable.ValuesListItem { Text = string.Empty });
var newValues = string.Join(";", variable.ValuesList?.Select(x => x.Text).ToArray());
var newValues = string.Join(ValueListSeparator, variable.ValuesList?.Select(x => x.Text).ToArray());
EditVariableDialogValueTxtBox.TextChanged -= EditVariableDialogValueTxtBox_TextChanged;
EditVariableDialogValueTxtBox.Text = newValues;
EditVariableDialogValueTxtBox.TextChanged += EditVariableDialogValueTxtBox_TextChanged;
@@ -510,7 +512,7 @@ namespace EnvironmentVariablesUILib
var index = variable.ValuesList.IndexOf(listItem);
variable.ValuesList.Insert(index + 1, new Variable.ValuesListItem { Text = string.Empty });
var newValues = string.Join(";", variable.ValuesList?.Select(x => x.Text).ToArray());
var newValues = string.Join(ValueListSeparator, variable.ValuesList?.Select(x => x.Text).ToArray());
EditVariableDialogValueTxtBox.TextChanged -= EditVariableDialogValueTxtBox_TextChanged;
EditVariableDialogValueTxtBox.Text = newValues;
EditVariableDialogValueTxtBox.TextChanged += EditVariableDialogValueTxtBox_TextChanged;
@@ -532,7 +534,7 @@ namespace EnvironmentVariablesUILib
listItem.Text = (sender as TextBox)?.Text;
var variable = EditVariableDialog.DataContext as Variable;
var newValues = string.Join(";", variable.ValuesList?.Select(x => x.Text).ToArray());
var newValues = string.Join(ValueListSeparator, variable.ValuesList?.Select(x => x.Text).ToArray());
EditVariableDialogValueTxtBox.TextChanged -= EditVariableDialogValueTxtBox_TextChanged;
EditVariableDialogValueTxtBox.Text = newValues;
EditVariableDialogValueTxtBox.TextChanged += EditVariableDialogValueTxtBox_TextChanged;
@@ -548,5 +550,16 @@ namespace EnvironmentVariablesUILib
CancelAddVariable();
ConfirmAddVariableBtn.IsEnabled = false;
}
private void EditVariableValuesList_DragItemsCompleted(ListViewBase sender, DragItemsCompletedEventArgs args)
{
if (EditVariableDialog.DataContext is Variable variable && variable.ValuesList != null)
{
var newValues = string.Join(ValueListSeparator, variable.ValuesList.Select(x => x.Text));
EditVariableDialogValueTxtBox.TextChanged -= EditVariableDialogValueTxtBox_TextChanged;
EditVariableDialogValueTxtBox.Text = newValues;
EditVariableDialogValueTxtBox.TextChanged += EditVariableDialogValueTxtBox_TextChanged;
}
}
}
}

View File

@@ -155,7 +155,7 @@ private:
void DetectShake();
bool KeyboardInputCanActivate();
void StartSonar();
void StartSonar(FindMyMouseActivationMethod activationMethod);
void StopSonar();
};
@@ -275,7 +275,7 @@ LRESULT SuperSonar<D>::BaseWndProc(UINT message, WPARAM wParam, LPARAM lParam) n
{
if (m_sonarStart == NoSonar)
{
StartSonar();
StartSonar(FindMyMouseActivationMethod::Shortcut);
}
else
{
@@ -384,7 +384,7 @@ void SuperSonar<D>::OnSonarKeyboardInput(RAWINPUT const& input)
IsEqual(m_lastKeyPos, ptCursor))
{
m_sonarState = SonarState::ControlDown2;
StartSonar();
StartSonar(m_activationMethod);
}
else
{
@@ -451,7 +451,7 @@ void SuperSonar<D>::DetectShake()
if (diagonal > 0 && distanceTravelled / diagonal > (m_shakeFactor / 100.f))
{
m_movementHistory.clear();
StartSonar();
StartSonar(m_activationMethod);
}
}
@@ -519,7 +519,7 @@ void SuperSonar<D>::OnSonarMouseInput(RAWINPUT const& input)
}
template<typename D>
void SuperSonar<D>::StartSonar()
void SuperSonar<D>::StartSonar(FindMyMouseActivationMethod activationMethod)
{
// Don't activate if game mode is on.
if (m_doNotActivateOnGameMode && detect_game_mode())
@@ -532,7 +532,7 @@ void SuperSonar<D>::StartSonar()
return;
}
Trace::MousePointerFocused();
Trace::MousePointerFocused(static_cast<int>(activationMethod));
// Cover the entire virtual screen.
// HACK: Draw with 1 pixel off. Otherwise, Windows glitches the task bar transparency when a transparent window fill the whole screen.
SetWindowPos(m_hwnd, HWND_TOPMOST, GetSystemMetrics(SM_XVIRTUALSCREEN) + 1, GetSystemMetrics(SM_YVIRTUALSCREEN) + 1, GetSystemMetrics(SM_CXVIRTUALSCREEN) - 2, GetSystemMetrics(SM_CYVIRTUALSCREEN) - 2, 0);

View File

@@ -22,11 +22,12 @@ void Trace::EnableFindMyMouse(const bool enabled) noexcept
}
// Log that the user activated the module by focusing the mouse pointer
void Trace::MousePointerFocused() noexcept
void Trace::MousePointerFocused(const int activationMethod) noexcept
{
TraceLoggingWriteWrapper(
g_hProvider,
"FindMyMouse_MousePointerFocused",
ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE));
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE),
TraceLoggingInt32(activationMethod, "ActivationMethod"));
}

View File

@@ -9,5 +9,6 @@ public:
static void EnableFindMyMouse(const bool enabled) noexcept;
// Log that the user activated the module by focusing the mouse pointer
static void MousePointerFocused() noexcept;
// activationMethod: 0 = DoubleLeftControlKey, 1 = DoubleRightControlKey, 2 = ShakeMouse, 3 = Shortcut
static void MousePointerFocused(const int activationMethod) noexcept;
};

File diff suppressed because it is too large Load Diff

View File

@@ -18,12 +18,12 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.VisualStudio.Threading;
using MouseWithoutBorders.Core;
using Newtonsoft.Json;
using StreamJsonRpc;
#if !MM_HELPER
using MouseWithoutBorders.Class;
using MouseWithoutBorders.Core;
#endif
using SystemClipboard = System.Windows.Forms.Clipboard;
@@ -246,11 +246,11 @@ WellKnownSidType.AuthenticatedUserSid, null);
CancellationToken cancellationToken = _serverTaskCancellationSource.Token;
IpcChannel<ClipboardHelper>.StartIpcServer(ChannelName + "/" + RemoteObjectName, cancellationToken);
Common.IpcChannelCreated = true;
IpcChannelHelper.IpcChannelCreated = true;
}
catch (Exception e)
{
Common.IpcChannelCreated = false;
IpcChannelHelper.IpcChannelCreated = false;
Common.ShowToolTip("Error setting up clipboard sharing, clipboard sharing will not work!", 5000, ToolTipIcon.Error);
Logger.Log(e);
}
@@ -405,7 +405,7 @@ WellKnownSidType.AuthenticatedUserSid, null);
try
{
rv = Common.Retry(nameof(SystemClipboard.ContainsFileDropList), () => { return SystemClipboard.ContainsFileDropList(); }, (log) => Log(log));
rv = IpcChannelHelper.Retry(nameof(SystemClipboard.ContainsFileDropList), () => { return SystemClipboard.ContainsFileDropList(); }, (log) => Log(log));
}
catch (ExternalException e)
{
@@ -427,7 +427,7 @@ WellKnownSidType.AuthenticatedUserSid, null);
try
{
rv = Common.Retry(nameof(SystemClipboard.ContainsImage), () => { return SystemClipboard.ContainsImage(); }, (log) => Log(log));
rv = IpcChannelHelper.Retry(nameof(SystemClipboard.ContainsImage), () => { return SystemClipboard.ContainsImage(); }, (log) => Log(log));
}
catch (ExternalException e)
{
@@ -449,7 +449,7 @@ WellKnownSidType.AuthenticatedUserSid, null);
try
{
rv = Common.Retry(nameof(SystemClipboard.ContainsText), () => { return SystemClipboard.ContainsText(); }, (log) => Log(log));
rv = IpcChannelHelper.Retry(nameof(SystemClipboard.ContainsText), () => { return SystemClipboard.ContainsText(); }, (log) => Log(log));
}
catch (ExternalException e)
{
@@ -471,7 +471,7 @@ WellKnownSidType.AuthenticatedUserSid, null);
try
{
rv = Common.Retry(nameof(SystemClipboard.GetFileDropList), () => { return SystemClipboard.GetFileDropList(); }, (log) => Log(log));
rv = IpcChannelHelper.Retry(nameof(SystemClipboard.GetFileDropList), () => { return SystemClipboard.GetFileDropList(); }, (log) => Log(log));
}
catch (ExternalException e)
{
@@ -493,7 +493,7 @@ WellKnownSidType.AuthenticatedUserSid, null);
try
{
rv = Common.Retry(nameof(SystemClipboard.GetImage), () => { return SystemClipboard.GetImage(); }, (log) => Log(log));
rv = IpcChannelHelper.Retry(nameof(SystemClipboard.GetImage), () => { return SystemClipboard.GetImage(); }, (log) => Log(log));
}
catch (ExternalException e)
{
@@ -515,7 +515,7 @@ WellKnownSidType.AuthenticatedUserSid, null);
try
{
rv = Common.Retry(nameof(SystemClipboard.GetText), () => { return SystemClipboard.GetText(format); }, (log) => Log(log));
rv = IpcChannelHelper.Retry(nameof(SystemClipboard.GetText), () => { return SystemClipboard.GetText(format); }, (log) => Log(log));
}
catch (ExternalException e)
{
@@ -539,7 +539,7 @@ WellKnownSidType.AuthenticatedUserSid, null);
{
try
{
_ = Common.Retry(
_ = IpcChannelHelper.Retry(
nameof(SystemClipboard.SetImage),
() =>
{
@@ -568,7 +568,7 @@ WellKnownSidType.AuthenticatedUserSid, null);
{
try
{
_ = Common.Retry(
_ = IpcChannelHelper.Retry(
nameof(SystemClipboard.SetText),
() =>
{
@@ -600,44 +600,4 @@ WellKnownSidType.AuthenticatedUserSid, null);
{
internal const int QUIT_CMD = 0x409;
}
internal sealed partial class Common
{
internal static bool IpcChannelCreated { get; set; }
internal static T Retry<T>(string name, Func<T> func, Action<string> log, Action preRetry = null)
{
int count = 0;
do
{
try
{
T rv = func();
if (count > 0)
{
log($"Trace: {name} has been successful after {count} retry.");
}
return rv;
}
catch (Exception)
{
count++;
preRetry?.Invoke();
if (count > 10)
{
throw;
}
Application.DoEvents();
Thread.Sleep(200);
}
}
while (true);
}
}
}

View File

@@ -1036,7 +1036,7 @@ internal static class Clipboard
{
try
{
_ = Common.Retry(
_ = IpcChannelHelper.Retry(
nameof(SystemClipboard.SetFileDropList),
() =>
{
@@ -1073,7 +1073,7 @@ internal static class Clipboard
{
try
{
_ = Common.Retry(
_ = IpcChannelHelper.Retry(
nameof(SystemClipboard.SetImage),
() =>
{
@@ -1104,7 +1104,7 @@ internal static class Clipboard
{
try
{
_ = Common.Retry(
_ = IpcChannelHelper.Retry(
nameof(SystemClipboard.SetText),
() =>
{

File diff suppressed because it is too large Load Diff

View File

@@ -295,9 +295,9 @@ internal static class Helper
return;
}
if (!Common.IpcChannelCreated)
if (!IpcChannelHelper.IpcChannelCreated)
{
Logger.TelemetryLogTrace($"{nameof(Common.IpcChannelCreated)} = {Common.IpcChannelCreated}. {Logger.GetStackTrace(new StackTrace())}", SeverityLevel.Warning);
Logger.TelemetryLogTrace($"{nameof(IpcChannelHelper.IpcChannelCreated)} = {IpcChannelHelper.IpcChannelCreated}. {Logger.GetStackTrace(new StackTrace())}", SeverityLevel.Warning);
return;
}

View File

@@ -0,0 +1,53 @@
// Copyright (c) Microsoft Corporation
// 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.Threading;
using System.Windows.Forms;
#if !MM_HELPER
using Thread = MouseWithoutBorders.Core.Thread;
#endif
namespace MouseWithoutBorders.Core;
internal static class IpcChannelHelper
{
internal static bool IpcChannelCreated { get; set; }
internal static T Retry<T>(string name, Func<T> func, Action<string> log, Action preRetry = null)
{
int count = 0;
do
{
try
{
T rv = func();
if (count > 0)
{
log($"Trace: {name} has been successful after {count} retry.");
}
return rv;
}
catch (Exception)
{
count++;
preRetry?.Invoke();
if (count > 10)
{
throw;
}
Application.DoEvents();
Thread.Sleep(200);
}
}
while (true);
}
}

View File

@@ -198,7 +198,6 @@ internal static class Logger
}
Logger.DumpProgramLogs(sb, level);
Logger.DumpOtherLogs(sb, level);
Logger.DumpStaticTypes(sb, level);
log = string.Format(
@@ -240,19 +239,16 @@ internal static class Logger
_ = Logger.PrivateDump(sb, AllLogs, "[Program logs]\r\n===============\r\n", 0, level, false);
}
internal static void DumpOtherLogs(StringBuilder sb, int level)
{
_ = Logger.PrivateDump(sb, new Common(), "[Other Logs]\r\n===============\r\n", 0, level, false);
}
internal static void DumpStaticTypes(StringBuilder sb, int level)
{
var staticTypes = new List<Type>
{
typeof(Clipboard),
typeof(Common),
typeof(DragDrop),
typeof(Encryption),
typeof(Event),
typeof(IpcChannelHelper),
typeof(InitAndCleanup),
typeof(Helper),
typeof(Launch),

View File

@@ -2,6 +2,8 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using MouseWithoutBorders.Core;
namespace MouseWithoutBorders
{
public partial class SetupPage2b : SettingsFormPage

View File

@@ -15,6 +15,8 @@ using System.Globalization;
using System.Reflection;
using System.Windows.Forms;
using MouseWithoutBorders.Core;
namespace MouseWithoutBorders
{
internal partial class FrmAbout : System.Windows.Forms.Form, IDisposable

View File

@@ -6,6 +6,8 @@ using System;
using System.Globalization;
using System.Windows.Forms;
using MouseWithoutBorders.Core;
namespace MouseWithoutBorders
{
public partial class FrmMessage : System.Windows.Forms.Form

View File

@@ -6,6 +6,7 @@ using System;
using System.Windows.Forms;
using MouseWithoutBorders.Class;
using MouseWithoutBorders.Core;
namespace MouseWithoutBorders
{

View File

@@ -49,6 +49,9 @@
<Compile Include="..\Class\IClipboardHelper.cs">
<Link>IClipboardHelper.cs</Link>
</Compile>
<Compile Include="..\Core\IpcChannelHelper.cs">
<Link>IpcChannelHelper.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>

View File

@@ -1,9 +1,38 @@
[Program logs]
===============
= System.String[]
[Other Logs]
[Clipboard]
===============
Comma = System.Char[]
--System.Char[] = System.Char[]: N/A
Star = System.Char[]
--System.Char[] = System.Char[]: N/A
NullSeparator = System.Char[]
--System.Char[] = System.Char[]: N/A
lastClipboardEventTime = 0
clipboardCopiedTime = 0
<LastIDWithClipboardData>k__BackingField = NONE
<NextClipboardViewer>k__BackingField = 0
<IsClipboardDataImage>k__BackingField = False
lastClipboardObject =
<HasSwitchedMachineSinceLastCopy>k__BackingField = False
ClipboardThreadOldLock = Lock
--_owningThreadId = 0
--_state = 0
--_recursionCount = 0
--_spinCount = 22
--_waiterStartTimeMs = 0
--s_contentionCount = 0
--s_maxSpinCount = 22
--s_minSpinCountForAdaptiveSpin = -100
BIG_CLIPBOARD_DATA_TIMEOUT = 30000
MAX_CLIPBOARD_DATA_SIZE_CAN_BE_SENT_INSTANTLY_TCP = 1048576
MAX_CLIPBOARD_FILE_SIZE_CAN_BE_SENT = 104857600
TEXT_HEADER_SIZE = 12
DATA_SIZE = 48
TEXT_TYPE_SEP = {4CFF57F7-BEDD-43d5-AE8F-27A61E886F2F}
[Common]
===============
= MouseWithoutBorders.Common
screenWidth = 0
screenHeight = 0
lastX = 0
@@ -46,7 +75,6 @@ avgSendTime = 0
maxSendTime = 0
totalSendCount = 0
totalSendTime = 0
<IpcChannelCreated>k__BackingField = False
TOGGLE_ICONS_SIZE = 4
ICON_ONE = 0
ICON_ALL = 1
@@ -55,36 +83,6 @@ ICON_BIG_CLIPBOARD = 3
ICON_ERROR = 4
JUST_GOT_BACK_FROM_SCREEN_SAVER = 9999
NETWORK_STREAM_BUF_SIZE = 1048576
[Clipboard]
===============
Comma = System.Char[]
--System.Char[] = System.Char[]: N/A
Star = System.Char[]
--System.Char[] = System.Char[]: N/A
NullSeparator = System.Char[]
--System.Char[] = System.Char[]: N/A
lastClipboardEventTime = 0
clipboardCopiedTime = 0
<LastIDWithClipboardData>k__BackingField = NONE
<NextClipboardViewer>k__BackingField = 0
<IsClipboardDataImage>k__BackingField = False
lastClipboardObject =
<HasSwitchedMachineSinceLastCopy>k__BackingField = False
ClipboardThreadOldLock = Lock
--_owningThreadId = 0
--_state = 0
--_recursionCount = 0
--_spinCount = 22
--_waiterStartTimeMs = 0
--s_contentionCount = 0
--s_maxSpinCount = 22
--s_minSpinCountForAdaptiveSpin = -100
BIG_CLIPBOARD_DATA_TIMEOUT = 30000
MAX_CLIPBOARD_DATA_SIZE_CAN_BE_SENT_INSTANTLY_TCP = 1048576
MAX_CLIPBOARD_FILE_SIZE_CAN_BE_SENT = 104857600
TEXT_HEADER_SIZE = 12
DATA_SIZE = 48
TEXT_TYPE_SEP = {4CFF57F7-BEDD-43d5-AE8F-27A61E886F2F}
[DragDrop]
===============
isDragging = False
@@ -174,6 +172,9 @@ actualLastPos = {X=0,Y=0}
--Empty = {X=0,Y=0}
myLastX = 0
myLastY = 0
[IpcChannelHelper]
===============
<IpcChannelCreated>k__BackingField = False
[InitAndCleanup]
===============
initDone = False
@@ -440,6 +441,7 @@ WM_LBUTTONDBLCLK = 515
WM_RBUTTONDBLCLK = 518
WM_MBUTTONDBLCLK = 521
WM_MOUSEWHEEL = 522
WM_MOUSEHWHEEL = 526
WM_KEYDOWN = 256
WM_KEYUP = 257
WM_SYSKEYDOWN = 260

View File

@@ -117,7 +117,6 @@ public static class LoggerTests
// copied from DumpObjects in Logger.cs
var sb = new StringBuilder(1000000);
Logger.DumpProgramLogs(sb, settingsDumpObjectsLevel);
Logger.DumpOtherLogs(sb, settingsDumpObjectsLevel);
Logger.DumpStaticTypes(sb, settingsDumpObjectsLevel);
var actual = sb.ToString();

View File

@@ -8,6 +8,7 @@ using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
@@ -24,15 +25,15 @@ internal sealed partial class FancyZonesMonitorListItem : ListItem
var pickerPage = new FancyZonesMonitorLayoutPickerPage(monitor)
{
Name = "Set active layout",
Name = Resources.FancyZones_SetActiveLayout,
};
MoreCommands =
[
new CommandContextItem(pickerPage)
{
Title = "Set active layout",
Subtitle = "Pick a layout for this monitor",
Title = Resources.FancyZones_SetActiveLayout,
Subtitle = Resources.FancyZones_PickLayoutForMonitor,
},
];
}
@@ -42,14 +43,14 @@ internal sealed partial class FancyZonesMonitorListItem : ListItem
var currentVirtualDesktop = FancyZonesVirtualDesktop.GetCurrentVirtualDesktopIdString();
var tags = new List<IDetailsElement>
{
DetailTag("Monitor", monitor.Data.Monitor),
DetailTag("Instance", monitor.Data.MonitorInstanceId),
DetailTag("Serial", monitor.Data.MonitorSerialNumber),
DetailTag("Number", monitor.Data.MonitorNumber.ToString(CultureInfo.InvariantCulture)),
DetailTag("Virtual desktop", currentVirtualDesktop),
DetailTag("Work area", $"{monitor.Data.LeftCoordinate},{monitor.Data.TopCoordinate} {monitor.Data.WorkAreaWidth}\u00D7{monitor.Data.WorkAreaHeight}"),
DetailTag("Resolution", $"{monitor.Data.MonitorWidth}\u00D7{monitor.Data.MonitorHeight}"),
DetailTag("DPI", monitor.Data.Dpi.ToString(CultureInfo.InvariantCulture)),
DetailTag(Resources.FancyZones_Monitor, monitor.Data.Monitor),
DetailTag(Resources.FancyZones_Instance, monitor.Data.MonitorInstanceId),
DetailTag(Resources.FancyZones_Serial, monitor.Data.MonitorSerialNumber),
DetailTag(Resources.FancyZones_Number, monitor.Data.MonitorNumber.ToString(CultureInfo.InvariantCulture)),
DetailTag(Resources.FancyZones_VirtualDesktop, currentVirtualDesktop),
DetailTag(Resources.FancyZones_WorkArea, $"{monitor.Data.LeftCoordinate},{monitor.Data.TopCoordinate} {monitor.Data.WorkAreaWidth}\u00D7{monitor.Data.WorkAreaHeight}"),
DetailTag(Resources.FancyZones_Resolution, $"{monitor.Data.MonitorWidth}\u00D7{monitor.Data.MonitorHeight}"),
DetailTag(Resources.FancyZones_DPI, monitor.Data.Dpi.ToString(CultureInfo.InvariantCulture)),
};
return new Details
@@ -68,7 +69,7 @@ internal sealed partial class FancyZonesMonitorListItem : ListItem
Key = key,
Data = new DetailsTags
{
Tags = [new Tag(string.IsNullOrWhiteSpace(value) ? "n/a" : value)],
Tags = [new Tag(string.IsNullOrWhiteSpace(value) ? Resources.Common_NotAvailable : value)],
},
};
}

View File

@@ -5,15 +5,24 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using WorkspacesCsharpLibrary.Data;
namespace PowerToysExtension.Commands;
internal sealed partial class WorkspaceListItem : ListItem
{
private static readonly CompositeFormat ApplicationsFormat = CompositeFormat.Parse(Resources.Workspaces_Applications_Format);
private static readonly CompositeFormat LastLaunchedFormat = CompositeFormat.Parse(Resources.Workspaces_LastLaunched_Format);
private static readonly CompositeFormat ApplicationsCountFormat = CompositeFormat.Parse(Resources.Workspaces_ApplicationsCount_Format);
private static readonly CompositeFormat MinAgoFormat = CompositeFormat.Parse(Resources.Workspaces_MinAgo_Format);
private static readonly CompositeFormat HrAgoFormat = CompositeFormat.Parse(Resources.Workspaces_HrAgo_Format);
private static readonly CompositeFormat DaysAgoFormat = CompositeFormat.Parse(Resources.Workspaces_DaysAgo_Format);
public WorkspaceListItem(ProjectWrapper workspace, IconInfo icon)
: base(new LaunchWorkspaceCommand(workspace.Id))
{
@@ -28,13 +37,13 @@ internal sealed partial class WorkspaceListItem : ListItem
var appCount = workspace.Applications?.Count ?? 0;
var appsText = appCount switch
{
0 => "No applications",
_ => string.Format(CultureInfo.CurrentCulture, "{0} applications", appCount),
0 => Resources.Workspaces_NoApplications,
_ => string.Format(CultureInfo.CurrentCulture, ApplicationsFormat, appCount),
};
var lastLaunched = workspace.LastLaunchedTime > 0
? $"Last launched {FormatRelativeTime(workspace.LastLaunchedTime)}"
: "Never launched";
? string.Format(CultureInfo.CurrentCulture, LastLaunchedFormat, FormatRelativeTime(workspace.LastLaunchedTime))
: Resources.Workspaces_NeverLaunched;
return $"{appsText} \u2022 {lastLaunched}";
}
@@ -44,15 +53,15 @@ internal sealed partial class WorkspaceListItem : ListItem
var appCount = workspace.Applications?.Count ?? 0;
var body = appCount switch
{
0 => "No applications in this workspace",
1 => "1 application",
_ => $"{appCount} applications",
0 => Resources.Workspaces_NoApplicationsInWorkspace,
1 => Resources.Workspaces_OneApplication,
_ => string.Format(CultureInfo.CurrentCulture, ApplicationsCountFormat, appCount),
};
return new Details
{
HeroImage = icon,
Title = workspace.Name ?? "Workspace",
Title = workspace.Name ?? Resources.Workspaces_Workspace,
Body = body,
Metadata = BuildAppMetadata(workspace),
};
@@ -68,7 +77,7 @@ internal sealed partial class WorkspaceListItem : ListItem
var elements = new List<IDetailsElement>();
foreach (var app in workspace.Applications)
{
var appName = string.IsNullOrWhiteSpace(app.Application) ? "App" : app.Application;
var appName = string.IsNullOrWhiteSpace(app.Application) ? Resources.Workspaces_App : app.Application;
var title = string.IsNullOrWhiteSpace(app.Title) ? appName : app.Title;
var tags = new List<ITag>();
@@ -99,19 +108,19 @@ internal sealed partial class WorkspaceListItem : ListItem
if (delta.TotalMinutes < 1)
{
return "just now";
return Resources.Workspaces_JustNow;
}
if (delta.TotalMinutes < 60)
{
return string.Format(CultureInfo.CurrentCulture, "{0} min ago", (int)delta.TotalMinutes);
return string.Format(CultureInfo.CurrentCulture, MinAgoFormat, (int)delta.TotalMinutes);
}
if (delta.TotalHours < 24)
{
return string.Format(CultureInfo.CurrentCulture, "{0} hr ago", (int)delta.TotalHours);
return string.Format(CultureInfo.CurrentCulture, HrAgoFormat, (int)delta.TotalHours);
}
return string.Format(CultureInfo.CurrentCulture, "{0} days ago", (int)delta.TotalDays);
return string.Format(CultureInfo.CurrentCulture, DaysAgoFormat, (int)delta.TotalDays);
}
}

View File

@@ -4,13 +4,16 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
using FancyZonesEditorCommon.Data;
using FancyZonesEditorCommon.Utils;
using ManagedCommon;
using PowerToysExtension.Properties;
using FZPaths = FancyZonesEditorCommon.Data.FancyZonesPaths;
@@ -20,6 +23,15 @@ internal static class FancyZonesDataService
{
private const string ZeroUuid = "{00000000-0000-0000-0000-000000000000}";
private static readonly CompositeFormat ReadMonitorDataFailedFormat = CompositeFormat.Parse(Resources.FancyZones_ReadMonitorDataFailed_Format);
private static readonly CompositeFormat WriteAppliedLayoutsFailedFormat = CompositeFormat.Parse(Resources.FancyZones_WriteAppliedLayoutsFailed_Format);
private static readonly CompositeFormat LayoutAppliedNotifyFailedFormat = CompositeFormat.Parse(Resources.FancyZones_LayoutAppliedNotifyFailed_Format);
private static readonly CompositeFormat TemplateFormat = CompositeFormat.Parse(Resources.FancyZones_Template_Format);
private static readonly CompositeFormat ZonesFormat = CompositeFormat.Parse(Resources.FancyZones_Zones_Format);
private static readonly CompositeFormat CustomGridZonesFormat = CompositeFormat.Parse(Resources.FancyZones_CustomGrid_Zones_Format);
private static readonly CompositeFormat CustomCanvasZonesFormat = CompositeFormat.Parse(Resources.FancyZones_CustomCanvas_Zones_Format);
private static readonly CompositeFormat CustomZonesFormat = CompositeFormat.Parse(Resources.FancyZones_Custom_Zones_Format);
public static bool TryGetMonitors(out IReadOnlyList<FancyZonesMonitorDescriptor> monitors, out string error)
{
monitors = Array.Empty<FancyZonesMonitorDescriptor>();
@@ -31,7 +43,7 @@ internal static class FancyZonesDataService
{
if (!File.Exists(FZPaths.EditorParameters))
{
error = "FancyZones monitor data not found. Open FancyZones Editor once to initialize.";
error = Resources.FancyZones_MonitorDataNotFound;
Logger.LogWarning($"TryGetMonitors: File not found. Path={FZPaths.EditorParameters}");
return false;
}
@@ -43,7 +55,7 @@ internal static class FancyZonesDataService
var editorMonitors = editorParams.Monitors;
if (editorMonitors is null || editorMonitors.Count == 0)
{
error = "No FancyZones monitors found.";
error = Resources.FancyZones_NoFancyZonesMonitorsFound;
Logger.LogWarning($"TryGetMonitors: No monitors in file.");
return false;
}
@@ -56,7 +68,7 @@ internal static class FancyZonesDataService
}
catch (Exception ex)
{
error = $"Failed to read FancyZones monitor data: {ex.Message}";
error = string.Format(CultureInfo.CurrentCulture, ReadMonitorDataFailedFormat, ex.Message);
Logger.LogError($"TryGetMonitors: Exception. Message={ex.Message} Stack={ex.StackTrace}");
return false;
}
@@ -204,7 +216,7 @@ internal static class FancyZonesDataService
}
catch (Exception ex)
{
return (false, $"Failed to write applied layouts: {ex.Message}");
return (false, string.Format(CultureInfo.CurrentCulture, WriteAppliedLayoutsFailedFormat, ex.Message));
}
try
@@ -213,10 +225,10 @@ internal static class FancyZonesDataService
}
catch (Exception ex)
{
return (true, $"Layout applied, but FancyZones could not be notified: {ex.Message}");
return (true, string.Format(CultureInfo.CurrentCulture, LayoutAppliedNotifyFailedFormat, ex.Message));
}
return (true, "Layout applied.");
return (true, Resources.FancyZones_LayoutApplied);
}
private static AppliedLayouts.AppliedLayoutWrapper? FindAppliedLayoutEntry(AppliedLayouts.AppliedLayoutsListWrapper file, EditorParameters.NativeMonitorDataWrapper monitor, string virtualDesktopId)
@@ -293,8 +305,8 @@ internal static class FancyZonesDataService
var zoneCount = type.Equals("blank", StringComparison.OrdinalIgnoreCase)
? 0
: template.ZoneCount > 0 ? template.ZoneCount : 3;
var title = $"Template: {type}";
var subtitle = $"{zoneCount} zones";
var title = string.Format(CultureInfo.CurrentCulture, TemplateFormat, type);
var subtitle = string.Format(CultureInfo.CurrentCulture, ZonesFormat, zoneCount);
yield return new FancyZonesLayoutDescriptor
{
@@ -357,9 +369,9 @@ internal static class FancyZonesDataService
var title = custom.Name.Trim();
var subtitle = customType switch
{
"grid" => $"Custom grid \u2022 {applied.ZoneCount} zones",
"canvas" => $"Custom canvas \u2022 {applied.ZoneCount} zones",
_ => $"Custom \u2022 {applied.ZoneCount} zones",
"grid" => string.Format(CultureInfo.CurrentCulture, CustomGridZonesFormat, applied.ZoneCount),
"canvas" => string.Format(CultureInfo.CurrentCulture, CustomCanvasZonesFormat, applied.ZoneCount),
_ => string.Format(CultureInfo.CurrentCulture, CustomZonesFormat, applied.ZoneCount),
};
yield return new FancyZonesLayoutDescriptor

View File

@@ -61,6 +61,21 @@
<ProjectReference Include="..\..\..\Workspaces\Workspaces.ModuleServices\Workspaces.ModuleServices.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<PropertyGroup>
<!-- Always build/publish AOT so the extension ships as native code -->
<SelfContained>true</SelfContained>

View File

@@ -7,6 +7,7 @@ using Common.UI;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Modules;
@@ -22,8 +23,8 @@ internal sealed class AdvancedPasteModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new OpenAdvancedPasteCommand())
{
Title = "Open Advanced Paste",
Subtitle = "Launch the Advanced Paste UI",
Title = Resources.AdvancedPaste_Open_Title,
Subtitle = Resources.AdvancedPaste_Open_Subtitle,
Icon = icon,
};
}
@@ -31,7 +32,7 @@ internal sealed class AdvancedPasteModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Advanced Paste settings",
Subtitle = Resources.AdvancedPaste_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class AlwaysOnTopModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.AlwaysOnTop, title))
{
Title = title,
Subtitle = "Open Always On Top settings",
Subtitle = Resources.AlwaysOnTop_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -10,6 +10,7 @@ using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Pages;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Modules;
@@ -26,7 +27,7 @@ internal sealed class AwakeModuleCommandProvider : ModuleCommandProvider
items.Add(new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Awake settings",
Subtitle = Resources.Awake_Settings_Subtitle,
Icon = moduleIcon,
});
@@ -49,40 +50,40 @@ internal sealed class AwakeModuleCommandProvider : ModuleCommandProvider
statusItem = new ListItem(new CommandItem(refreshCommand))
{
Title = "Awake: Current status",
Title = Resources.Awake_Status_Title,
Subtitle = AwakeStatusService.GetStatusSubtitle(),
Icon = icon,
};
items.Add(statusItem);
items.Add(new ListItem(new StartAwakeCommand("Awake: Keep awake indefinitely", () => AwakeService.Instance.SetIndefiniteAsync(), "Awake set to indefinite", refreshStatus))
items.Add(new ListItem(new StartAwakeCommand(Resources.Awake_KeepIndefinite_Title, () => AwakeService.Instance.SetIndefiniteAsync(), Resources.Awake_SetIndefinite_Toast, refreshStatus))
{
Title = "Awake: Keep awake indefinitely",
Subtitle = "Run Awake in indefinite mode",
Title = Resources.Awake_KeepIndefinite_Title,
Subtitle = Resources.Awake_KeepIndefinite_Subtitle,
Icon = icon,
});
items.Add(new ListItem(new StartAwakeCommand("Awake: Keep awake for 30 minutes", () => AwakeService.Instance.SetTimedAsync(30), "Awake set for 30 minutes", refreshStatus))
items.Add(new ListItem(new StartAwakeCommand(Resources.Awake_Keep30Min_Title, () => AwakeService.Instance.SetTimedAsync(30), Resources.Awake_Set30Min_Toast, refreshStatus))
{
Title = "Awake: Keep awake for 30 minutes",
Subtitle = "Run Awake timed for 30 minutes",
Title = Resources.Awake_Keep30Min_Title,
Subtitle = Resources.Awake_Keep30Min_Subtitle,
Icon = icon,
});
items.Add(new ListItem(new StartAwakeCommand("Awake: Keep awake for 1 hour", () => AwakeService.Instance.SetTimedAsync(60), "Awake set for 1 hour", refreshStatus))
items.Add(new ListItem(new StartAwakeCommand(Resources.Awake_Keep1Hour_Title, () => AwakeService.Instance.SetTimedAsync(60), Resources.Awake_Set1Hour_Toast, refreshStatus))
{
Title = "Awake: Keep awake for 1 hour",
Subtitle = "Run Awake timed for 1 hour",
Title = Resources.Awake_Keep1Hour_Title,
Subtitle = Resources.Awake_Keep1Hour_Subtitle,
Icon = icon,
});
items.Add(new ListItem(new StartAwakeCommand("Awake: Keep awake for 2 hours", () => AwakeService.Instance.SetTimedAsync(120), "Awake set for 2 hours", refreshStatus))
items.Add(new ListItem(new StartAwakeCommand(Resources.Awake_Keep2Hours_Title, () => AwakeService.Instance.SetTimedAsync(120), Resources.Awake_Set2Hours_Toast, refreshStatus))
{
Title = "Awake: Keep awake for 2 hours",
Subtitle = "Run Awake timed for 2 hours",
Title = Resources.Awake_Keep2Hours_Title,
Subtitle = Resources.Awake_Keep2Hours_Subtitle,
Icon = icon,
});
items.Add(new ListItem(new StopAwakeCommand(refreshStatus))
{
Title = "Awake: Turn off",
Subtitle = "Switch Awake back to Off",
Title = Resources.Awake_TurnOff_Title,
Subtitle = Resources.Awake_TurnOff_Subtitle,
Icon = icon,
});

View File

@@ -8,6 +8,7 @@ using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Pages;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Modules;
@@ -24,7 +25,7 @@ internal sealed class ColorPickerModuleCommandProvider : ModuleCommandProvider
commands.Add(new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Color Picker settings",
Subtitle = Resources.ColorPicker_Settings_Subtitle,
Icon = icon,
});
@@ -36,15 +37,15 @@ internal sealed class ColorPickerModuleCommandProvider : ModuleCommandProvider
// Direct entries in the module list.
commands.Add(new ListItem(new OpenColorPickerCommand())
{
Title = "Open Color Picker",
Subtitle = "Start a color pick session",
Title = Resources.ColorPicker_Open_Title,
Subtitle = Resources.ColorPicker_Open_Subtitle,
Icon = icon,
});
commands.Add(new ListItem(new CommandItem(new ColorPickerSavedColorsPage()))
{
Title = "Saved colors",
Subtitle = "Browse and copy saved colors",
Title = Resources.ColorPicker_SavedColors_Title,
Subtitle = Resources.ColorPicker_SavedColors_Subtitle,
Icon = icon,
});

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class CommandNotFoundModuleCommandProvider : ModuleCommandProvid
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.CmdNotFound, title))
{
Title = title,
Subtitle = "Open Command Not Found settings",
Subtitle = Resources.CommandNotFound_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -22,15 +23,15 @@ internal sealed class CropAndLockModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new CropAndLockReparentCommand())
{
Title = "Crop and Lock (Reparent)",
Subtitle = "Create a cropped reparented window",
Title = Resources.CropAndLock_Reparent_Title,
Subtitle = Resources.CropAndLock_Reparent_Subtitle,
Icon = icon,
};
yield return new ListItem(new CropAndLockThumbnailCommand())
{
Title = "Crop and Lock (Thumbnail)",
Subtitle = "Create a cropped thumbnail window",
Title = Resources.CropAndLock_Thumbnail_Title,
Subtitle = Resources.CropAndLock_Thumbnail_Subtitle,
Icon = icon,
};
}
@@ -38,7 +39,7 @@ internal sealed class CropAndLockModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Crop and Lock settings",
Subtitle = Resources.CropAndLock_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -22,15 +23,15 @@ internal sealed class EnvironmentVariablesModuleCommandProvider : ModuleCommandP
{
yield return new ListItem(new OpenEnvironmentVariablesCommand())
{
Title = "Open Environment Variables",
Subtitle = "Launch Environment Variables editor",
Title = Resources.EnvironmentVariables_Open_Title,
Subtitle = Resources.EnvironmentVariables_Open_Subtitle,
Icon = icon,
};
yield return new ListItem(new OpenEnvironmentVariablesAdminCommand())
{
Title = "Open Environment Variables (Admin)",
Subtitle = "Launch Environment Variables editor as admin",
Title = Resources.EnvironmentVariables_OpenAdmin_Title,
Subtitle = Resources.EnvironmentVariables_OpenAdmin_Subtitle,
Icon = icon,
};
}
@@ -38,7 +39,7 @@ internal sealed class EnvironmentVariablesModuleCommandProvider : ModuleCommandP
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Environment Variables settings",
Subtitle = Resources.EnvironmentVariables_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -7,6 +7,7 @@ using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Pages;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -23,22 +24,22 @@ internal sealed class FancyZonesModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new CommandItem(new FancyZonesLayoutsPage()))
{
Title = "FancyZones: Layouts",
Subtitle = "Apply a layout to all monitors or a specific monitor",
Title = Resources.FancyZones_Layouts_Title,
Subtitle = Resources.FancyZones_Layouts_Subtitle,
Icon = icon,
};
yield return new ListItem(new CommandItem(new FancyZonesMonitorsPage()))
{
Title = "FancyZones: Monitors",
Subtitle = "Identify monitors and apply layouts",
Title = Resources.FancyZones_Monitors_Title,
Subtitle = Resources.FancyZones_Monitors_Subtitle,
Icon = icon,
};
yield return new ListItem(new OpenFancyZonesEditorCommand())
{
Title = "Open FancyZones Editor",
Subtitle = "Launch layout editor",
Title = Resources.FancyZones_OpenEditor_Title,
Subtitle = Resources.FancyZones_OpenEditor_Subtitle,
Icon = icon,
};
}
@@ -46,7 +47,7 @@ internal sealed class FancyZonesModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open FancyZones settings",
Subtitle = Resources.FancyZones_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class FileExplorerAddonsModuleCommandProvider : ModuleCommandPro
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.FileExplorer, title))
{
Title = title,
Subtitle = "Open File Explorer add-ons settings",
Subtitle = Resources.FileExplorerAddons_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class FileLocksmithModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.FileLocksmith, title))
{
Title = title,
Subtitle = "Open File Locksmith settings",
Subtitle = Resources.FileLocksmith_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -22,15 +23,15 @@ internal sealed class HostsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new OpenHostsEditorCommand())
{
Title = "Open Hosts File Editor",
Subtitle = "Launch Hosts File Editor",
Title = Resources.Hosts_Open_Title,
Subtitle = Resources.Hosts_Open_Subtitle,
Icon = icon,
};
yield return new ListItem(new OpenHostsEditorAdminCommand())
{
Title = "Open Hosts File Editor (Admin)",
Subtitle = "Launch Hosts File Editor as admin",
Title = Resources.Hosts_OpenAdmin_Title,
Subtitle = Resources.Hosts_OpenAdmin_Subtitle,
Icon = icon,
};
}
@@ -38,7 +39,7 @@ internal sealed class HostsModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Hosts File Editor settings",
Subtitle = Resources.Hosts_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class ImageResizerModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.ImageResizer, title))
{
Title = title,
Subtitle = "Open Image Resizer settings",
Subtitle = Resources.ImageResizer_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class KeyboardManagerModuleCommandProvider : ModuleCommandProvid
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.KBM, title))
{
Title = title,
Subtitle = "Open Keyboard Manager settings",
Subtitle = Resources.KeyboardManager_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -24,8 +25,8 @@ internal sealed class LightSwitchModuleCommandProvider : ModuleCommandProvider
{
items.Add(new ListItem(new ToggleLightSwitchCommand())
{
Title = "Toggle Light Switch",
Subtitle = "Toggle system/apps theme immediately",
Title = Resources.LightSwitch_Toggle_Title,
Subtitle = Resources.LightSwitch_Toggle_Subtitle,
Icon = icon,
});
}
@@ -33,7 +34,7 @@ internal sealed class LightSwitchModuleCommandProvider : ModuleCommandProvider
items.Add(new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Light Switch settings",
Subtitle = Resources.LightSwitch_Settings_Subtitle,
Icon = icon,
});

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -22,8 +23,8 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleFindMyMouseCommand())
{
Title = "Trigger Find My Mouse",
Subtitle = "Focus the mouse pointer",
Title = Resources.MouseUtils_FindMyMouse_Title,
Subtitle = Resources.MouseUtils_FindMyMouse_Subtitle,
Icon = icon,
};
}
@@ -32,8 +33,8 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleMouseHighlighterCommand())
{
Title = "Toggle Mouse Highlighter",
Subtitle = "Highlight mouse clicks",
Title = Resources.MouseUtils_Highlighter_Title,
Subtitle = Resources.MouseUtils_Highlighter_Subtitle,
Icon = icon,
};
}
@@ -42,8 +43,8 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleMouseCrosshairsCommand())
{
Title = "Toggle Mouse Crosshairs",
Subtitle = "Enable or disable pointer crosshairs",
Title = Resources.MouseUtils_Crosshairs_Title,
Subtitle = Resources.MouseUtils_Crosshairs_Subtitle,
Icon = icon,
};
}
@@ -52,8 +53,8 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleCursorWrapCommand())
{
Title = "Toggle Cursor Wrap",
Subtitle = "Wrap the cursor across monitor edges",
Title = Resources.MouseUtils_CursorWrap_Title,
Subtitle = Resources.MouseUtils_CursorWrap_Subtitle,
Icon = icon,
};
}
@@ -62,8 +63,8 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ShowMouseJumpPreviewCommand())
{
Title = "Show Mouse Jump Preview",
Subtitle = "Jump the pointer to a target",
Title = Resources.MouseUtils_MouseJump_Title,
Subtitle = Resources.MouseUtils_MouseJump_Subtitle,
Icon = icon,
};
}
@@ -71,7 +72,7 @@ internal sealed class MouseUtilsModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Mouse Utilities settings",
Subtitle = Resources.MouseUtils_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class MouseWithoutBordersModuleCommandProvider : ModuleCommandPr
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.MouseWithoutBorders, title))
{
Title = title,
Subtitle = "Open Mouse Without Borders settings",
Subtitle = Resources.MouseWithoutBorders_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class NewPlusModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.NewPlus, title))
{
Title = title,
Subtitle = "Open New+ settings",
Subtitle = Resources.NewPlus_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class PeekModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.Peek, title))
{
Title = title,
Subtitle = "Open Peek settings",
Subtitle = Resources.Peek_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class PowerRenameModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.PowerRename, title))
{
Title = title,
Subtitle = "Open PowerRename settings",
Subtitle = Resources.PowerRename_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class PowerToysRunModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.PowerLauncher, title))
{
Title = title,
Subtitle = "Open PowerToys Run settings",
Subtitle = Resources.PowerToysRun_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -20,7 +21,7 @@ internal sealed class QuickAccentModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(SettingsWindow.PowerAccent, title))
{
Title = title,
Subtitle = "Open Quick Accent settings",
Subtitle = Resources.QuickAccent_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -22,8 +23,8 @@ internal sealed class RegistryPreviewModuleCommandProvider : ModuleCommandProvid
{
yield return new ListItem(new OpenRegistryPreviewCommand())
{
Title = "Open Registry Preview",
Subtitle = "Launch Registry Preview",
Title = Resources.RegistryPreview_Open_Title,
Subtitle = Resources.RegistryPreview_Open_Subtitle,
Icon = icon,
};
}
@@ -31,7 +32,7 @@ internal sealed class RegistryPreviewModuleCommandProvider : ModuleCommandProvid
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Registry Preview settings",
Subtitle = Resources.RegistryPreview_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -22,8 +23,8 @@ internal sealed class ScreenRulerModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleScreenRulerCommand())
{
Title = "Toggle Screen Ruler",
Subtitle = "Start or close Screen Ruler",
Title = Resources.ScreenRuler_Toggle_Title,
Subtitle = Resources.ScreenRuler_Toggle_Subtitle,
Icon = icon,
};
}
@@ -31,7 +32,7 @@ internal sealed class ScreenRulerModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Screen Ruler settings",
Subtitle = Resources.ScreenRuler_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -22,8 +23,8 @@ internal sealed class ShortcutGuideModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleShortcutGuideCommand())
{
Title = "Toggle Shortcut Guide",
Subtitle = "Show or hide Shortcut Guide",
Title = Resources.ShortcutGuide_Toggle_Title,
Subtitle = Resources.ShortcutGuide_Toggle_Subtitle,
Icon = icon,
};
}
@@ -31,7 +32,7 @@ internal sealed class ShortcutGuideModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Shortcut Guide settings",
Subtitle = Resources.ShortcutGuide_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -22,8 +23,8 @@ internal sealed class TextExtractorModuleCommandProvider : ModuleCommandProvider
{
yield return new ListItem(new ToggleTextExtractorCommand())
{
Title = "Toggle Text Extractor",
Subtitle = "Start or close Text Extractor",
Title = Resources.TextExtractor_Toggle_Title,
Subtitle = Resources.TextExtractor_Toggle_Subtitle,
Icon = icon,
};
}
@@ -31,7 +32,7 @@ internal sealed class TextExtractorModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Text Extractor settings",
Subtitle = Resources.TextExtractor_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -7,6 +7,7 @@ using Common.UI;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using Workspaces.ModuleServices;
using WorkspacesCsharpLibrary.Data;
@@ -25,7 +26,7 @@ internal sealed class WorkspacesModuleCommandProvider : ModuleCommandProvider
items.Add(new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open Workspaces settings",
Subtitle = Resources.Workspaces_Settings_Subtitle,
Icon = moduleIcon,
});
@@ -37,8 +38,8 @@ internal sealed class WorkspacesModuleCommandProvider : ModuleCommandProvider
// Settings entry plus common actions.
items.Add(new ListItem(new OpenWorkspaceEditorCommand())
{
Title = "Workspaces: Open editor",
Subtitle = "Create or edit workspaces",
Title = Resources.Workspaces_OpenEditor_Title,
Subtitle = Resources.Workspaces_OpenEditor_Subtitle,
Icon = icon,
});

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
using static Common.UI.SettingsDeepLink;
namespace PowerToysExtension.Modules;
@@ -21,40 +22,40 @@ internal sealed class ZoomItModuleCommandProvider : ModuleCommandProvider
if (ModuleEnablementService.IsModuleEnabled(module))
{
// Action commands via ZoomIt IPC
yield return new ListItem(new ZoomItActionCommand("zoom", "ZoomIt: Zoom"))
yield return new ListItem(new ZoomItActionCommand("zoom", Resources.ZoomIt_Zoom_Title))
{
Title = "ZoomIt: Zoom",
Subtitle = "Enter zoom mode",
Title = Resources.ZoomIt_Zoom_Title,
Subtitle = Resources.ZoomIt_Zoom_Subtitle,
Icon = icon,
};
yield return new ListItem(new ZoomItActionCommand("draw", "ZoomIt: Draw"))
yield return new ListItem(new ZoomItActionCommand("draw", Resources.ZoomIt_Draw_Title))
{
Title = "ZoomIt: Draw",
Subtitle = "Enter drawing mode",
Title = Resources.ZoomIt_Draw_Title,
Subtitle = Resources.ZoomIt_Draw_Subtitle,
Icon = icon,
};
yield return new ListItem(new ZoomItActionCommand("break", "ZoomIt: Break"))
yield return new ListItem(new ZoomItActionCommand("break", Resources.ZoomIt_Break_Title))
{
Title = "ZoomIt: Break",
Subtitle = "Enter break timer",
Title = Resources.ZoomIt_Break_Title,
Subtitle = Resources.ZoomIt_Break_Subtitle,
Icon = icon,
};
yield return new ListItem(new ZoomItActionCommand("liveZoom", "ZoomIt: Live Zoom"))
yield return new ListItem(new ZoomItActionCommand("liveZoom", Resources.ZoomIt_LiveZoom_Title))
{
Title = "ZoomIt: Live Zoom",
Subtitle = "Toggle live zoom",
Title = Resources.ZoomIt_LiveZoom_Title,
Subtitle = Resources.ZoomIt_LiveZoom_Subtitle,
Icon = icon,
};
yield return new ListItem(new ZoomItActionCommand("snip", "ZoomIt: Snip"))
yield return new ListItem(new ZoomItActionCommand("snip", Resources.ZoomIt_Snip_Title))
{
Title = "ZoomIt: Snip",
Subtitle = "Enter snip mode",
Title = Resources.ZoomIt_Snip_Title,
Subtitle = Resources.ZoomIt_Snip_Subtitle,
Icon = icon,
};
yield return new ListItem(new ZoomItActionCommand("record", "ZoomIt: Record"))
yield return new ListItem(new ZoomItActionCommand("record", Resources.ZoomIt_Record_Title))
{
Title = "ZoomIt: Record",
Subtitle = "Start recording",
Title = Resources.ZoomIt_Record_Title,
Subtitle = Resources.ZoomIt_Record_Subtitle,
Icon = icon,
};
}
@@ -62,7 +63,7 @@ internal sealed class ZoomItModuleCommandProvider : ModuleCommandProvider
yield return new ListItem(new OpenInSettingsCommand(module, title))
{
Title = title,
Subtitle = "Open ZoomIt settings",
Subtitle = Resources.ZoomIt_Settings_Subtitle,
Icon = icon,
};
}

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Globalization;
using System.Linq;
using System.Text;
using ColorPicker.ModuleServices;
@@ -10,24 +11,27 @@ using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
internal sealed partial class ColorPickerSavedColorsPage : DynamicListPage
{
private static readonly CompositeFormat NoMatchingSavedColorsFormat = CompositeFormat.Parse(Resources.ColorPicker_NoMatchingSavedColors_Subtitle);
private readonly CommandItem _emptyContent;
public ColorPickerSavedColorsPage()
{
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("ColorPicker.png");
Title = "Saved colors";
Title = Resources.ColorPicker_SavedColors_Title;
Name = "ColorPickerSavedColors";
Id = "com.microsoft.powertoys.colorpicker.savedColors";
_emptyContent = new CommandItem()
{
Title = "No saved colors",
Subtitle = "Pick a color first, then try again.",
Title = Resources.ColorPicker_NoSavedColors_Title,
Subtitle = Resources.ColorPicker_NoSavedColors_Subtitle,
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("ColorPicker.png"),
};
@@ -70,8 +74,8 @@ internal sealed partial class ColorPickerSavedColorsPage : DynamicListPage
public override void UpdateSearchText(string oldSearch, string newSearch)
{
_emptyContent.Subtitle = string.IsNullOrWhiteSpace(newSearch)
? "Pick a color first, then try again."
: $"No saved colors matching '{newSearch}'";
? Resources.ColorPicker_NoSavedColors_Subtitle
: string.Format(CultureInfo.CurrentCulture, NoMatchingSavedColorsFormat, newSearch);
RaiseItemsChanged(0);
}

View File

@@ -11,6 +11,7 @@ using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
@@ -21,13 +22,13 @@ internal sealed partial class FancyZonesLayoutsPage : DynamicListPage
public FancyZonesLayoutsPage()
{
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png");
Name = Title = "FancyZones Layouts";
Name = Title = Resources.FancyZones_Layouts_Title;
Id = "com.microsoft.cmdpal.powertoys.fancyzones.layouts";
_emptyMessage = new CommandItem()
{
Title = "No layouts found",
Subtitle = "Open FancyZones Editor once to initialize layouts.",
Title = Resources.FancyZones_NoLayoutsFound_Title,
Subtitle = Resources.FancyZones_NoLayoutsFound_Subtitle,
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png"),
};
EmptyContent = _emptyMessage;

View File

@@ -4,16 +4,21 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
internal sealed partial class FancyZonesMonitorLayoutPickerPage : DynamicListPage
{
private static readonly CompositeFormat SetActiveLayoutForFormat = CompositeFormat.Parse(Resources.FancyZones_SetActiveLayoutFor_Format);
private readonly FancyZonesMonitorDescriptor _monitor;
private readonly CommandItem _emptyMessage;
@@ -21,13 +26,13 @@ internal sealed partial class FancyZonesMonitorLayoutPickerPage : DynamicListPag
{
_monitor = monitor;
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png");
Name = Title = $"Set active layout for {_monitor.Title}";
Name = Title = string.Format(CultureInfo.CurrentCulture, SetActiveLayoutForFormat, _monitor.Title);
Id = $"com.microsoft.cmdpal.powertoys.fancyzones.monitor.{_monitor.Index}.layouts";
_emptyMessage = new CommandItem()
{
Title = "No layouts found",
Subtitle = "Open FancyZones Editor once to initialize layouts.",
Title = Resources.FancyZones_NoLayoutsFound_Title,
Subtitle = Resources.FancyZones_NoLayoutsFound_Subtitle,
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png"),
};
EmptyContent = _emptyMessage;

View File

@@ -4,26 +4,31 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
internal sealed partial class FancyZonesMonitorsPage : DynamicListPage
{
private static readonly CompositeFormat CurrentLayoutFormat = CompositeFormat.Parse(Resources.FancyZones_CurrentLayout_Format);
private readonly CommandItem _emptyMessage;
public FancyZonesMonitorsPage()
{
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png");
Name = Title = "FancyZones Monitors";
Name = Title = Resources.FancyZones_Monitors_Title;
Id = "com.microsoft.cmdpal.powertoys.fancyzones.monitors";
_emptyMessage = new CommandItem()
{
Title = "No monitors found",
Subtitle = "Open FancyZones Editor once to initialize monitor data.",
Title = Resources.FancyZones_NoMonitorsFound_Title,
Subtitle = Resources.FancyZones_NoMonitorsFound_Subtitle,
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("FancyZones.png"),
};
EmptyContent = _emptyMessage;
@@ -55,8 +60,8 @@ internal sealed partial class FancyZonesMonitorsPage : DynamicListPage
}
var layoutDescription = FancyZonesDataService.TryGetAppliedLayoutForMonitor(monitor.Data, out var applied) && applied is not null
? $"Current layout: {applied.Value.Type}"
: "Current layout: unknown";
? string.Format(CultureInfo.CurrentCulture, CurrentLayoutFormat, applied.Value.Type)
: Resources.FancyZones_CurrentLayout_Unknown;
var item = new FancyZonesMonitorListItem(monitor, layoutDescription, monitorIcon);
items.Add(item);

View File

@@ -6,6 +6,7 @@ using Awake.ModuleServices;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Commands;
using PowerToysExtension.Properties;
namespace PowerToysExtension;
@@ -14,32 +15,32 @@ internal sealed partial class PowerToysExtensionPage : ListPage
public PowerToysExtensionPage()
{
Icon = Helpers.PowerToysResourcesHelper.IconFromSettingsIcon("PowerToys.png");
Title = "PowerToys";
Name = "PowerToys commands";
Title = Resources.PowerToys_DisplayName;
Name = Resources.PowerToysExtension_CommandsName;
}
public override IListItem[] GetItems()
{
return [
new ListItem(new LaunchModuleCommand("PowerToys", executableName: "PowerToys.exe", displayName: "Open PowerToys"))
new ListItem(new LaunchModuleCommand("PowerToys", executableName: "PowerToys.exe", displayName: Resources.PowerToysExtension_OpenPowerToys_Title))
{
Title = "Open PowerToys",
Subtitle = "Launch the PowerToys shell",
Title = Resources.PowerToysExtension_OpenPowerToys_Title,
Subtitle = Resources.PowerToysExtension_OpenPowerToys_Subtitle,
},
new ListItem(new OpenPowerToysSettingsCommand("PowerToys", "General"))
{
Title = "Open PowerToys settings",
Subtitle = "Open the main PowerToys settings window",
Title = Resources.PowerToysExtension_OpenSettings_Title,
Subtitle = Resources.PowerToysExtension_OpenSettings_Subtitle,
},
new ListItem(new OpenPowerToysSettingsCommand("Workspaces", "Workspaces"))
{
Title = "Open Workspaces settings",
Subtitle = "Jump directly to Workspaces settings",
Title = Resources.PowerToysExtension_OpenWorkspacesSettings_Title,
Subtitle = Resources.PowerToysExtension_OpenWorkspacesSettings_Subtitle,
},
new ListItem(new OpenWorkspaceEditorCommand())
{
Title = "Open Workspaces editor",
Subtitle = "Launch the Workspaces editor",
Title = Resources.PowerToysExtension_OpenWorkspacesEditor_Title,
Subtitle = Resources.PowerToysExtension_OpenWorkspacesEditor_Subtitle,
},
];
}

View File

@@ -5,6 +5,7 @@
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension.Pages;
@@ -15,13 +16,13 @@ internal sealed partial class PowerToysListPage : ListPage
public PowerToysListPage()
{
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("PowerToys.png");
Name = Title = "PowerToys";
Name = Title = Resources.PowerToys_DisplayName;
Id = "com.microsoft.cmdpal.powertoys";
SettingsChangeNotifier.SettingsChanged += OnSettingsChanged;
_empty = new CommandItem()
{
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("PowerToys.png"),
Title = "No matching module found",
Title = Resources.PowerToys_NoMatchingModule,
Subtitle = SearchText,
};
EmptyContent = _empty;

View File

@@ -7,6 +7,7 @@ using ManagedCommon;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension;
@@ -14,7 +15,7 @@ public sealed partial class PowerToysCommandsProvider : CommandProvider
{
public PowerToysCommandsProvider()
{
DisplayName = "PowerToys";
DisplayName = Resources.PowerToys_DisplayName;
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("PowerToys.png");
}
@@ -22,8 +23,8 @@ public sealed partial class PowerToysCommandsProvider : CommandProvider
[
new CommandItem(new Pages.PowerToysListPage())
{
Title = "PowerToys",
Subtitle = "PowerToys commands and settings",
Title = Resources.PowerToys_DisplayName,
Subtitle = Resources.PowerToys_Subtitle,
}
];

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using PowerToysExtension.Helpers;
using PowerToysExtension.Properties;
namespace PowerToysExtension;
@@ -15,13 +16,13 @@ public partial class PowerToysExtensionCommandsProvider : CommandProvider
public PowerToysExtensionCommandsProvider()
{
DisplayName = "PowerToys";
DisplayName = Resources.PowerToys_DisplayName;
Icon = PowerToysResourcesHelper.IconFromSettingsIcon("PowerToys.png");
_commands = [
new CommandItem(new Pages.PowerToysListPage())
{
Title = "PowerToys",
Subtitle = "PowerToys commands and settings",
Title = Resources.PowerToys_DisplayName,
Subtitle = Resources.PowerToys_Subtitle,
},
];
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,630 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<!-- PowerToys CommandsProvider -->
<data name="PowerToys_DisplayName" xml:space="preserve">
<value>PowerToys</value>
</data>
<data name="PowerToys_Subtitle" xml:space="preserve">
<value>PowerToys commands and settings</value>
</data>
<data name="PowerToys_NoMatchingModule" xml:space="preserve">
<value>No matching module found</value>
</data>
<!-- PowerToys Extension Page -->
<data name="PowerToysExtension_CommandsName" xml:space="preserve">
<value>PowerToys commands</value>
</data>
<data name="PowerToysExtension_OpenPowerToys_Title" xml:space="preserve">
<value>Open PowerToys</value>
</data>
<data name="PowerToysExtension_OpenPowerToys_Subtitle" xml:space="preserve">
<value>Launch the PowerToys shell</value>
</data>
<data name="PowerToysExtension_OpenSettings_Title" xml:space="preserve">
<value>Open PowerToys settings</value>
</data>
<data name="PowerToysExtension_OpenSettings_Subtitle" xml:space="preserve">
<value>Open the main PowerToys settings window</value>
</data>
<data name="PowerToysExtension_OpenWorkspacesSettings_Title" xml:space="preserve">
<value>Open Workspaces settings</value>
</data>
<data name="PowerToysExtension_OpenWorkspacesSettings_Subtitle" xml:space="preserve">
<value>Jump directly to Workspaces settings</value>
</data>
<data name="PowerToysExtension_OpenWorkspacesEditor_Title" xml:space="preserve">
<value>Open Workspaces editor</value>
</data>
<data name="PowerToysExtension_OpenWorkspacesEditor_Subtitle" xml:space="preserve">
<value>Launch the Workspaces editor</value>
</data>
<!-- Advanced Paste Module -->
<data name="AdvancedPaste_Open_Title" xml:space="preserve">
<value>Open Advanced Paste</value>
</data>
<data name="AdvancedPaste_Open_Subtitle" xml:space="preserve">
<value>Launch the Advanced Paste UI</value>
</data>
<data name="AdvancedPaste_Settings_Subtitle" xml:space="preserve">
<value>Open Advanced Paste settings</value>
</data>
<!-- Always On Top Module -->
<data name="AlwaysOnTop_Settings_Subtitle" xml:space="preserve">
<value>Open Always On Top settings</value>
</data>
<!-- Awake Module -->
<data name="Awake_Settings_Subtitle" xml:space="preserve">
<value>Open Awake settings</value>
</data>
<data name="Awake_Status_Title" xml:space="preserve">
<value>Awake: Current status</value>
</data>
<data name="Awake_KeepIndefinite_Title" xml:space="preserve">
<value>Awake: Keep awake indefinitely</value>
</data>
<data name="Awake_KeepIndefinite_Subtitle" xml:space="preserve">
<value>Run Awake in indefinite mode</value>
</data>
<data name="Awake_Keep30Min_Title" xml:space="preserve">
<value>Awake: Keep awake for 30 minutes</value>
</data>
<data name="Awake_Keep30Min_Subtitle" xml:space="preserve">
<value>Run Awake timed for 30 minutes</value>
</data>
<data name="Awake_Keep1Hour_Title" xml:space="preserve">
<value>Awake: Keep awake for 1 hour</value>
</data>
<data name="Awake_Keep1Hour_Subtitle" xml:space="preserve">
<value>Run Awake timed for 1 hour</value>
</data>
<data name="Awake_Keep2Hours_Title" xml:space="preserve">
<value>Awake: Keep awake for 2 hours</value>
</data>
<data name="Awake_Keep2Hours_Subtitle" xml:space="preserve">
<value>Run Awake timed for 2 hours</value>
</data>
<data name="Awake_TurnOff_Title" xml:space="preserve">
<value>Awake: Turn off</value>
</data>
<data name="Awake_TurnOff_Subtitle" xml:space="preserve">
<value>Switch Awake back to Off</value>
</data>
<data name="Awake_SetIndefinite_Toast" xml:space="preserve">
<value>Awake set to indefinite</value>
</data>
<data name="Awake_Set30Min_Toast" xml:space="preserve">
<value>Awake set for 30 minutes</value>
</data>
<data name="Awake_Set1Hour_Toast" xml:space="preserve">
<value>Awake set for 1 hour</value>
</data>
<data name="Awake_Set2Hours_Toast" xml:space="preserve">
<value>Awake set for 2 hours</value>
</data>
<!-- Color Picker Module -->
<data name="ColorPicker_Settings_Subtitle" xml:space="preserve">
<value>Open Color Picker settings</value>
</data>
<data name="ColorPicker_Open_Title" xml:space="preserve">
<value>Open Color Picker</value>
</data>
<data name="ColorPicker_Open_Subtitle" xml:space="preserve">
<value>Start a color pick session</value>
</data>
<data name="ColorPicker_SavedColors_Title" xml:space="preserve">
<value>Saved colors</value>
</data>
<data name="ColorPicker_SavedColors_Subtitle" xml:space="preserve">
<value>Browse and copy saved colors</value>
</data>
<data name="ColorPicker_NoSavedColors_Title" xml:space="preserve">
<value>No saved colors</value>
</data>
<data name="ColorPicker_NoSavedColors_Subtitle" xml:space="preserve">
<value>Pick a color first, then try again.</value>
</data>
<data name="ColorPicker_NoMatchingSavedColors_Subtitle" xml:space="preserve">
<value>No saved colors matching '{0}'</value>
</data>
<!-- Command Not Found Module -->
<data name="CommandNotFound_Settings_Subtitle" xml:space="preserve">
<value>Open Command Not Found settings</value>
</data>
<!-- Crop And Lock Module -->
<data name="CropAndLock_Reparent_Title" xml:space="preserve">
<value>Crop and Lock (Reparent)</value>
</data>
<data name="CropAndLock_Reparent_Subtitle" xml:space="preserve">
<value>Create a cropped reparented window</value>
</data>
<data name="CropAndLock_Thumbnail_Title" xml:space="preserve">
<value>Crop and Lock (Thumbnail)</value>
</data>
<data name="CropAndLock_Thumbnail_Subtitle" xml:space="preserve">
<value>Create a cropped thumbnail window</value>
</data>
<data name="CropAndLock_Settings_Subtitle" xml:space="preserve">
<value>Open Crop and Lock settings</value>
</data>
<!-- Environment Variables Module -->
<data name="EnvironmentVariables_Open_Title" xml:space="preserve">
<value>Open Environment Variables</value>
</data>
<data name="EnvironmentVariables_Open_Subtitle" xml:space="preserve">
<value>Launch Environment Variables editor</value>
</data>
<data name="EnvironmentVariables_OpenAdmin_Title" xml:space="preserve">
<value>Open Environment Variables (Admin)</value>
</data>
<data name="EnvironmentVariables_OpenAdmin_Subtitle" xml:space="preserve">
<value>Launch Environment Variables editor as admin</value>
</data>
<data name="EnvironmentVariables_Settings_Subtitle" xml:space="preserve">
<value>Open Environment Variables settings</value>
</data>
<!-- FancyZones Module -->
<data name="FancyZones_Layouts_Title" xml:space="preserve">
<value>FancyZones: Layouts</value>
</data>
<data name="FancyZones_Layouts_Subtitle" xml:space="preserve">
<value>Apply a layout to all monitors or a specific monitor</value>
</data>
<data name="FancyZones_Monitors_Title" xml:space="preserve">
<value>FancyZones: Monitors</value>
</data>
<data name="FancyZones_Monitors_Subtitle" xml:space="preserve">
<value>Identify monitors and apply layouts</value>
</data>
<data name="FancyZones_OpenEditor_Title" xml:space="preserve">
<value>Open FancyZones Editor</value>
</data>
<data name="FancyZones_OpenEditor_Subtitle" xml:space="preserve">
<value>Launch layout editor</value>
</data>
<data name="FancyZones_Settings_Subtitle" xml:space="preserve">
<value>Open FancyZones settings</value>
</data>
<data name="FancyZones_LayoutsPage_Title" xml:space="preserve">
<value>FancyZones Layouts</value>
</data>
<data name="FancyZones_NoLayoutsFound_Title" xml:space="preserve">
<value>No layouts found</value>
</data>
<data name="FancyZones_NoLayoutsFound_Subtitle" xml:space="preserve">
<value>Open FancyZones Editor once to initialize layouts.</value>
</data>
<data name="FancyZones_ApplyTo_Format" xml:space="preserve">
<value>Apply to {0}</value>
</data>
<data name="FancyZones_MonitorsPage_Title" xml:space="preserve">
<value>FancyZones Monitors</value>
</data>
<data name="FancyZones_NoMonitorsFound_Title" xml:space="preserve">
<value>No monitors found</value>
</data>
<data name="FancyZones_NoMonitorsFound_Subtitle" xml:space="preserve">
<value>Open FancyZones Editor once to initialize monitor data.</value>
</data>
<data name="FancyZones_SetActiveLayout" xml:space="preserve">
<value>Set active layout</value>
</data>
<data name="FancyZones_PickLayoutForMonitor" xml:space="preserve">
<value>Pick a layout for this monitor</value>
</data>
<data name="FancyZones_SetActiveLayoutFor_Format" xml:space="preserve">
<value>Set active layout for {0}</value>
</data>
<data name="FancyZones_CurrentLayout_Format" xml:space="preserve">
<value>Current layout: {0}</value>
</data>
<data name="FancyZones_CurrentLayout_Unknown" xml:space="preserve">
<value>Current layout: unknown</value>
</data>
<data name="FancyZones_Template_Format" xml:space="preserve">
<value>Template: {0}</value>
</data>
<data name="FancyZones_Zones_Format" xml:space="preserve">
<value>{0} zones</value>
</data>
<data name="FancyZones_CustomGrid_Zones_Format" xml:space="preserve">
<value>Custom grid • {0} zones</value>
</data>
<data name="FancyZones_CustomCanvas_Zones_Format" xml:space="preserve">
<value>Custom canvas • {0} zones</value>
</data>
<data name="FancyZones_Custom_Zones_Format" xml:space="preserve">
<value>Custom • {0} zones</value>
</data>
<data name="FancyZones_LayoutApplied" xml:space="preserve">
<value>Layout applied.</value>
</data>
<data name="FancyZones_LayoutAppliedNotifyFailed_Format" xml:space="preserve">
<value>Layout applied, but FancyZones could not be notified: {0}</value>
</data>
<data name="FancyZones_WriteAppliedLayoutsFailed_Format" xml:space="preserve">
<value>Failed to write applied layouts: {0}</value>
</data>
<data name="FancyZones_MonitorDataNotFound" xml:space="preserve">
<value>FancyZones monitor data not found. Open FancyZones Editor once to initialize.</value>
</data>
<data name="FancyZones_NoFancyZonesMonitorsFound" xml:space="preserve">
<value>No FancyZones monitors found.</value>
</data>
<data name="FancyZones_ReadMonitorDataFailed_Format" xml:space="preserve">
<value>Failed to read FancyZones monitor data: {0}</value>
</data>
<!-- File Explorer Addons Module -->
<data name="FileExplorerAddons_Settings_Subtitle" xml:space="preserve">
<value>Open File Explorer add-ons settings</value>
</data>
<!-- File Locksmith Module -->
<data name="FileLocksmith_Settings_Subtitle" xml:space="preserve">
<value>Open File Locksmith settings</value>
</data>
<!-- Hosts Module -->
<data name="Hosts_Open_Title" xml:space="preserve">
<value>Open Hosts File Editor</value>
</data>
<data name="Hosts_Open_Subtitle" xml:space="preserve">
<value>Launch Hosts File Editor</value>
</data>
<data name="Hosts_OpenAdmin_Title" xml:space="preserve">
<value>Open Hosts File Editor (Admin)</value>
</data>
<data name="Hosts_OpenAdmin_Subtitle" xml:space="preserve">
<value>Launch Hosts File Editor as admin</value>
</data>
<data name="Hosts_Settings_Subtitle" xml:space="preserve">
<value>Open Hosts File Editor settings</value>
</data>
<!-- Image Resizer Module -->
<data name="ImageResizer_Settings_Subtitle" xml:space="preserve">
<value>Open Image Resizer settings</value>
</data>
<!-- Keyboard Manager Module -->
<data name="KeyboardManager_Settings_Subtitle" xml:space="preserve">
<value>Open Keyboard Manager settings</value>
</data>
<!-- Light Switch Module -->
<data name="LightSwitch_Toggle_Title" xml:space="preserve">
<value>Light Switch: Toggle theme</value>
</data>
<data name="LightSwitch_Toggle_Subtitle" xml:space="preserve">
<value>Toggle system/apps theme immediately</value>
</data>
<data name="LightSwitch_Settings_Subtitle" xml:space="preserve">
<value>Open Light Switch settings</value>
</data>
<!-- Mouse Utils Module -->
<data name="MouseUtils_FindMyMouse_Title" xml:space="preserve">
<value>Trigger Find My Mouse</value>
</data>
<data name="MouseUtils_FindMyMouse_Subtitle" xml:space="preserve">
<value>Focus the mouse pointer</value>
</data>
<data name="MouseUtils_Highlighter_Title" xml:space="preserve">
<value>Toggle Mouse Highlighter</value>
</data>
<data name="MouseUtils_Highlighter_Subtitle" xml:space="preserve">
<value>Highlight mouse clicks</value>
</data>
<data name="MouseUtils_Crosshairs_Title" xml:space="preserve">
<value>Toggle Mouse Crosshairs</value>
</data>
<data name="MouseUtils_Crosshairs_Subtitle" xml:space="preserve">
<value>Enable or disable pointer crosshairs</value>
</data>
<data name="MouseUtils_CursorWrap_Title" xml:space="preserve">
<value>Toggle Cursor Wrap</value>
</data>
<data name="MouseUtils_CursorWrap_Subtitle" xml:space="preserve">
<value>Wrap the cursor across monitor edges</value>
</data>
<data name="MouseUtils_MouseJump_Title" xml:space="preserve">
<value>Show Mouse Jump Preview</value>
</data>
<data name="MouseUtils_MouseJump_Subtitle" xml:space="preserve">
<value>Jump the pointer to a target</value>
</data>
<data name="MouseUtils_Settings_Subtitle" xml:space="preserve">
<value>Open Mouse Utilities settings</value>
</data>
<!-- Mouse Without Borders Module -->
<data name="MouseWithoutBorders_Settings_Subtitle" xml:space="preserve">
<value>Open Mouse Without Borders settings</value>
</data>
<!-- New+ Module -->
<data name="NewPlus_Settings_Subtitle" xml:space="preserve">
<value>Open New+ settings</value>
</data>
<!-- Peek Module -->
<data name="Peek_Settings_Subtitle" xml:space="preserve">
<value>Open Peek settings</value>
</data>
<!-- PowerRename Module -->
<data name="PowerRename_Settings_Subtitle" xml:space="preserve">
<value>Open PowerRename settings</value>
</data>
<!-- PowerToys Run Module -->
<data name="PowerToysRun_Settings_Subtitle" xml:space="preserve">
<value>Open PowerToys Run settings</value>
</data>
<!-- Quick Accent Module -->
<data name="QuickAccent_Settings_Subtitle" xml:space="preserve">
<value>Open Quick Accent settings</value>
</data>
<!-- Registry Preview Module -->
<data name="RegistryPreview_Open_Title" xml:space="preserve">
<value>Open Registry Preview</value>
</data>
<data name="RegistryPreview_Open_Subtitle" xml:space="preserve">
<value>Launch Registry Preview</value>
</data>
<data name="RegistryPreview_Settings_Subtitle" xml:space="preserve">
<value>Open Registry Preview settings</value>
</data>
<!-- Screen Ruler Module -->
<data name="ScreenRuler_Toggle_Title" xml:space="preserve">
<value>Toggle Screen Ruler</value>
</data>
<data name="ScreenRuler_Toggle_Subtitle" xml:space="preserve">
<value>Start or close Screen Ruler</value>
</data>
<data name="ScreenRuler_Settings_Subtitle" xml:space="preserve">
<value>Open Screen Ruler settings</value>
</data>
<!-- Shortcut Guide Module -->
<data name="ShortcutGuide_Toggle_Title" xml:space="preserve">
<value>Toggle Shortcut Guide</value>
</data>
<data name="ShortcutGuide_Toggle_Subtitle" xml:space="preserve">
<value>Show or hide Shortcut Guide</value>
</data>
<data name="ShortcutGuide_Settings_Subtitle" xml:space="preserve">
<value>Open Shortcut Guide settings</value>
</data>
<!-- Text Extractor Module -->
<data name="TextExtractor_Toggle_Title" xml:space="preserve">
<value>Toggle Text Extractor</value>
</data>
<data name="TextExtractor_Toggle_Subtitle" xml:space="preserve">
<value>Start or close Text Extractor</value>
</data>
<data name="TextExtractor_Settings_Subtitle" xml:space="preserve">
<value>Open Text Extractor settings</value>
</data>
<!-- Workspaces Module -->
<data name="Workspaces_Settings_Subtitle" xml:space="preserve">
<value>Open Workspaces settings</value>
</data>
<data name="Workspaces_OpenEditor_Title" xml:space="preserve">
<value>Workspaces: Open editor</value>
</data>
<data name="Workspaces_OpenEditor_Subtitle" xml:space="preserve">
<value>Create or edit workspaces</value>
</data>
<data name="Workspaces_NoApplications" xml:space="preserve">
<value>No applications</value>
</data>
<data name="Workspaces_Applications_Format" xml:space="preserve">
<value>{0} applications</value>
</data>
<data name="Workspaces_LastLaunched_Format" xml:space="preserve">
<value>Last launched {0}</value>
</data>
<data name="Workspaces_NeverLaunched" xml:space="preserve">
<value>Never launched</value>
</data>
<data name="Workspaces_NoApplicationsInWorkspace" xml:space="preserve">
<value>No applications in this workspace</value>
</data>
<data name="Workspaces_OneApplication" xml:space="preserve">
<value>1 application</value>
</data>
<data name="Workspaces_ApplicationsCount_Format" xml:space="preserve">
<value>{0} applications</value>
</data>
<data name="Workspaces_Workspace" xml:space="preserve">
<value>Workspace</value>
</data>
<data name="Workspaces_App" xml:space="preserve">
<value>App</value>
</data>
<data name="Workspaces_JustNow" xml:space="preserve">
<value>just now</value>
</data>
<data name="Workspaces_MinAgo_Format" xml:space="preserve">
<value>{0} min ago</value>
</data>
<data name="Workspaces_HrAgo_Format" xml:space="preserve">
<value>{0} hr ago</value>
</data>
<data name="Workspaces_DaysAgo_Format" xml:space="preserve">
<value>{0} days ago</value>
</data>
<!-- ZoomIt Module -->
<data name="ZoomIt_Zoom_Title" xml:space="preserve">
<value>ZoomIt: Zoom</value>
</data>
<data name="ZoomIt_Zoom_Subtitle" xml:space="preserve">
<value>Enter zoom mode</value>
</data>
<data name="ZoomIt_Draw_Title" xml:space="preserve">
<value>ZoomIt: Draw</value>
</data>
<data name="ZoomIt_Draw_Subtitle" xml:space="preserve">
<value>Enter drawing mode</value>
</data>
<data name="ZoomIt_Break_Title" xml:space="preserve">
<value>ZoomIt: Break</value>
</data>
<data name="ZoomIt_Break_Subtitle" xml:space="preserve">
<value>Enter break timer</value>
</data>
<data name="ZoomIt_LiveZoom_Title" xml:space="preserve">
<value>ZoomIt: Live Zoom</value>
</data>
<data name="ZoomIt_LiveZoom_Subtitle" xml:space="preserve">
<value>Toggle live zoom</value>
</data>
<data name="ZoomIt_Snip_Title" xml:space="preserve">
<value>ZoomIt: Snip</value>
</data>
<data name="ZoomIt_Snip_Subtitle" xml:space="preserve">
<value>Enter snip mode</value>
</data>
<data name="ZoomIt_Record_Title" xml:space="preserve">
<value>ZoomIt: Record</value>
</data>
<data name="ZoomIt_Record_Subtitle" xml:space="preserve">
<value>Start recording</value>
</data>
<data name="ZoomIt_Settings_Subtitle" xml:space="preserve">
<value>Open ZoomIt settings</value>
</data>
<!-- FancyZones Monitor Details -->
<data name="FancyZones_Monitor" xml:space="preserve">
<value>Monitor</value>
</data>
<data name="FancyZones_Instance" xml:space="preserve">
<value>Instance</value>
</data>
<data name="FancyZones_Serial" xml:space="preserve">
<value>Serial</value>
</data>
<data name="FancyZones_Number" xml:space="preserve">
<value>Number</value>
</data>
<data name="FancyZones_VirtualDesktop" xml:space="preserve">
<value>Virtual desktop</value>
</data>
<data name="FancyZones_WorkArea" xml:space="preserve">
<value>Work area</value>
</data>
<data name="FancyZones_Resolution" xml:space="preserve">
<value>Resolution</value>
</data>
<data name="FancyZones_DPI" xml:space="preserve">
<value>DPI</value>
</data>
<data name="Common_NotAvailable" xml:space="preserve">
<value>N/A</value>
</data>
</root>

View File

@@ -344,19 +344,13 @@ IFACEMETHODIMP CPowerRenameRegEx::PutFlags(_In_ DWORD flags)
IFACEMETHODIMP CPowerRenameRegEx::PutFileTime(_In_ SYSTEMTIME fileTime)
{
union timeunion
{
FILETIME fileTime;
ULARGE_INTEGER ul;
};
FILETIME ft1;
FILETIME ft2;
timeunion ft1;
timeunion ft2;
SystemTimeToFileTime(&m_fileTime, &ft1);
SystemTimeToFileTime(&fileTime, &ft2);
SystemTimeToFileTime(&m_fileTime, &ft1.fileTime);
SystemTimeToFileTime(&fileTime, &ft2.fileTime);
if (ft2.ul.QuadPart != ft1.ul.QuadPart)
if (ft2.dwLowDateTime != ft1.dwLowDateTime || ft2.dwHighDateTime != ft1.dwHighDateTime)
{
m_fileTime = fileTime;
m_useFileTime = true;

View File

@@ -148,16 +148,19 @@ std::optional<std::wstring> dispatch_json_action_to_module(const json::JsonObjec
return result;
}
void send_json_config_to_module(const std::wstring& module_key, const std::wstring& settings)
void send_json_config_to_module(const std::wstring& module_key, const std::wstring& settings, bool hotkeyUpdated)
{
auto moduleIt = modules().find(module_key);
if (moduleIt != modules().end())
{
moduleIt->second->set_config(settings.c_str());
moduleIt->second.remove_hotkey_records();
moduleIt->second.update_hotkeys();
moduleIt->second.UpdateHotkeyEx();
if (hotkeyUpdated)
{
moduleIt->second.remove_hotkey_records();
moduleIt->second.update_hotkeys();
moduleIt->second.UpdateHotkeyEx();
}
}
}
@@ -166,7 +169,22 @@ void dispatch_json_config_to_modules(const json::JsonObject& powertoys_configs)
for (const auto& powertoy_element : powertoys_configs)
{
const auto element = powertoy_element.Value().Stringify();
send_json_config_to_module(powertoy_element.Key().c_str(), element.c_str());
/* As PowerToys Run hotkeys are not registered by the runner, hotkey updates are
* triggered only when hotkey properties change to avoid incorrect conflict detection;
* otherwise, the existing logic remains.
*/
auto settings = powertoy_element.Value().GetObjectW();
bool hotkeyUpdated = true;
if (settings.HasKey(L"properties"))
{
const auto properties = settings.GetNamedObject(L"properties");
// Currently, only PowerToys Run settings use the 'hotkey_changed' property.
json::get(properties, L"hotkey_changed", hotkeyUpdated, true);
}
send_json_config_to_module(powertoy_element.Key().c_str(), element.c_str(), hotkeyUpdated);
}
};

View File

@@ -94,6 +94,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library
[JsonPropertyName("generate_thumbnails_from_files")]
public bool GenerateThumbnailsFromFiles { get; set; }
[JsonPropertyName("hotkey_changed")]
public bool HotkeyChanged { get; set; } = false;
[CmdConfigureIgnoreAttribute]
public HotkeySettings DefaultOpenPowerLauncher => new HotkeySettings(false, false, true, false, 32);

View File

@@ -31,6 +31,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
private bool _enabledStateIsGPOConfigured;
private bool _isEnabled;
private string _searchText;
private bool _hotkeyChanged;
private GeneralSettings GeneralSettingsConfig { get; set; }
@@ -162,6 +163,12 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
// Notify UI of property change
OnPropertyChanged(propertyName);
// Since PowerLauncher registers its hotkeys independently within the module process,
// the runner is notified to update PowerLauncher<65>s hotkeys only when changes occur.
// This prevents incorrect conflict detection results.
settings.Properties.HotkeyChanged = _hotkeyChanged;
_hotkeyChanged = false;
callback(settings);
}
@@ -335,6 +342,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (settings.Properties.OpenPowerLauncher != value)
{
settings.Properties.OpenPowerLauncher = value ?? settings.Properties.DefaultOpenPowerLauncher;
_hotkeyChanged = true;
UpdateSettings();
}
}

View File

@@ -242,6 +242,15 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
// No need to save settings here, the runner will call module interface to save it
// SaveSettingsToFile(settings);
// For PowerToys Run, we should set the 'HotkeyChanged' property here to avoid issue #41468
if (string.Equals(moduleName, PowerLauncherSettings.ModuleName, StringComparison.OrdinalIgnoreCase))
{
if (settings is PowerLauncherSettings powerLauncherSettings)
{
powerLauncherSettings.Properties.HotkeyChanged = true;
}
}
// Send IPC notification using the same format as other ViewModels
SendConfigMSG(settingsConfig, moduleName);
}