Skip to content

Commit 483f7aa

Browse files
craigloewen-msftstefansjfwniels9001joadoumiejaimecbernardo
committed
[NewUtility]Advanced Paste (#23)
Advanced Paste V1 implementation --------- Co-authored-by: Stefan Markovic <[email protected]> Co-authored-by: Niels Laute <[email protected]> Co-authored-by: Jordi Adoumie <[email protected]> Co-authored-by: Stefan Markovic <[email protected]> Co-authored-by: Jaime Bernardo <[email protected]>
1 parent c601a3e commit 483f7aa

File tree

143 files changed

+5550
-748
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+5550
-748
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ body:
4747
multiple: true
4848
options:
4949
- General
50+
- Advanced Paste
5051
- Always on Top
5152
- Awake
5253
- ColorPicker
@@ -64,7 +65,6 @@ body:
6465
- Keyboard Manager
6566
- Mouse Utilities
6667
- Mouse Without Borders
67-
- Paste as Plain Text
6868
- Peek
6969
- PowerRename
7070
- PowerToys Run

.github/ISSUE_TEMPLATE/translation_issue.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ body:
2121
label: Utility with translation issue
2222
options:
2323
- General
24+
- Advanced Paste
2425
- Always on Top
2526
- Awake
2627
- ColorPicker
@@ -38,7 +39,6 @@ body:
3839
- Keyboard Manager
3940
- Mouse Utilities
4041
- Mouse Without Borders
41-
- Paste as Plain Text
4242
- Peek
4343
- PowerRename
4444
- PowerToys Run

.github/actions/spell-check/allow/code.txt

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ WHITEONBLACK
2525

2626
AYUV
2727
bak
28+
Bcl
2829
exa
2930
exabyte
3031
Gbits

.github/actions/spell-check/allow/names.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ markdownpreviewhandler
1010
mousewithoutborders
1111
mwb
1212
oobe
13-
pasteplain
1413
poweraccent
1514
powerlauncher
1615
POWEROCR
@@ -144,6 +143,7 @@ Controlz
144143
cortana
145144
fancymouse
146145
firefox
146+
gpt
147147
Inkscape
148148
Markdig
149149
modernwpf
@@ -152,6 +152,7 @@ mozilla
152152
mspaint
153153
Newtonsoft
154154
onenote
155+
openai
155156
Quickime
156157
regedit
157158
roslyn

.github/actions/spell-check/expect.txt

+1
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,7 @@ MINIMIZEBOX
894894
MINIMIZEEND
895895
MINIMIZESTART
896896
miniz
897+
Mip
897898
Miracast
898899
mjpg
899900
mkdn

.pipelines/ESRPSigning_core.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
"PowerToys.PowerOCR.dll",
4646
"PowerToys.PowerOCR.exe",
4747

48-
"PowerToys.PastePlainModuleInterface.dll",
48+
"PowerToys.AdvancedPasteModuleInterface.dll",
49+
"WinUI3Apps\\PowerToys.AdvancedPaste.exe",
50+
"WinUI3Apps\\PowerToys.AdvancedPaste.dll",
4951

5052
"PowerToys.AwakeModuleInterface.dll",
5153
"PowerToys.Awake.exe",
@@ -303,6 +305,7 @@
303305
"MessagePack.Annotations.dll",
304306
"MessagePack.dll",
305307
"Nerdbank.Streams.dll",
308+
"WinUI3Apps\\ReverseMarkdown.dll",
306309
"WinUI3Apps\\SharpCompress.dll",
307310
"WinUI3Apps\\ZstdSharp.dll",
308311
"ColorCode.Core.dll",

Directory.Packages.props

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
</PropertyGroup>
55
<ItemGroup>
66
<PackageVersion Include="Appium.WebDriver" Version="4.4.5" />
7+
<PackageVersion Include="Azure.AI.OpenAI" Version="1.0.0-beta.12" />
78
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.2" />
89
<PackageVersion Include="CommunityToolkit.WinUI.Animations" Version="8.0.240109" />
910
<PackageVersion Include="CommunityToolkit.WinUI.Collections" Version="8.0.240109" />
@@ -20,6 +21,7 @@
2021
<PackageVersion Include="DotNetSeleniumExtras.WaitHelpers" Version="3.11.0" />
2122
<PackageVersion Include="HelixToolkit" Version="2.24.0" />
2223
<PackageVersion Include="HelixToolkit.Core.Wpf" Version="2.24.0" />
24+
<PackageVersion Include="HtmlAgilityPack" Version="1.11.57" />
2325
<PackageVersion Include="hyjiacan.pinyin4net" Version="4.1.1" />
2426
<PackageVersion Include="Interop.Microsoft.Office.Interop.OneNote" Version="1.1.0.2" />
2527
<PackageVersion Include="LazyCache" Version="2.4.0" />
@@ -56,6 +58,7 @@
5658
<PackageVersion Include="NLog" Version="5.0.4" />
5759
<PackageVersion Include="NLog.Extensions.Logging" Version="5.3.8" />
5860
<PackageVersion Include="NLog.Schema" Version="5.2.8" />
61+
<PackageVersion Include="ReverseMarkdown" Version="4.1.0" />
5962
<PackageVersion Include="ScipBe.Common.Office.OneNote" Version="3.0.1" />
6063
<PackageVersion Include="SharpCompress" Version="0.37.2" />
6164
<PackageVersion Include="StreamJsonRpc" Version="2.14.24" />

NOTICE.md

+2
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,7 @@ EXHIBIT A -Mozilla Public License.
12971297
## NuGet Packages used by PowerToys
12981298

12991299
- Appium.WebDriver 4.4.5
1300+
- Azure.AI.OpenAI 1.0.0-beta.12
13001301
- CommunityToolkit.Mvvm 8.2.2
13011302
- CommunityToolkit.WinUI.Animations 8.0.240109
13021303
- CommunityToolkit.WinUI.Collections 8.0.240109
@@ -1341,6 +1342,7 @@ EXHIBIT A -Mozilla Public License.
13411342
- MSTest.TestFramework 3.2.0
13421343
- NLog.Extensions.Logging 5.3.8
13431344
- NLog.Schema 5.2.8
1345+
- ReverseMarkdown 4.1.0
13441346
- ScipBe.Common.Office.OneNote 3.0.1
13451347
- SharpCompress 0.37.2
13461348
- StreamJsonRpc 2.14.24

PowerToys.sln

+23-2
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseJumpUI", "src\modules\
512512
EndProject
513513
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MouseJumpUI.UnitTests", "src\modules\MouseUtils\MouseJumpUI.UnitTests\MouseJumpUI.UnitTests.csproj", "{D9C5DE64-6849-4278-91AD-9660AECF2876}"
514514
EndProject
515-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pasteplain", "pasteplain", "{9873BA05-4C41-4819-9283-CF45D795431B}"
515+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AdvancedPaste", "AdvancedPaste", "{9873BA05-4C41-4819-9283-CF45D795431B}"
516516
EndProject
517-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PastePlainModuleInterface", "src\modules\pasteplain\PastePlainModuleInterface\PastePlainModuleInterface.vcxproj", "{FC373B24-3293-453C-AAF5-CF2909DCEE6A}"
517+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AdvancedPasteModuleInterface", "src\modules\AdvancedPaste\AdvancedPasteModuleInterface\AdvancedPasteModuleInterface.vcxproj", "{FC373B24-3293-453C-AAF5-CF2909DCEE6A}"
518518
EndProject
519519
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AllExperiments", "src\common\AllExperiments\AllExperiments.csproj", "{9CE59ED5-7087-4353-88EB-788038A73CEC}"
520520
EndProject
@@ -566,6 +566,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileLocksmithContextMenu",
566566
EndProject
567567
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileLocksmithLib", "src\modules\FileLocksmith\FileLocksmithLib\FileLocksmithLib.vcxproj", "{9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}"
568568
EndProject
569+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdvancedPaste", "src\modules\AdvancedPaste\AdvancedPaste\AdvancedPaste.csproj", "{C32D254F-7597-4CBE-BF74-D922D81CDF29}"
570+
EndProject
569571
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hosts", "src\modules\Hosts\Hosts\Hosts.csproj", "{02DD46D3-F761-47D9-8894-2D6DA0124650}"
570572
EndProject
571573
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RegistryPreview", "src\modules\registrypreview\RegistryPreview\RegistryPreview.csproj", "{8E23E173-7127-4A5F-9F93-3049F2B68047}"
@@ -2499,6 +2501,24 @@ Global
24992501
{9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Release|x64.Build.0 = Release|x64
25002502
{9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Release|x86.ActiveCfg = Release|x64
25012503
{9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Release|x86.Build.0 = Release|x64
2504+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Debug|ARM64.ActiveCfg = Debug|ARM64
2505+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Debug|ARM64.Build.0 = Debug|ARM64
2506+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Debug|ARM64.Deploy.0 = Debug|ARM64
2507+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Debug|x64.ActiveCfg = Debug|x64
2508+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Debug|x64.Build.0 = Debug|x64
2509+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Debug|x64.Deploy.0 = Debug|x64
2510+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Debug|x86.ActiveCfg = Debug|x64
2511+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Debug|x86.Build.0 = Debug|x64
2512+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Debug|x86.Deploy.0 = Debug|x64
2513+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Release|ARM64.ActiveCfg = Release|ARM64
2514+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Release|ARM64.Build.0 = Release|ARM64
2515+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Release|ARM64.Deploy.0 = Release|ARM64
2516+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Release|x64.ActiveCfg = Release|x64
2517+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Release|x64.Build.0 = Release|x64
2518+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Release|x64.Deploy.0 = Release|x64
2519+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Release|x86.ActiveCfg = Release|x64
2520+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Release|x86.Build.0 = Release|x64
2521+
{C32D254F-7597-4CBE-BF74-D922D81CDF29}.Release|x86.Deploy.0 = Release|x64
25022522
{02DD46D3-F761-47D9-8894-2D6DA0124650}.Debug|ARM64.ActiveCfg = Debug|ARM64
25032523
{02DD46D3-F761-47D9-8894-2D6DA0124650}.Debug|ARM64.Build.0 = Debug|ARM64
25042524
{02DD46D3-F761-47D9-8894-2D6DA0124650}.Debug|x64.ActiveCfg = Debug|x64
@@ -2791,6 +2811,7 @@ Global
27912811
{0014D652-901F-4456-8D65-06FC5F997FB0} = {4C0D0746-BE5B-49EE-BD5D-A7811628AE8B}
27922812
{799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA} = {AB82E5DD-C32D-4F28-9746-2C780846188E}
27932813
{9D52FD25-EF90-4F9A-A015-91EFC5DAF54F} = {AB82E5DD-C32D-4F28-9746-2C780846188E}
2814+
{C32D254F-7597-4CBE-BF74-D922D81CDF29} = {9873BA05-4C41-4819-9283-CF45D795431B}
27942815
{02DD46D3-F761-47D9-8894-2D6DA0124650} = {F05E590D-AD46-42BE-9C25-6A63ADD2E3EA}
27952816
{8E23E173-7127-4A5F-9F93-3049F2B68047} = {929C1324-22E8-4412-A9A8-80E85F3985A5}
27962817
{DFF88D16-D36F-40A4-A955-CDCAA76EF7B8} = {538ED0BB-B863-4B20-98CC-BCDF7FA0B68A}

doc/images/icons/AdvancedPaste.png

29.4 KB
Loading
-25.6 KB
Binary file not shown.
44.4 KB
Loading
14.7 KB
Loading
120 KB
Loading
Binary file not shown.
-43.2 KB
Binary file not shown.
-12.6 KB
Binary file not shown.
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
3+
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" >
4+
5+
<?include $(sys.CURRENTDIR)\Common.wxi?>
6+
7+
<?define AdvancedPasteAssetsFiles=?>
8+
<?define AdvancedPasteAssetsFilesPath=$(var.BinDir)WinUI3Apps\Assets\AdvancedPaste\?>
9+
10+
<Fragment>
11+
<DirectoryRef Id="WinUI3AppsAssetsFolder">
12+
<Directory Id="AdvancedPasteAssetsFolder" Name="AdvancedPaste" />
13+
</DirectoryRef>
14+
<DirectoryRef Id="AdvancedPasteAssetsFolder" FileSource="$(var.AdvancedPasteAssetsFilesPath)">
15+
<!-- Generated by generateFileComponents.ps1 -->
16+
<!--AdvancedPasteAssetsFiles_Component_Def-->
17+
</DirectoryRef>
18+
19+
<ComponentGroup Id="AdvancedPasteComponentGroup">
20+
<Component Id="RemoveAdvancedPasteFolder" Guid="55AFE81D-F6BD-439A-A229-66AF5C360AB0" Directory="AdvancedPasteAssetsFolder" >
21+
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
22+
<RegistryValue Type="string" Name="RemoveAdvancedPasteFolder" Value="" KeyPath="yes"/>
23+
</RegistryKey>
24+
<RemoveFolder Id="RemoveFolderAdvancedPasteAssetsFolder" Directory="AdvancedPasteAssetsFolder" On="uninstall"/>
25+
</Component>
26+
</ComponentGroup>
27+
28+
</Fragment>
29+
</Wix>

installer/PowerToysSetup/Common.wxi

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<?define MeasureToolProjectName="MeasureTool"?>
1616
<?define HostsProjectName="Hosts"?>
1717
<?define MouseWithoutBordersProjectName="MouseWithoutBorders"?>
18-
<?define PastePlainProjectName="PastePlain"?>
18+
<?define AdvancedPasteProjectName="AdvancedPaste"?>
1919
<?define RegistryPreviewProjectName="RegistryPreview"?>
2020
<?define PeekProjectName="Peek"?>
2121

installer/PowerToysSetup/PowerToysInstaller.wixproj

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
3131
<PropertyGroup>
3232
<RunPostBuildEvent>Always</RunPostBuildEvent>
3333
<PostBuildEvent>
34+
call move /Y ..\..\..\AdvancedPaste.wxs.bk ..\..\..\AdvancedPaste.wxs
3435
call move /Y ..\..\..\Awake.wxs.bk ..\..\..\Awake.wxs
3536
call move /Y ..\..\..\BaseApplications.wxs.bk ..\..\..\BaseApplications.wxs
3637
call move /Y ..\..\..\ColorPicker.wxs.bk ..\..\..\ColorPicker.wxs
@@ -102,6 +103,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
102103
<Compile Include="CustomDialogs\WixUI_PTInstallDir.wxs" />
103104
<Compile Include="Product.wxs" />
104105

106+
<Compile Include="AdvancedPaste.wxs" />
105107
<Compile Include="Awake.wxs" />
106108
<Compile Include="BaseApplications.wxs" />
107109
<Compile Include="ColorPicker.wxs" />

installer/PowerToysSetup/Product.wxs

+12-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<ComponentGroupRef Id="VideoConferenceComponentGroup" />
7373
<ComponentGroupRef Id="MouseWithoutBordersComponentGroup" />
7474
<ComponentGroupRef Id="EnvironmentVariablesComponentGroup" />
75-
75+
<ComponentGroupRef Id="AdvancedPasteComponentGroup" />
7676
<ComponentGroupRef Id="ResourcesComponentGroup" />
7777
<ComponentGroupRef Id="WindowsAppSDKComponentGroup" />
7878
<ComponentGroupRef Id="ToolComponentGroup" />
@@ -161,6 +161,9 @@
161161
<Custom Action="UnRegisterContextMenuPackages" Before="RemoveFiles">
162162
Installed AND (REMOVE="ALL")
163163
</Custom>
164+
<Custom Action="UnsetAdvancedPasteAPIKey" Before="RemoveFiles">
165+
Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
166+
</Custom>
164167
<Custom Action="UninstallCommandNotFound" Before="RemoveFiles">
165168
Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
166169
</Custom>
@@ -285,6 +288,14 @@
285288
DllEntry="UpgradeCommandNotFoundModuleCA"
286289
/>
287290

291+
<CustomAction Id="UnsetAdvancedPasteAPIKey"
292+
Return="ignore"
293+
Impersonate="yes"
294+
Execute="deferred"
295+
BinaryKey="PTCustomActions"
296+
DllEntry="UnsetAdvancedPasteAPIKeyCA"
297+
/>
298+
288299
<CustomAction Id="TelemetryLogInstallSuccess"
289300
Return="ignore"
290301
Impersonate="yes"

installer/PowerToysSetup/generateAllFileComponents.ps1

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListNa
2424
Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName WinUI3ApplicationsFiles -wxsFilePath $PSScriptRoot\WinUI3Applications.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps"""
2525
Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""WinUI3ApplicationsFiles"" -wxsFilePath $PSScriptRoot\WinUI3Applications.wxs -regroot $registryroot"
2626

27+
#AdvancedPaste
28+
Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName AdvancedPasteAssetsFiles -wxsFilePath $PSScriptRoot\AdvancedPaste.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\AdvancedPaste"""
29+
Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""AdvancedPasteAssetsFiles"" -wxsFilePath $PSScriptRoot\AdvancedPaste.wxs -regroot $registryroot"
30+
2731
#AwakeFiles
2832
Invoke-Expression -Command "$PSScriptRoot\generateFileList.ps1 -fileDepsJson """" -fileListName AwakeImagesFiles -wxsFilePath $PSScriptRoot\Awake.wxs -depsPath ""$PSScriptRoot..\..\..\$platform\Release\Assets\Awake"""
2933
Invoke-Expression -Command "$PSScriptRoot\generateFileComponents.ps1 -fileListName ""AwakeImagesFiles"" -wxsFilePath $PSScriptRoot\Awake.wxs -regroot $registryroot"

installer/PowerToysSetupCustomActions/CustomAction.cpp

+28-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <winrt/Windows.ApplicationModel.h>
1515
#include <winrt/Windows.Foundation.h>
1616
#include <winrt/Windows.Management.Deployment.h>
17+
#include <winrt/Windows.Security.Credentials.h>
1718

1819
#include <wtsapi32.h>
1920
#include <processthreadsapi.h>
@@ -433,6 +434,31 @@ UINT __stdcall RemoveWindowsServiceByName(std::wstring serviceName)
433434
return ERROR_SUCCESS;
434435
}
435436

437+
UINT __stdcall UnsetAdvancedPasteAPIKeyCA(MSIHANDLE hInstall)
438+
{
439+
HRESULT hr = S_OK;
440+
UINT er = ERROR_SUCCESS;
441+
442+
try
443+
{
444+
winrt::Windows::Security::Credentials::PasswordVault vault;
445+
winrt::Windows::Security::Credentials::PasswordCredential cred;
446+
447+
hr = WcaInitialize(hInstall, "UnsetAdvancedPasteAPIKey");
448+
ExitOnFailure(hr, "Failed to initialize");
449+
450+
cred = vault.Retrieve(L"https://platform.openai.com/api-keys", L"PowerToys_AdvancedPaste_OpenAIKey");
451+
vault.Remove(cred);
452+
}
453+
catch (...)
454+
{
455+
}
456+
457+
LExit:
458+
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
459+
return WcaFinalize(er);
460+
}
461+
436462
UINT __stdcall UninstallCommandNotFoundModuleCA(MSIHANDLE hInstall)
437463
{
438464
HRESULT hr = S_OK;
@@ -1051,9 +1077,10 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
10511077
}
10521078
processes.resize(bytes / sizeof(processes[0]));
10531079

1054-
std::array<std::wstring_view, 31> processesToTerminate = {
1080+
std::array<std::wstring_view, 32> processesToTerminate = {
10551081
L"PowerToys.PowerLauncher.exe",
10561082
L"PowerToys.Settings.exe",
1083+
L"PowerToys.AdvancedPaste.exe",
10571084
L"PowerToys.Awake.exe",
10581085
L"PowerToys.FancyZones.exe",
10591086
L"PowerToys.FancyZonesEditor.exe",

installer/PowerToysSetupCustomActions/CustomAction.def

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ EXPORTS
2424
UninstallEmbeddedMSIXCA
2525
UninstallServicesCA
2626
UninstallCommandNotFoundModuleCA
27-
UpgradeCommandNotFoundModuleCA
27+
UpgradeCommandNotFoundModuleCA
28+
UnsetAdvancedPasteAPIKeyCA

installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
<PreBuildEvent>
4949
<Command>
5050
call cmd /C "copy ""$(ProjectDir)DepsFilesLists.h"" ""$(ProjectDir)DepsFilesLists.h.bk"""
51+
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\AdvancedPaste.wxs"" ""$(ProjectDir)..\PowerToysSetup\AdvancedPaste.wxs.bk""""
5152
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\Awake.wxs"" ""$(ProjectDir)..\PowerToysSetup\Awake.wxs.bk""""
5253
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\BaseApplications.wxs"" ""$(ProjectDir)..\PowerToysSetup\BaseApplications.wxs.bk""""
5354
call cmd /C "copy ""$(ProjectDir)..\PowerToysSetup\ColorPicker.wxs"" ""$(ProjectDir)..\PowerToysSetup\ColorPicker.wxs.bk""""

src/common/Common.UI/SettingsDeepLink.cs

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public enum SettingsWindow
3030
CropAndLock,
3131
EnvironmentVariables,
3232
Dashboard,
33+
AdvancedPaste,
3334
}
3435

3536
private static string SettingsWindowNameToString(SettingsWindow value)
@@ -74,6 +75,8 @@ private static string SettingsWindowNameToString(SettingsWindow value)
7475
return "EnvironmentVariables";
7576
case SettingsWindow.Dashboard:
7677
return "Dashboard";
78+
case SettingsWindow.AdvancedPaste:
79+
return "AdvancedPaste";
7780
default:
7881
{
7982
return string.Empty;

src/common/GPOWrapper/GPOWrapper.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ namespace winrt::PowerToys::GPOWrapper::implementation
124124
{
125125
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredTextExtractorEnabledValue());
126126
}
127-
GpoRuleConfigured GPOWrapper::GetConfiguredPastePlainEnabledValue()
127+
GpoRuleConfigured GPOWrapper::GetConfiguredAdvancedPasteEnabledValue()
128128
{
129-
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredPastePlainEnabledValue());
129+
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredAdvancedPasteEnabledValue());
130130
}
131131
GpoRuleConfigured GPOWrapper::GetConfiguredVideoConferenceMuteEnabledValue()
132132
{

src/common/GPOWrapper/GPOWrapper.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace winrt::PowerToys::GPOWrapper::implementation
3838
static GpoRuleConfigured GetConfiguredScreenRulerEnabledValue();
3939
static GpoRuleConfigured GetConfiguredShortcutGuideEnabledValue();
4040
static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue();
41-
static GpoRuleConfigured GetConfiguredPastePlainEnabledValue();
41+
static GpoRuleConfigured GetConfiguredAdvancedPasteEnabledValue();
4242
static GpoRuleConfigured GetConfiguredVideoConferenceMuteEnabledValue();
4343
static GpoRuleConfigured GetConfiguredPeekEnabledValue();
4444
static GpoRuleConfigured GetDisableNewUpdateToastValue();

src/common/GPOWrapper/GPOWrapper.idl

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace PowerToys
4242
static GpoRuleConfigured GetConfiguredScreenRulerEnabledValue();
4343
static GpoRuleConfigured GetConfiguredShortcutGuideEnabledValue();
4444
static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue();
45-
static GpoRuleConfigured GetConfiguredPastePlainEnabledValue();
45+
static GpoRuleConfigured GetConfiguredAdvancedPasteEnabledValue();
4646
static GpoRuleConfigured GetConfiguredVideoConferenceMuteEnabledValue();
4747
static GpoRuleConfigured GetConfiguredPeekEnabledValue();
4848
static GpoRuleConfigured GetDisableNewUpdateToastValue();

0 commit comments

Comments
 (0)