Skip to content

Commit

Permalink
[PastePlain] Introduce Paste as Plain Text module (#23645)
Browse files Browse the repository at this point in the history
* [PastePlain] Introduce Paste as Plain Text module

* fix build

* add telemetry

* update settings UI

* spell

* Add navigation items to Settings and OOBE

* Add PastePlain to the Quick Access flyout

* try to fix PastePlain not being enabled from runner/settings

* load dll properly

* installer files

* Add PastePlain project name

* Use win32 APIs in the module interface instead

* Fix spellcheck

* Fix build errors

* Add success, error and invoke telemetry

* Add Settings Telemetry

* Add GPO definitions

* Fix analyzer errors

* Use static_cast instead of reinterpret_cast

* Add images to Settings

* Add note about replacing clipboard contents

* Fix learn more text

* Add link to readme

* Remove unneeded C# app

* Fix installer

* Fix spellchecker

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
  • Loading branch information
carlos-zamora and jaimecbernardo committed Feb 23, 2023
1 parent cbf1c61 commit 1e14291
Show file tree
Hide file tree
Showing 50 changed files with 1,576 additions and 19 deletions.
34 changes: 25 additions & 9 deletions .github/actions/spell-check/expect.txt
Expand Up @@ -721,6 +721,7 @@ HTTRANSPARENT
HValue
Hvci
hwb
HWHEEL
HWINEVENTHOOK
hwnd
HWNDFIRST
Expand Down Expand Up @@ -893,6 +894,8 @@ LCONTROL
LCtrl
Ldone
ldx
LEFTDOWN
LEFTUP
LEFTSCROLLBAR
lego
len
Expand Down Expand Up @@ -1041,6 +1044,8 @@ Mgmt
mic
microsoft
Midl
MIDDLEDOWN
MIDDLEUP
mii
MIIM
millis
Expand Down Expand Up @@ -1174,6 +1179,7 @@ NOACTIVATE
NOAGGREGATION
NOASYNC
NOCLOSEPROCESS
NOCOALESCE
NOCOPYBITS
nodeca
nodiscard
Expand Down Expand Up @@ -1247,7 +1253,7 @@ oldpath
oldtheme
oleaut
OLECHAR
oledb
OLEDB
oledbcommand
oledbconnection
OLIVEGREEN
Expand Down Expand Up @@ -1292,6 +1298,7 @@ PARENTRELATIVEPARSING
PArgb
parray
PARTIALCONFIRMATIONDIALOGTITLE
pasteplain
pathcch
Pathto
PAUDIO
Expand Down Expand Up @@ -1377,7 +1384,7 @@ Prefixer
Preinstalled
prevhost
previewer
previewhandlerframeinfo
PREVIEWHANDLERFRAMEINFO
previewpane
previouscamera
PREVIOUSINSTALLFOLDER
Expand Down Expand Up @@ -1465,7 +1472,7 @@ rectp
rects
recyclebin
redirectedfrom
redist
Redist
redistributable
reencode
reencoded
Expand Down Expand Up @@ -1522,13 +1529,16 @@ rgs
rhs
ricardosantos
RIDEV
RIGHTDOWN
RIGHTUP
RIGHTSCROLLBAR
riid
RKey
RLO
RMENU
RNumber
roadmap
Roamable
robmensching
Roboto
rooler
Expand Down Expand Up @@ -1588,7 +1598,7 @@ secauthz
secpol
Secur
securityoverview
segoe
Segoe
Sekan
SENDCHANGE
sendinput
Expand Down Expand Up @@ -1654,7 +1664,7 @@ SHOWMINNOACTIVE
SHOWNA
SHOWNOACTIVATE
SHOWNORMAL
showwindow
SHOWWINDOW
shtypes
SICHINT
sid
Expand Down Expand Up @@ -1688,6 +1698,7 @@ Soref
SOURCECLIENTAREAONLY
SOURCEHEADER
sourcesdirectory
SPACEBAR
spam
spdisp
spdlog
Expand Down Expand Up @@ -1721,7 +1732,7 @@ STARTUPINFO
STARTUPINFOEX
STARTUPINFOW
startupscreen
statflag
STATFLAG
STATICEDGE
STATSTG
stdafx
Expand All @@ -1733,7 +1744,7 @@ STDMETHODCALLTYPE
STDMETHODIMP
stefan
Stereolithography
stgm
STGM
STGMEDIUM
sticpl
stl
Expand Down Expand Up @@ -1780,7 +1791,7 @@ SYSICONINDEX
sysinfo
SYSKEY
syskeydown
syskeyup
SYSKEYUP
SYSMENU
SYSTEMAPPS
systemroot
Expand Down Expand Up @@ -1893,6 +1904,7 @@ UIs
Ulaanbaatar
ULARGE
ULONGLONG
UMsg
unassign
uncompilable
UNCPRIORITY
Expand Down Expand Up @@ -1972,6 +1984,7 @@ VIDEOINFOHEADER
viewbox
viewmodel
vih
VIRTUALDESK
virtualkey
visiblecolorformats
Visibletrue
Expand Down Expand Up @@ -2062,7 +2075,7 @@ WINL
winmd
winmm
winmsg
winnt
WINNT
winres
winrt
winsdk
Expand Down Expand Up @@ -2130,6 +2143,7 @@ wtypes
Wubi
wuceffectsi
WVC
WVk
Wwan
Wwanpp
XAttribute
Expand All @@ -2142,6 +2156,8 @@ XBUTTONUP
XControl
xcopy
XDocument
XDOWN
XUP
XElement
XFile
XIncrement
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/spell-check/patterns.txt
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
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
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
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
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
@@ -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
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
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 @@ -478,6 +479,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
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;Experimentation.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;Experimentation.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
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
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
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
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
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
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);
}

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

0 comments on commit 1e14291

Please sign in to comment.