Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PastePlain] Introduce Paste as Plain Text module #23645

Merged
merged 29 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a43f487
[PastePlain] Introduce Paste as Plain Text module
carlos-zamora Jan 27, 2023
368e9ef
fix build
carlos-zamora Jan 31, 2023
3bc93d1
add telemetry
carlos-zamora Jan 31, 2023
319b244
update settings UI
carlos-zamora Jan 31, 2023
2c63095
Merge branch 'main' into dev/cazamor/paste-as-plain-text
carlos-zamora Jan 31, 2023
4cc9630
spell
carlos-zamora Jan 31, 2023
486685d
Add navigation items to Settings and OOBE
jaimecbernardo Feb 1, 2023
6229910
Add PastePlain to the Quick Access flyout
jaimecbernardo Feb 1, 2023
c4ab3f4
try to fix PastePlain not being enabled from runner/settings
carlos-zamora Feb 1, 2023
ded551a
load dll properly
carlos-zamora Feb 3, 2023
86fcf81
installer files
carlos-zamora Feb 3, 2023
49917e7
Add PastePlain project name
snickler Feb 3, 2023
0bf55fd
Use win32 APIs in the module interface instead
jaimecbernardo Feb 20, 2023
be78609
Merge branch 'main' into dev/cazamor/paste-as-plain-text
jaimecbernardo Feb 21, 2023
993eb9c
Fix spellcheck
jaimecbernardo Feb 21, 2023
d66bc4a
Fix build errors
jaimecbernardo Feb 21, 2023
d8ed767
Add success, error and invoke telemetry
jaimecbernardo Feb 21, 2023
600c101
Add Settings Telemetry
jaimecbernardo Feb 21, 2023
39f101c
Add GPO definitions
jaimecbernardo Feb 21, 2023
f78bb02
Fix analyzer errors
jaimecbernardo Feb 21, 2023
b48988d
Use static_cast instead of reinterpret_cast
jaimecbernardo Feb 21, 2023
556e44c
Add images to Settings
jaimecbernardo Feb 22, 2023
e8d2efc
Add note about replacing clipboard contents
jaimecbernardo Feb 22, 2023
6417ad9
Fix learn more text
jaimecbernardo Feb 22, 2023
05e9ed3
Add link to readme
jaimecbernardo Feb 22, 2023
8293013
Remove unneeded C# app
jaimecbernardo Feb 22, 2023
adb2401
Fix installer
jaimecbernardo Feb 22, 2023
3f18ad3
Fix spellchecker
jaimecbernardo Feb 22, 2023
08f427e
Merge branch 'main' into dev/cazamor/paste-as-plain-text
jaimecbernardo Feb 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ HTTRANSPARENT
HValue
Hvci
hwb
HWHEEL
HWINEVENTHOOK
hwnd
HWNDFIRST
Expand Down Expand Up @@ -894,6 +895,8 @@ LCONTROL
LCtrl
Ldone
ldx
LEFTDOWN
LEFTUP
LEFTSCROLLBAR
lego
len
Expand Down Expand Up @@ -1043,6 +1046,8 @@ Mgmt
mic
microsoft
Midl
MIDDLEDOWN
MIDDLEUP
mii
MIIM
millis
Expand Down Expand Up @@ -1176,6 +1181,7 @@ NOACTIVATE
NOAGGREGATION
NOASYNC
NOCLOSEPROCESS
NOCOALESCE
NOCOPYBITS
nodeca
nodiscard
Expand Down Expand Up @@ -1249,7 +1255,7 @@ oldpath
oldtheme
oleaut
OLECHAR
oledb
OLEDB
oledbcommand
oledbconnection
OLIVEGREEN
Expand Down Expand Up @@ -1294,6 +1300,7 @@ PARENTRELATIVEPARSING
PArgb
parray
PARTIALCONFIRMATIONDIALOGTITLE
pasteplain
pathcch
Pathto
PAUDIO
Expand Down Expand Up @@ -1379,7 +1386,7 @@ Prefixer
Preinstalled
prevhost
previewer
previewhandlerframeinfo
PREVIEWHANDLERFRAMEINFO
previewpane
previouscamera
PREVIOUSINSTALLFOLDER
Expand Down Expand Up @@ -1467,7 +1474,7 @@ rectp
rects
recyclebin
redirectedfrom
redist
Redist
redistributable
reencode
reencoded
Expand Down Expand Up @@ -1524,13 +1531,16 @@ rgs
rhs
ricardosantos
RIDEV
RIGHTDOWN
RIGHTUP
RIGHTSCROLLBAR
riid
RKey
RLO
RMENU
RNumber
roadmap
Roamable
robmensching
Roboto
rooler
Expand Down Expand Up @@ -1590,7 +1600,7 @@ secauthz
secpol
Secur
securityoverview
segoe
Segoe
Sekan
SENDCHANGE
sendinput
Expand Down Expand Up @@ -1656,7 +1666,7 @@ SHOWMINNOACTIVE
SHOWNA
SHOWNOACTIVATE
SHOWNORMAL
showwindow
SHOWWINDOW
shtypes
SICHINT
sid
Expand Down Expand Up @@ -1690,6 +1700,7 @@ Soref
SOURCECLIENTAREAONLY
SOURCEHEADER
sourcesdirectory
SPACEBAR
spam
spdisp
spdlog
Expand Down Expand Up @@ -1723,7 +1734,7 @@ STARTUPINFO
STARTUPINFOEX
STARTUPINFOW
startupscreen
statflag
STATFLAG
STATICEDGE
STATSTG
stdafx
Expand All @@ -1735,7 +1746,7 @@ STDMETHODCALLTYPE
STDMETHODIMP
stefan
Stereolithography
stgm
STGM
STGMEDIUM
sticpl
stl
Expand Down Expand Up @@ -1782,7 +1793,7 @@ SYSICONINDEX
sysinfo
SYSKEY
syskeydown
syskeyup
SYSKEYUP
SYSMENU
SYSTEMAPPS
systemroot
Expand Down Expand Up @@ -1895,6 +1906,7 @@ UIs
Ulaanbaatar
ULARGE
ULONGLONG
UMsg
unassign
uncompilable
UNCPRIORITY
Expand Down Expand Up @@ -1974,6 +1986,7 @@ VIDEOINFOHEADER
viewbox
viewmodel
vih
VIRTUALDESK
virtualkey
visiblecolorformats
Visibletrue
Expand Down Expand Up @@ -2064,7 +2077,7 @@ WINL
winmd
winmm
winmsg
winnt
WINNT
winres
winrt
winsdk
Expand Down Expand Up @@ -2132,6 +2145,7 @@ wtypes
Wubi
wuceffectsi
WVC
WVk
Wwan
Wwanpp
XAttribute
Expand All @@ -2143,6 +2157,8 @@ XBUTTONUP
xcopy
XControl
XDocument
XDOWN
XUP
XElement
XFile
XIncrement
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/spell-check/patterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ https?://(?:(?:www\.|)youtube\.com|youtu.be)/[-a-zA-Z0-9?&=]*
/gist\.github\.com/[^/]+/[0-9a-f]+

# msdn
\b(?:download\.visualstudio|docs|msdn)\.microsoft\.com/[-_a-zA-Z0-9()=./]*
\b(?:download\.visualstudio|docs|msdn|learn)\.microsoft\.com/[-_a-zA-Z0-9()=./]*

# medium
link\.medium\.com/[a-zA-Z0-9]+
Expand Down
2 changes: 2 additions & 0 deletions .pipelines/ESRPSigning_core.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"modules\\PowerOCR\\PowerToys.PowerOCR.dll",
"modules\\PowerOCR\\PowerToys.PowerOCR.exe",

"modules\\PastePlain\\PowerToys.PastePlainModuleInterface.dll",

"modules\\Awake\\PowerToys.AwakeModuleInterface.dll",
"modules\\Awake\\PowerToys.Awake.exe",
"modules\\Awake\\PowerToys.Awake.dll",
Expand Down
20 changes: 19 additions & 1 deletion PowerToys.sln
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StlThumbnailProviderCpp", "
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SvgThumbnailProviderCpp", "src\modules\previewpane\SvgThumbnailProviderCpp\SvgThumbnailProviderCpp.vcxproj", "{2BBC9E33-21EC-401C-84DA-BB6590A9B2AA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AllExperiments", "src\common\AllExperiments\AllExperiments.csproj", "{9CE59ED5-7087-4353-88EB-788038A73CEC}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pasteplain", "pasteplain", "{9873BA05-4C41-4819-9283-CF45D795431B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PastePlainModuleInterface", "src\modules\pasteplain\PastePlainModuleInterface\PastePlainModuleInterface.vcxproj", "{FC373B24-3293-453C-AAF5-CF2909DCEE6A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AllExperiments", "src\common\AllExperiments\AllExperiments.csproj", "{9CE59ED5-7087-4353-88EB-788038A73CEC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -2024,6 +2028,18 @@ Global
{2BBC9E33-21EC-401C-84DA-BB6590A9B2AA}.Release|x64.Build.0 = Release|x64
{2BBC9E33-21EC-401C-84DA-BB6590A9B2AA}.Release|x86.ActiveCfg = Release|x64
{2BBC9E33-21EC-401C-84DA-BB6590A9B2AA}.Release|x86.Build.0 = Release|x64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Debug|ARM64.ActiveCfg = Debug|ARM64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Debug|ARM64.Build.0 = Debug|ARM64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Debug|x64.ActiveCfg = Debug|x64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Debug|x64.Build.0 = Debug|x64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Debug|x86.ActiveCfg = Debug|x64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Debug|x86.Build.0 = Debug|x64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Release|ARM64.ActiveCfg = Release|ARM64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Release|ARM64.Build.0 = Release|ARM64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Release|x64.ActiveCfg = Release|x64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Release|x64.Build.0 = Release|x64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Release|x86.ActiveCfg = Release|x64
{FC373B24-3293-453C-AAF5-CF2909DCEE6A}.Release|x86.Build.0 = Release|x64
{9CE59ED5-7087-4353-88EB-788038A73CEC}.Debug|ARM64.ActiveCfg = Debug|ARM64
{9CE59ED5-7087-4353-88EB-788038A73CEC}.Debug|ARM64.Build.0 = Debug|ARM64
{9CE59ED5-7087-4353-88EB-788038A73CEC}.Debug|x64.ActiveCfg = Debug|x64
Expand Down Expand Up @@ -2206,6 +2222,8 @@ Global
{CA5518ED-0458-4B09-8F53-4122B9888655} = {2F305555-C296-497E-AC20-5FA1B237996A}
{D6DCC3AE-18C0-488A-B978-BAA9E3CFF09D} = {2F305555-C296-497E-AC20-5FA1B237996A}
{2BBC9E33-21EC-401C-84DA-BB6590A9B2AA} = {2F305555-C296-497E-AC20-5FA1B237996A}
{9873BA05-4C41-4819-9283-CF45D795431B} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
{FC373B24-3293-453C-AAF5-CF2909DCEE6A} = {9873BA05-4C41-4819-9283-CF45D795431B}
{9CE59ED5-7087-4353-88EB-788038A73CEC} = {1AFB6476-670D-4E80-A464-657E01DFF482}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline
| [Always on Top](https://aka.ms/PowerToysOverview_AoT) | [PowerToys Awake](https://aka.ms/PowerToysOverview_Awake) | [Color Picker](https://aka.ms/PowerToysOverview_ColorPicker) |
| [FancyZones](https://aka.ms/PowerToysOverview_FancyZones) | [File Explorer Add-ons](https://aka.ms/PowerToysOverview_FileExplorerAddOns) | [File Locksmith](https://aka.ms/PowerToysOverview_FileLocksmith) |
| [Hosts File Editor](https://aka.ms/PowerToysOverview_HostsFileEditor) | [Image Resizer](https://aka.ms/PowerToysOverview_ImageResizer) | [Keyboard Manager](https://aka.ms/PowerToysOverview_KeyboardManager) |
| [Mouse utilities](https://aka.ms/PowerToysOverview_MouseUtilities) | [PowerRename](https://aka.ms/PowerToysOverview_PowerRename) | [PowerToys Run](https://aka.ms/PowerToysOverview_PowerToysRun) |
| [Quick Accent](https://aka.ms/PowerToysOverview_QuickAccent) | [Screen Ruler](https://aka.ms/PowerToysOverview_ScreenRuler) | [Shortcut Guide](https://aka.ms/PowerToysOverview_ShortcutGuide) |
| [Text Extractor](https://aka.ms/PowerToysOverview_TextExtractor) | [Video Conference Mute](https://aka.ms/PowerToysOverview_VideoConference) |
| [Mouse utilities](https://aka.ms/PowerToysOverview_MouseUtilities) | [Paste as Plain Text](https://aka.ms/PowerToysOverview_PastePlain) | [PowerRename](https://aka.ms/PowerToysOverview_PowerRename) |
| [PowerToys Run](https://aka.ms/PowerToysOverview_PowerToysRun) | [Quick Accent](https://aka.ms/PowerToysOverview_QuickAccent) | [Screen Ruler](https://aka.ms/PowerToysOverview_ScreenRuler) |
| [Shortcut Guide](https://aka.ms/PowerToysOverview_ShortcutGuide) | [Text Extractor](https://aka.ms/PowerToysOverview_TextExtractor) | [Video Conference Mute](https://aka.ms/PowerToysOverview_VideoConference) |

## Installing and running Microsoft PowerToys

Expand Down
3 changes: 2 additions & 1 deletion installer/PowerToysSetup/Common.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<?define AlwaysOnTopProjectName="AlwaysOnTop"?>
<?define MeasureToolProjectName="MeasureTool"?>
<?define HostsProjectName="Hosts"?>

<?define PastePlainProjectName="PastePlain"?>

<?define RepoDir="$(var.ProjectDir)..\..\" ?>
<?if $(var.Platform) = x64?>
<?define PlatformLK="x64" ?>
Expand Down
20 changes: 20 additions & 0 deletions installer/PowerToysSetup/PastePlain.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" >

<?include $(sys.CURRENTDIR)\Common.wxi?>

<Fragment>
<DirectoryRef Id="PastePlainInstallFolder" FileSource="$(var.BinDir)modules\$(var.PastePlainProjectName)">
<!-- !Warning! Make sure to change Component Guid if you update the file list -->
<Component Id="Module_PastePlain" Win64="yes">
<File Source="$(var.BinDir)modules\$(var.PastePlainProjectName)\PowerToys.PastePlainModuleInterface.dll" KeyPath="yes" />
</Component>
</DirectoryRef>

<ComponentGroup Id="PastePlainComponentGroup" Directory="INSTALLFOLDER">
<ComponentRef Id="Module_PastePlain" />
</ComponentGroup>

</Fragment>
</Wix>
1 change: 1 addition & 0 deletions installer/PowerToysSetup/PowerToysInstaller.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ call "..\..\publish.cmd" arm64
<Compile Include="KeyboardManager.wxs" />
<Compile Include="MeasureTool.wxs" />
<Compile Include="MouseUtils.wxs" />
<Compile Include="PastePlain.wxs" />
<Compile Include="PowerAccent.wxs" />
<Compile Include="PowerRename.wxs" />
<Compile Include="Run.wxs" />
Expand Down
5 changes: 5 additions & 0 deletions installer/PowerToysSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<ComponentGroupRef Id="KeyboardManagerComponentGroup" />
<ComponentGroupRef Id="MeasureToolComponentGroup" />
<ComponentGroupRef Id="MouseUtilsComponentGroup" />
<ComponentGroupRef Id="PastePlainComponentGroup" />
<ComponentGroupRef Id="PowerAccentComponentGroup" />
<ComponentGroupRef Id="PowerRenameComponentGroup" />
<ComponentGroupRef Id="RunComponentGroup" />
Expand Down Expand Up @@ -480,6 +481,10 @@
<Directory Id="MouseUtilsInstallFolder" Name="$(var.MouseUtilsProjectName)">
</Directory>

<!-- PastePlain -->
<Directory Id="PastePlainInstallFolder" Name="$(var.PastePlainProjectName)">
</Directory>

<!-- AlwaysOnTop -->
<Directory Id="AlwaysOnTopInstallFolder" Name="$(var.AlwaysOnTopProjectName)">
</Directory>
Expand Down
6 changes: 3 additions & 3 deletions installer/PowerToysSetup/Settings.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<?include $(sys.CURRENTDIR)\Common.wxi?>

<?define SettingsV2Files=WinUIEx.dll;backup_restore_settings.json;Ijwhost.dll;ColorCode.Core.dll;ColorCode.WinUI.dll;CommunityToolkit.Common.dll;CommunityToolkit.Labs.WinUI.SettingsControls.dll;CommunityToolkit.WinUI.dll;CommunityToolkit.WinUI.UI.Controls.Core.dll;CommunityToolkit.WinUI.UI.Controls.DataGrid.dll;CommunityToolkit.WinUI.UI.Controls.Input.dll;CommunityToolkit.WinUI.UI.Controls.Layout.dll;CommunityToolkit.WinUI.UI.Controls.Markdown.dll;CommunityToolkit.WinUI.UI.Controls.Media.dll;CommunityToolkit.WinUI.UI.Controls.Primitives.dll;CommunityToolkit.WinUI.UI.dll;icon.ico;Microsoft.Graphics.Canvas.Interop.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.deps.json;PowerToys.Settings.dll;PowerToys.Settings.exe;PowerToys.Settings.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;resources.pri;System.CodeDom.dll;System.IO.Abstractions.dll;WinRT.Runtime.dll;Microsoft.Graphics.Canvas.dll;System.Management.dll;PowerToys.GPOWrapper.dll;System.Text.Json.dll;WindowsBase.dll;PowerToys.AllExperiments.dll?>
<?define SettingsV2AssetsModulesFiles=ColorPicker.png;FancyZones.png;FileLocksmith.png;AlwaysOnTop.png;HostsFileEditor.png;Awake.png;ImageResizer.png;KBM.png;MouseUtils.png;PowerAccent.png;PowerOCR.png;PowerLauncher.png;PowerPreview.png;PowerRename.png;PT.png;ScreenRuler.png;ShortcutGuide.png;VideoConference.png?>
<?define SettingsV2OOBEAssetsModulesFiles=ColorPicker.gif;AlwaysOnTop.png;HostsFileEditor.png;Awake.png;FancyZones.gif;FileExplorer.png;FileLocksmith.gif;ImageResizer.gif;KBM.gif;MouseUtils.gif;PowerAccent.gif;PowerOCR.gif;PowerRename.gif;Run.gif;ScreenRuler.gif;OOBEShortcutGuide.png;VideoConferenceMute.png;OOBEPTHero.png?>
<?define SettingsV2OOBEAssetsFluentIconsFiles=ColorPicker.png;FancyZones.png;FileLocksmith.png;AlwaysOnTop.png;Awake.png;FileExplorerPreview.png;FindMyMouse.png;Hosts.png;ImageResizer.png;KeyboardManager.png;MouseHighlighter.png;MouseCrosshairs.png;MouseUtils.png;PowerAccent.png;PowerOcr.png;PowerRename.png;PowerToys.png;PowerToysRun.png;ScreenRuler.png;Settings.png;ShortcutGuide.png;VideoConferenceMute.png?>
<?define SettingsV2AssetsModulesFiles=ColorPicker.png;FancyZones.png;FileLocksmith.png;AlwaysOnTop.png;HostsFileEditor.png;Awake.png;ImageResizer.png;KBM.png;MouseUtils.png;PastePlain.png;PowerAccent.png;PowerOCR.png;PowerLauncher.png;PowerPreview.png;PowerRename.png;PT.png;ScreenRuler.png;ShortcutGuide.png;VideoConference.png?>
<?define SettingsV2OOBEAssetsModulesFiles=ColorPicker.gif;AlwaysOnTop.png;HostsFileEditor.png;Awake.png;FancyZones.gif;FileExplorer.png;FileLocksmith.gif;ImageResizer.gif;KBM.gif;MouseUtils.gif;PastePlain.gif;PowerAccent.gif;PowerOCR.gif;PowerRename.gif;Run.gif;ScreenRuler.gif;OOBEShortcutGuide.png;VideoConferenceMute.png;OOBEPTHero.png?>
<?define SettingsV2OOBEAssetsFluentIconsFiles=ColorPicker.png;FancyZones.png;FileLocksmith.png;AlwaysOnTop.png;Awake.png;FileExplorerPreview.png;FindMyMouse.png;Hosts.png;ImageResizer.png;KeyboardManager.png;MouseHighlighter.png;MouseCrosshairs.png;MouseUtils.png;PastePlain.png;PowerAccent.png;PowerOcr.png;PowerRename.png;PowerToys.png;PowerToysRun.png;ScreenRuler.png;Settings.png;ShortcutGuide.png;VideoConferenceMute.png?>
<?define SettingsV2MicrosoftUIXamlAssetsInstallFiles=NoiseAsset_256x256_PNG.png?>

<!-- These files are needed for release builds to contain the experimentation DLLs -->
Expand Down
4 changes: 4 additions & 0 deletions src/common/GPOWrapper/GPOWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ namespace winrt::PowerToys::GPOWrapper::implementation
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredTextExtractorEnabledValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredPastePlainEnabledValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredPastePlainEnabledValue());
}
GpoRuleConfigured GPOWrapper::GetConfiguredVideoConferenceMuteEnabledValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredVideoConferenceMuteEnabledValue());
Expand Down
1 change: 1 addition & 0 deletions src/common/GPOWrapper/GPOWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace winrt::PowerToys::GPOWrapper::implementation
static GpoRuleConfigured GetConfiguredScreenRulerEnabledValue();
static GpoRuleConfigured GetConfiguredShortcutGuideEnabledValue();
static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue();
static GpoRuleConfigured GetConfiguredPastePlainEnabledValue();
static GpoRuleConfigured GetConfiguredVideoConferenceMuteEnabledValue();
static GpoRuleConfigured GetAllowExperimentationValue();
};
Expand Down
1 change: 1 addition & 0 deletions src/common/GPOWrapper/GPOWrapper.idl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace PowerToys
static GpoRuleConfigured GetConfiguredScreenRulerEnabledValue();
static GpoRuleConfigured GetConfiguredShortcutGuideEnabledValue();
static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue();
static GpoRuleConfigured GetConfiguredPastePlainEnabledValue();
static GpoRuleConfigured GetConfiguredVideoConferenceMuteEnabledValue();
static GpoRuleConfigured GetAllowExperimentationValue();
}
Expand Down
5 changes: 5 additions & 0 deletions src/common/GPOWrapperProjection/GPOWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,10 @@ public static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredTextExtractorEnabledValue();
}

public static GpoRuleConfigured GetConfiguredPastePlainEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredPastePlainEnabledValue();
}
}
}
2 changes: 1 addition & 1 deletion src/common/interop/shared_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace CommonSharedConstants

// Path to the event used by MeasureTool
const wchar_t MEASURE_TOOL_TRIGGER_EVENT[] = L"Local\\MeasureToolEvent-3d46745f-09b3-4671-a577-236be7abd199";

// Path to the event used by GcodePreviewHandler
const wchar_t GCODE_PREVIEW_RESIZE_EVENT[] = L"Local\\PowerToysGcodePreviewResizeEvent-6ff1f9bd-ccbd-4b24-a79f-40a34fb0317d";

Expand Down
6 changes: 6 additions & 0 deletions src/common/utils/gpo.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace powertoys_gpo {
const std::wstring POLICY_CONFIGURE_ENABLED_SCREEN_RULER = L"ConfigureEnabledUtilityScreenRuler";
const std::wstring POLICY_CONFIGURE_ENABLED_SHORTCUT_GUIDE = L"ConfigureEnabledUtilityShortcutGuide";
const std::wstring POLICY_CONFIGURE_ENABLED_TEXT_EXTRACTOR = L"ConfigureEnabledUtilityTextExtractor";
const std::wstring POLICY_CONFIGURE_ENABLED_PASTE_PLAIN = L"ConfigureEnabledUtilityPastePlain";
const std::wstring POLICY_CONFIGURE_ENABLED_VIDEO_CONFERENCE_MUTE = L"ConfigureEnabledUtilityVideoConferenceMute";
const std::wstring POLICY_ALLOW_EXPERIMENTATION = L"AllowExperimentation";

Expand Down Expand Up @@ -231,6 +232,11 @@ namespace powertoys_gpo {
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_TEXT_EXTRACTOR);
}

inline gpo_rule_configured_t getConfiguredPastePlainEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_PASTE_PLAIN);
}
Comment on lines +235 to +238
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way I can test this and make sure I did it right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carlos-zamora
I think the only way to test it is by setting the registry key manually.


inline gpo_rule_configured_t getConfiguredVideoConferenceMuteEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_VIDEO_CONFERENCE_MUTE);
Expand Down
Loading