mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-01-08 05:17:03 +01:00
Compare commits
306 Commits
dev/duhowe
...
dev/featur
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d34d4e2d54 | ||
|
|
8588dff066 | ||
|
|
cbf6624ddd | ||
|
|
010fccd12a | ||
|
|
b68b7724c9 | ||
|
|
ab47d91b5f | ||
|
|
f6282773c1 | ||
|
|
868ba040d8 | ||
|
|
179b4ed197 | ||
|
|
dc5bc12896 | ||
|
|
558ea132d1 | ||
|
|
919fe830a2 | ||
|
|
f665966db6 | ||
|
|
40a2510c52 | ||
|
|
cec9a73a6b | ||
|
|
02f792b13e | ||
|
|
b7743d28b5 | ||
|
|
f180d51367 | ||
|
|
8911a6eb63 | ||
|
|
c38412c7cb | ||
|
|
3bc0a518fc | ||
|
|
e49c1e1d60 | ||
|
|
fcf5c5c05c | ||
|
|
56d87133af | ||
|
|
2093dd4cde | ||
|
|
7beae3e470 | ||
|
|
34f4514ebb | ||
|
|
62d7b40ab0 | ||
|
|
cd0b8aa6d9 | ||
|
|
7b23e5ba99 | ||
|
|
d3faa86600 | ||
|
|
2bc3d1228d | ||
|
|
169c231509 | ||
|
|
690dce5482 | ||
|
|
a20fd15800 | ||
|
|
8c30da743c | ||
|
|
601eab5c88 | ||
|
|
e23cf3c914 | ||
|
|
e17747cc1e | ||
|
|
817bec9c4c | ||
|
|
ca49cab49b | ||
|
|
ff225044f9 | ||
|
|
aee1eb82a2 | ||
|
|
1f58a9e8c9 | ||
|
|
114ddbeeba | ||
|
|
e12bf70081 | ||
|
|
24533e4344 | ||
|
|
fa50208973 | ||
|
|
2d4d49f783 | ||
|
|
af85be3b90 | ||
|
|
33442e8853 | ||
|
|
ec049aa27b | ||
|
|
71d40b96cd | ||
|
|
f6afee9012 | ||
|
|
d8b4798476 | ||
|
|
344506b1db | ||
|
|
23b6a4bedb | ||
|
|
c28afa1fc8 | ||
|
|
2d812fa6d8 | ||
|
|
dc39ec771e | ||
|
|
a4e07a7b5d | ||
|
|
4825c62c50 | ||
|
|
74c891b0f3 | ||
|
|
d1266cf080 | ||
|
|
26119ea0e0 | ||
|
|
5420beb700 | ||
|
|
b72ec989fa | ||
|
|
8675a93f69 | ||
|
|
877d5c0506 | ||
|
|
6820e0cd80 | ||
|
|
98eaffc475 | ||
|
|
bc86e4fb04 | ||
|
|
95d9521cce | ||
|
|
19c660a8ff | ||
|
|
8bd74accc0 | ||
|
|
443f709899 | ||
|
|
86b1bff927 | ||
|
|
00aa8b4b88 | ||
|
|
6db620c79f | ||
|
|
b72e6bb7d6 | ||
|
|
b67b7a4ee7 | ||
|
|
65be209c2d | ||
|
|
3b7f7f6851 | ||
|
|
f10610e1e1 | ||
|
|
903c64b29a | ||
|
|
13e8743802 | ||
|
|
05ddd019af | ||
|
|
55d8631650 | ||
|
|
666d0c2840 | ||
|
|
ed18f10fa9 | ||
|
|
ef511d6318 | ||
|
|
f80eaf7b23 | ||
|
|
ad88f71398 | ||
|
|
26b7a48278 | ||
|
|
b407bf0f2b | ||
|
|
82cfa4cbfe | ||
|
|
ac5d9dbef2 | ||
|
|
2af86355ac | ||
|
|
e16f3ab4e5 | ||
|
|
6686c5b5f5 | ||
|
|
f922f56890 | ||
|
|
193581a9ac | ||
|
|
78c3f95179 | ||
|
|
0212892c94 | ||
|
|
50792b9520 | ||
|
|
885c4ffd77 | ||
|
|
d3c9fe8ea5 | ||
|
|
475a059ef6 | ||
|
|
39086f702e | ||
|
|
ed98a94d2a | ||
|
|
04ff5373d9 | ||
|
|
3fb51eea9e | ||
|
|
a208742012 | ||
|
|
3320dc2d0d | ||
|
|
4c12db9fa6 | ||
|
|
abc5a80a1e | ||
|
|
548bfdfcee | ||
|
|
ea6f5c8d88 | ||
|
|
93c81bb93e | ||
|
|
81fb58ed20 | ||
|
|
23aa46a4a5 | ||
|
|
ae7eb60b0c | ||
|
|
6c09b251b5 | ||
|
|
e5c8305c5c | ||
|
|
3c422438e8 | ||
|
|
82e0749779 | ||
|
|
4fc83786e3 | ||
|
|
513dd0cbf4 | ||
|
|
672206d17b | ||
|
|
9f93e238c3 | ||
|
|
158f4ee222 | ||
|
|
5aa4580bdb | ||
|
|
dcc0634fb1 | ||
|
|
d218e36a77 | ||
|
|
89d6aed118 | ||
|
|
a7e5c0330b | ||
|
|
b5251c27e9 | ||
|
|
16a71e2acd | ||
|
|
3036df9d7f | ||
|
|
12308babc7 | ||
|
|
5576c7b23f | ||
|
|
8620d80047 | ||
|
|
be202df44b | ||
|
|
3fa5aae70c | ||
|
|
dae91d2874 | ||
|
|
2e2e47a039 | ||
|
|
06ecbd58b8 | ||
|
|
fc8918e538 | ||
|
|
f93aa42b19 | ||
|
|
cbedf45796 | ||
|
|
7b8e229544 | ||
|
|
d7467e24ae | ||
|
|
c493d27dd3 | ||
|
|
b48c8aa80b | ||
|
|
deb1680f91 | ||
|
|
647ea2db1e | ||
|
|
6516af8a7a | ||
|
|
d0775dac28 | ||
|
|
9906141322 | ||
|
|
353aeb268b | ||
|
|
83ee449b1b | ||
|
|
9a3519cd0a | ||
|
|
54ed4834a8 | ||
|
|
c00ed8f996 | ||
|
|
db8935dca3 | ||
|
|
10a3f1162f | ||
|
|
fd5e4590d7 | ||
|
|
907a6f5ec9 | ||
|
|
3ea27571f3 | ||
|
|
ed423d8264 | ||
|
|
9733c1035b | ||
|
|
477094057d | ||
|
|
1912f1c533 | ||
|
|
550f7ec08d | ||
|
|
aae69ab125 | ||
|
|
8344060e5e | ||
|
|
54a8f47df7 | ||
|
|
d9e92eca01 | ||
|
|
2643f00fa1 | ||
|
|
8f076cb5da | ||
|
|
9b8d86858f | ||
|
|
c94c0431f4 | ||
|
|
64c5439b60 | ||
|
|
e0bdba9772 | ||
|
|
c4a93d2482 | ||
|
|
4960af8a13 | ||
|
|
a6b223083c | ||
|
|
dc9af4bc30 | ||
|
|
18e1d851fe | ||
|
|
663b0281c2 | ||
|
|
3c694e428c | ||
|
|
98ef8c4e70 | ||
|
|
c89b4bb9fd | ||
|
|
17a607fda0 | ||
|
|
371a05ac5e | ||
|
|
65e75d1c42 | ||
|
|
15ae5a03dc | ||
|
|
f39e4bb058 | ||
|
|
0679664d4c | ||
|
|
5e012b8891 | ||
|
|
77c59faa8a | ||
|
|
ed7d3ec973 | ||
|
|
26bbefa004 | ||
|
|
e6b56c4152 | ||
|
|
4c4630ef75 | ||
|
|
6fc164df98 | ||
|
|
5f42c6ef66 | ||
|
|
1e28cb8c40 | ||
|
|
0c83e632ed | ||
|
|
852d67b569 | ||
|
|
01d6c916d6 | ||
|
|
90979cbecb | ||
|
|
20a7dd4a7f | ||
|
|
ba19333ad7 | ||
|
|
6eafa57c68 | ||
|
|
8c450f3457 | ||
|
|
0137bc9697 | ||
|
|
e4ccde49f7 | ||
|
|
0efe6c91e8 | ||
|
|
a62d95c8fa | ||
|
|
ba13f5c0c4 | ||
|
|
bd50d6961d | ||
|
|
fbb9f4188f | ||
|
|
ae91aa3869 | ||
|
|
4cccbecf54 | ||
|
|
0e74b2ee6b | ||
|
|
f7cab16fb6 | ||
|
|
bfb569e894 | ||
|
|
ce39ef2360 | ||
|
|
0c3108bca1 | ||
|
|
28bf6de36c | ||
|
|
3de23f1c82 | ||
|
|
198b7a6890 | ||
|
|
f9fe9cc204 | ||
|
|
5d09e2e821 | ||
|
|
9914d31d6b | ||
|
|
add5078f43 | ||
|
|
68a66ff03d | ||
|
|
9cac577b7f | ||
|
|
cc9b7d62df | ||
|
|
27d0620cac | ||
|
|
6a353e0941 | ||
|
|
73146e844e | ||
|
|
07ab6191d0 | ||
|
|
4a672e2ed5 | ||
|
|
f869f99144 | ||
|
|
2493fd6a1a | ||
|
|
64c0ca77bf | ||
|
|
0bdfa32cd0 | ||
|
|
8f69109689 | ||
|
|
5abba947d8 | ||
|
|
12bc9d7206 | ||
|
|
a5c21d3432 | ||
|
|
6bfe924234 | ||
|
|
3cc3701465 | ||
|
|
71c7241fe1 | ||
|
|
ae6cb122c8 | ||
|
|
6fba21d9ad | ||
|
|
7e93d1f767 | ||
|
|
e08aa76085 | ||
|
|
e5bbeb738e | ||
|
|
404a189c87 | ||
|
|
26dd8ea18e | ||
|
|
80f4611b0a | ||
|
|
a5b69d9be5 | ||
|
|
927ac511c8 | ||
|
|
07e0ef8a2c | ||
|
|
1cf5d88507 | ||
|
|
1a33257314 | ||
|
|
6c7b99fbbc | ||
|
|
29e0bad3ea | ||
|
|
67a336bc46 | ||
|
|
40f2572b22 | ||
|
|
cdb40a91fa | ||
|
|
3dea02a981 | ||
|
|
4b371726c2 | ||
|
|
93bda77554 | ||
|
|
47ccfde156 | ||
|
|
782a2e1b1e | ||
|
|
5c600ebc92 | ||
|
|
b07b15cf42 | ||
|
|
910b259ce1 | ||
|
|
3d75b8471c | ||
|
|
f5cc0cba40 | ||
|
|
449078be8e | ||
|
|
690b537e9f | ||
|
|
af49b36d20 | ||
|
|
9867395b5b | ||
|
|
cb2a4ec6e9 | ||
|
|
7e80c1bf73 | ||
|
|
24add7d4f8 | ||
|
|
e11deec96f | ||
|
|
feba2e6f17 | ||
|
|
c18c70afdb | ||
|
|
aa788dad04 | ||
|
|
42905045b4 | ||
|
|
ccaf327baa | ||
|
|
6f813d9e66 | ||
|
|
2b71d97449 | ||
|
|
9f61f0793d | ||
|
|
cc553a60d5 | ||
|
|
3cd57eee63 | ||
|
|
6f6c32f989 | ||
|
|
15c3956eda | ||
|
|
ce19c4e5ff | ||
|
|
c157e64f28 |
3
.github/actions/spell-check/allow/names.txt
vendored
3
.github/actions/spell-check/allow/names.txt
vendored
@@ -28,7 +28,7 @@ videoconference
|
|||||||
|
|
||||||
# USERS
|
# USERS
|
||||||
|
|
||||||
LWXpg # (number eight)LWXpg is actual user name but spell checker throws error with a numeric leading value ... which is kinda odd
|
8LWXpg
|
||||||
Adoumie
|
Adoumie
|
||||||
Advaith
|
Advaith
|
||||||
alekhyareddy
|
alekhyareddy
|
||||||
@@ -62,7 +62,6 @@ DHowett
|
|||||||
ductdo
|
ductdo
|
||||||
Essey
|
Essey
|
||||||
ethanfangg
|
ethanfangg
|
||||||
ferraridavide
|
|
||||||
frankychen
|
frankychen
|
||||||
gabime
|
gabime
|
||||||
Galaxi
|
Galaxi
|
||||||
|
|||||||
1
.github/actions/spell-check/excludes.txt
vendored
1
.github/actions/spell-check/excludes.txt
vendored
@@ -117,7 +117,6 @@
|
|||||||
^\Qsrc/modules/previewpane/UnitTests-StlThumbnailProvider/HelperFiles/sample.stl\E$
|
^\Qsrc/modules/previewpane/UnitTests-StlThumbnailProvider/HelperFiles/sample.stl\E$
|
||||||
^\Qtools/project_template/ModuleTemplate/resource.h\E$
|
^\Qtools/project_template/ModuleTemplate/resource.h\E$
|
||||||
^doc/devdocs/akaLinks\.md$
|
^doc/devdocs/akaLinks\.md$
|
||||||
^src/modules/launcher/Plugins/Microsoft\.PowerToys\.Run\.Plugin\.TimeDate/Properties/
|
|
||||||
^src/modules/MouseWithoutBorders/App/.*/NativeMethods\.cs$
|
^src/modules/MouseWithoutBorders/App/.*/NativeMethods\.cs$
|
||||||
^src/modules/MouseWithoutBorders/App/Form/.*\.Designer\.cs$
|
^src/modules/MouseWithoutBorders/App/Form/.*\.Designer\.cs$
|
||||||
^src/modules/MouseWithoutBorders/App/Form/.*\.resx$
|
^src/modules/MouseWithoutBorders/App/Form/.*\.resx$
|
||||||
|
|||||||
15
.github/actions/spell-check/expect.txt
vendored
15
.github/actions/spell-check/expect.txt
vendored
@@ -192,6 +192,7 @@ CLIPBOARDUPDATE
|
|||||||
CLIPCHILDREN
|
CLIPCHILDREN
|
||||||
CLIPSIBLINGS
|
CLIPSIBLINGS
|
||||||
closesocket
|
closesocket
|
||||||
|
clrcall
|
||||||
CLSCTX
|
CLSCTX
|
||||||
Clusion
|
Clusion
|
||||||
cmder
|
cmder
|
||||||
@@ -202,8 +203,8 @@ CMINVOKECOMMANDINFO
|
|||||||
CMINVOKECOMMANDINFOEX
|
CMINVOKECOMMANDINFOEX
|
||||||
CMock
|
CMock
|
||||||
CMONITORS
|
CMONITORS
|
||||||
cmpgt
|
|
||||||
cmph
|
cmph
|
||||||
|
cmpgt
|
||||||
cne
|
cne
|
||||||
CNF
|
CNF
|
||||||
coclass
|
coclass
|
||||||
@@ -250,7 +251,10 @@ countof
|
|||||||
cph
|
cph
|
||||||
CPower
|
CPower
|
||||||
cppblog
|
cppblog
|
||||||
|
cppruntime
|
||||||
|
cppstd
|
||||||
cppwinrt
|
cppwinrt
|
||||||
|
CProj
|
||||||
createdump
|
createdump
|
||||||
CREATESCHEDULEDTASK
|
CREATESCHEDULEDTASK
|
||||||
CREATESTRUCT
|
CREATESTRUCT
|
||||||
@@ -266,7 +270,6 @@ CSettings
|
|||||||
cso
|
cso
|
||||||
CSRW
|
CSRW
|
||||||
CStyle
|
CStyle
|
||||||
cswinrt
|
|
||||||
CSY
|
CSY
|
||||||
CTest
|
CTest
|
||||||
currentculture
|
currentculture
|
||||||
@@ -606,6 +609,7 @@ hmenu
|
|||||||
hmodule
|
hmodule
|
||||||
hmonitor
|
hmonitor
|
||||||
homljgmgpmcbpjbnjpfijnhipfkiclkd
|
homljgmgpmcbpjbnjpfijnhipfkiclkd
|
||||||
|
HOOKPROC
|
||||||
Hostbackdropbrush
|
Hostbackdropbrush
|
||||||
hotkeycontrol
|
hotkeycontrol
|
||||||
hotkeys
|
hotkeys
|
||||||
@@ -673,6 +677,7 @@ imageresizerinput
|
|||||||
imageresizersettings
|
imageresizersettings
|
||||||
imagingdevices
|
imagingdevices
|
||||||
ime
|
ime
|
||||||
|
imperialounce
|
||||||
inetcpl
|
inetcpl
|
||||||
Infobar
|
Infobar
|
||||||
INFOEXAMPLE
|
INFOEXAMPLE
|
||||||
@@ -934,6 +939,7 @@ MRT
|
|||||||
mru
|
mru
|
||||||
mrw
|
mrw
|
||||||
msc
|
msc
|
||||||
|
msclr
|
||||||
mscorlib
|
mscorlib
|
||||||
msdata
|
msdata
|
||||||
msedge
|
msedge
|
||||||
@@ -1113,7 +1119,6 @@ PATINVERT
|
|||||||
PATPAINT
|
PATPAINT
|
||||||
PAUDIO
|
PAUDIO
|
||||||
pbc
|
pbc
|
||||||
pbi
|
|
||||||
PBlob
|
PBlob
|
||||||
pcb
|
pcb
|
||||||
pcch
|
pcch
|
||||||
@@ -1127,7 +1132,6 @@ pdo
|
|||||||
pdto
|
pdto
|
||||||
pdtobj
|
pdtobj
|
||||||
pdw
|
pdw
|
||||||
Peb
|
|
||||||
pef
|
pef
|
||||||
PElems
|
PElems
|
||||||
Pels
|
Pels
|
||||||
@@ -1510,6 +1514,7 @@ STATICEDGE
|
|||||||
STATSTG
|
STATSTG
|
||||||
stdafx
|
stdafx
|
||||||
STDAPI
|
STDAPI
|
||||||
|
stdcpp
|
||||||
stdcpplatest
|
stdcpplatest
|
||||||
STDMETHODCALLTYPE
|
STDMETHODCALLTYPE
|
||||||
STDMETHODIMP
|
STDMETHODIMP
|
||||||
@@ -1681,6 +1686,7 @@ Userenv
|
|||||||
USESHOWWINDOW
|
USESHOWWINDOW
|
||||||
USESIZE
|
USESIZE
|
||||||
USESTDHANDLES
|
USESTDHANDLES
|
||||||
|
usounce
|
||||||
USRDLL
|
USRDLL
|
||||||
UType
|
UType
|
||||||
uuidv
|
uuidv
|
||||||
@@ -1717,7 +1723,6 @@ VIDEOINFOHEADER
|
|||||||
viewmodel
|
viewmodel
|
||||||
vih
|
vih
|
||||||
VIRTUALDESK
|
VIRTUALDESK
|
||||||
VISEGRADRELAY
|
|
||||||
visiblecolorformats
|
visiblecolorformats
|
||||||
Visibletrue
|
Visibletrue
|
||||||
visualeffects
|
visualeffects
|
||||||
|
|||||||
13
.github/policies/resourceManagement.yml
vendored
13
.github/policies/resourceManagement.yml
vendored
@@ -236,22 +236,11 @@ configuration:
|
|||||||
- if:
|
- if:
|
||||||
- payloadType: Issue_Comment
|
- payloadType: Issue_Comment
|
||||||
- commentContains:
|
- commentContains:
|
||||||
pattern: "I(( would|'d) (like|love|be happy)| want) (to help|helping|to contribute|contributing|to implement|implementing|to fix|fixing)"
|
pattern: 'I would [like|love] [to help|helping|to contribute|contributing|to implement|implementing|to fix|fixing]'
|
||||||
isRegex: True
|
isRegex: True
|
||||||
then:
|
then:
|
||||||
- addReply:
|
- addReply:
|
||||||
reply: Hi! Your last comment indicates to our system, that you might want to contribute to this feature/fix this bug. Thank you! Please make us aware on our ["Would you like to contribute to PowerToys?" thread](https://github.com/microsoft/PowerToys/issues/28769), as we don't see all the comments. <br /><br />_I'm a bot (beep!) so please excuse any mistakes I may make_
|
reply: Hi! Your last comment indicates to our system, that you might want to contribute to this feature/fix this bug. Thank you! Please make us aware on our ["Would you like to contribute to PowerToys?" thread](https://github.com/microsoft/PowerToys/issues/28769), as we don't see all the comments. <br /><br />_I'm a bot (beep!) so please excuse any mistakes I may make_
|
||||||
description:
|
|
||||||
- if:
|
|
||||||
- payloadType: Issues
|
|
||||||
- isAction:
|
|
||||||
action: Opened
|
|
||||||
- bodyContains:
|
|
||||||
pattern: 'Area\(s\) with issue\?\s*\nWorkspaces'
|
|
||||||
isRegex: True
|
|
||||||
then:
|
|
||||||
- addLabel:
|
|
||||||
label: Product-Workspaces
|
|
||||||
description:
|
description:
|
||||||
onFailure:
|
onFailure:
|
||||||
onSuccess:
|
onSuccess:
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
parameters:
|
parameters:
|
||||||
|
- name: versionNumber
|
||||||
|
type: string
|
||||||
|
default: "0.0.1"
|
||||||
- name: perUserArg
|
- name: perUserArg
|
||||||
type: string
|
type: string
|
||||||
default: "false"
|
default: "false"
|
||||||
@@ -50,7 +53,7 @@ steps:
|
|||||||
displayName: "Extracting MSI to verify contents"
|
displayName: "Extracting MSI to verify contents"
|
||||||
inputs:
|
inputs:
|
||||||
script: |
|
script: |
|
||||||
"C:\Program Files (x86)\WiX Toolset v3.14\bin\dark.exe" -x $(build.sourcesdirectory)\extractedMsi installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-$(XES_BINARYVERSION)-$(BuildPlatform).msi
|
"C:\Program Files (x86)\WiX Toolset v3.14\bin\dark.exe" -x $(build.sourcesdirectory)\extractedMsi installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-${{ parameters.versionNumber }}-$(BuildPlatform).msi
|
||||||
dir $(build.sourcesdirectory)\extractedMsi
|
dir $(build.sourcesdirectory)\extractedMsi
|
||||||
|
|
||||||
# Check if deps.json files don't reference different dll versions.
|
# Check if deps.json files don't reference different dll versions.
|
||||||
@@ -99,7 +102,7 @@ steps:
|
|||||||
- task: CmdLine@2
|
- task: CmdLine@2
|
||||||
displayName: "Insignia: Extract Engine from Bundle"
|
displayName: "Insignia: Extract Engine from Bundle"
|
||||||
inputs:
|
inputs:
|
||||||
script: '"C:\Program Files (x86)\WiX Toolset v3.14\bin\insignia.exe" -ib installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-$(XES_BINARYVERSION)-$(BuildPlatform).exe -o installer\engine.exe'
|
script: '"C:\Program Files (x86)\WiX Toolset v3.14\bin\insignia.exe" -ib installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-${{ parameters.versionNumber }}-$(BuildPlatform).exe -o installer\engine.exe'
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@5
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@5
|
||||||
displayName: "ESRP CodeSigning (Engine)"
|
displayName: "ESRP CodeSigning (Engine)"
|
||||||
@@ -135,7 +138,7 @@ steps:
|
|||||||
- task: CmdLine@2
|
- task: CmdLine@2
|
||||||
displayName: "Insignia: Merge Engine into Bundle"
|
displayName: "Insignia: Merge Engine into Bundle"
|
||||||
inputs:
|
inputs:
|
||||||
script: '"C:\Program Files (x86)\WiX Toolset v3.14\bin\insignia.exe" -ab installer\engine.exe installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-$(XES_BINARYVERSION)-$(BuildPlatform).exe -o installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-$(XES_BINARYVERSION)-$(BuildPlatform).exe'
|
script: '"C:\Program Files (x86)\WiX Toolset v3.14\bin\insignia.exe" -ab installer\engine.exe installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-${{ parameters.versionNumber }}-$(BuildPlatform).exe -o installer\PowerToysSetup\$(BuildPlatform)\$(BuildConfiguration)\${{parameters.buildSubDir}}\${{parameters.installerPrefix}}-${{ parameters.versionNumber }}-$(BuildPlatform).exe'
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@5
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@5
|
||||||
displayName: Sign Bootstrapper
|
displayName: Sign Bootstrapper
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ parameters:
|
|||||||
default:
|
default:
|
||||||
- x64
|
- x64
|
||||||
- arm64
|
- arm64
|
||||||
|
- name: versionNumber
|
||||||
|
type: string
|
||||||
|
default: '0.0.1'
|
||||||
- name: signingParameters
|
- name: signingParameters
|
||||||
type: object
|
type: object
|
||||||
default:
|
default:
|
||||||
@@ -80,6 +83,13 @@ extends:
|
|||||||
submodules: true
|
submodules: true
|
||||||
persistCredentials: True
|
persistCredentials: True
|
||||||
|
|
||||||
|
# Sets versions for all PowerToy created DLLs
|
||||||
|
- task: PowerShell@1
|
||||||
|
displayName: Set Versions.Prop
|
||||||
|
inputs:
|
||||||
|
scriptName: .pipelines/versionSetting.ps1
|
||||||
|
arguments: -versionNumber '${{ parameters.versionNumber }}' -DevEnvironment ''
|
||||||
|
|
||||||
# ESRP needs 'Microsoft.NETCore.App', version '6.0.0' (x64)
|
# ESRP needs 'Microsoft.NETCore.App', version '6.0.0' (x64)
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Use .NET 6 SDK'
|
displayName: 'Use .NET 6 SDK'
|
||||||
@@ -110,13 +120,6 @@ extends:
|
|||||||
# - Webcam report tool
|
# - Webcam report tool
|
||||||
# - Installer
|
# - Installer
|
||||||
# - Bootstrapper Installer
|
# - Bootstrapper Installer
|
||||||
|
|
||||||
- pwsh: |-
|
|
||||||
nuget install -configFile .pipelines/release-nuget.config Microsoft.Windows.Terminal.Versioning -OutputDirectory _versioning
|
|
||||||
$VersionRoot = (Get-Item _versioning\Microsoft.Windows.*).FullName
|
|
||||||
& "$VersionRoot\build\Setup.ps1" -ProjectDirectory "$(Build.SourcesDirectory)" -Verbose
|
|
||||||
displayName: Set up versioning via M.W.T.V
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: Download and install WiX 3.14 development build
|
displayName: Download and install WiX 3.14 development build
|
||||||
inputs:
|
inputs:
|
||||||
@@ -484,6 +487,7 @@ extends:
|
|||||||
- template: .pipelines/installer-steps.yml@self
|
- template: .pipelines/installer-steps.yml@self
|
||||||
parameters:
|
parameters:
|
||||||
signingParameters: ${{ parameters.signingParameters }}
|
signingParameters: ${{ parameters.signingParameters }}
|
||||||
|
versionNumber: ${{ parameters.versionNumber }}
|
||||||
perUserArg: "false"
|
perUserArg: "false"
|
||||||
buildSubDir: "MachineSetup"
|
buildSubDir: "MachineSetup"
|
||||||
installerPrefix: "PowerToysSetup"
|
installerPrefix: "PowerToysSetup"
|
||||||
@@ -498,6 +502,7 @@ extends:
|
|||||||
- template: .pipelines/installer-steps.yml@self
|
- template: .pipelines/installer-steps.yml@self
|
||||||
parameters:
|
parameters:
|
||||||
signingParameters: ${{ parameters.signingParameters }}
|
signingParameters: ${{ parameters.signingParameters }}
|
||||||
|
versionNumber: ${{ parameters.versionNumber }}
|
||||||
perUserArg: "true"
|
perUserArg: "true"
|
||||||
buildSubDir: "UserSetup"
|
buildSubDir: "UserSetup"
|
||||||
installerPrefix: "PowerToysUserSetup"
|
installerPrefix: "PowerToysUserSetup"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"Microsoft.VisualStudio.Workload.ManagedDesktop",
|
"Microsoft.VisualStudio.Workload.ManagedDesktop",
|
||||||
"Microsoft.VisualStudio.Workload.Universal",
|
"Microsoft.VisualStudio.Workload.Universal",
|
||||||
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
|
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
|
||||||
"Microsoft.VisualStudio.Component.Windows10SDK.22621",
|
"Microsoft.VisualStudio.Component.Windows10SDK.20348",
|
||||||
"Microsoft.VisualStudio.ComponentGroup.UWP.VC",
|
"Microsoft.VisualStudio.ComponentGroup.UWP.VC",
|
||||||
"Microsoft.VisualStudio.Component.UWP.VC.ARM64",
|
"Microsoft.VisualStudio.Component.UWP.VC.ARM64",
|
||||||
"Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre",
|
"Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre",
|
||||||
|
|||||||
@@ -94,16 +94,17 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
||||||
<!-- Global props OverrideWindowsTargetPlatformVersion-->
|
<!-- Global props -->
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals"
|
||||||
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
|
Condition="'$(OverrideWindowsTargetPlatformVersion)'!='True'">
|
||||||
<TargetPlatformVersion>10.0.22621.0</TargetPlatformVersion>
|
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||||
|
<TargetPlatformVersion>10.0.20348.0</TargetPlatformVersion>
|
||||||
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
|
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Props that are constant for both Debug and Release configurations -->
|
<!-- Props that are constant for both Debug and Release configurations -->
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
<PlatformToolset Condition="'$(OverridePlatformToolset)'!='True'">v143</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<DesktopCompatible>true</DesktopCompatible>
|
<DesktopCompatible>true</DesktopCompatible>
|
||||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||||
|
|||||||
@@ -1,3 +1,133 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<Import Project="$(MSBuildThisFileDirectory)\custom.props" />
|
<Import Project="src\Version.props" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Copyright>Copyright (C) Microsoft Corporation. All rights reserved.</Copyright>
|
||||||
|
<AssemblyCopyright>Copyright (C) Microsoft Corporation. All rights reserved.</AssemblyCopyright>
|
||||||
|
<AssemblyProduct>PowerToys</AssemblyProduct>
|
||||||
|
<AssemblyCompany>Microsoft Corp.</AssemblyCompany>
|
||||||
|
<Company>Microsoft Corporation</Company>
|
||||||
|
<Authors>Microsoft Corporation</Authors>
|
||||||
|
<Product>PowerToys</Product>
|
||||||
|
<NeutralLanguage>en-US</NeutralLanguage>
|
||||||
|
<Platforms>x64;ARM64</Platforms>
|
||||||
|
<PackageTags>PowerToys</PackageTags>
|
||||||
|
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||||
|
<AnalysisMode>Recommended</AnalysisMode>
|
||||||
|
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
|
||||||
|
<NuGetAuditMode>direct</NuGetAuditMode>
|
||||||
|
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> <!-- Don't add source revision hash to the product version of binaries. -->
|
||||||
|
<PlatformTarget>$(Platform)</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
|
||||||
|
<Version>$(Version).0</Version>
|
||||||
|
<RepositoryUrl>https://github.com/microsoft/PowerToys</RepositoryUrl>
|
||||||
|
<RepositoryType>GitHub</RepositoryType>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<_PropertySheetDisplayName>PowerToys.Root.Props</_PropertySheetDisplayName>
|
||||||
|
<ForceImportBeforeCppProps>$(MsbuildThisFileDirectory)\Cpp.Build.props</ForceImportBeforeCppProps>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
|
||||||
|
<PackageReference Include="StyleCop.Analyzers">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
|
||||||
|
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\StyleCop.json" Link="StyleCop.json" />
|
||||||
|
|
||||||
|
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- Add ability to run tests via "msbuild /t:Test" -->
|
||||||
|
<!--
|
||||||
|
Workaround an MSBuild bug where Microsoft.Common.Test.targets is missing from the Arm64 installation.
|
||||||
|
See: https://github.com/dotnet/msbuild/pull/9984
|
||||||
|
NB 1: This means that using "/t:Test" is not supported for Arm64 builds and tests will need to be run in an alternate way,
|
||||||
|
eg running tests in VS or invoking vstest.console directly.
|
||||||
|
NB 2: <Sdk> elements do not support conditions, so this is also being worked around.
|
||||||
|
Once the change referenced above is fixed, the ImportGroup below can be replaced with:
|
||||||
|
<Sdk Name="Microsoft.Build.RunVSTest" Version="1.0.319" />
|
||||||
|
-->
|
||||||
|
<ImportGroup Condition="'$(PROCESSOR_ARCHITECTURE)' != 'ARM64'">
|
||||||
|
<Import Project="Sdk.props" Sdk="Microsoft.Build.RunVSTest" Version="1.0.319" />
|
||||||
|
<Import Project="Sdk.targets" Sdk="Microsoft.Build.RunVSTest" Version="1.0.319" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<VSTestLogger>trx</VSTestLogger>
|
||||||
|
<!--
|
||||||
|
RunVSTest by default uses %VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe,
|
||||||
|
but some of the CI scenarios don't define %VSINSTALLDIR%, so be explicit about where to look for vstest.
|
||||||
|
Note: $(VsInstallRoot) is a built-in MSBuild property, so should always be defined.
|
||||||
|
-->
|
||||||
|
<VSTestToolPath>$(VsInstallRoot)\Common7\IDE\CommonExtensions\Microsoft\TestWindow</VSTestToolPath>
|
||||||
|
<!-- No arm64 agents to run the tests. -->
|
||||||
|
<RunVSTest Condition="'$(Platform)' == 'ARM64'">false</RunVSTest>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- MSBuildCache -->
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- Off by default -->
|
||||||
|
<MSBuildCacheEnabled Condition="'$(MSBuildCacheEnabled)' == ''">false</MSBuildCacheEnabled>
|
||||||
|
|
||||||
|
<!-- In Azure pipelines, use Pipeline Caching as the cache storage backend. Otherwise, use the local cache. -->
|
||||||
|
<MSBuildCachePackageName Condition="'$(TF_BUILD)' != ''">Microsoft.MSBuildCache.AzurePipelines</MSBuildCachePackageName>
|
||||||
|
<MSBuildCachePackageName Condition="'$(MSBuildCachePackageName)' == ''">Microsoft.MSBuildCache.Local</MSBuildCachePackageName>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(MSBuildCacheEnabled)' == 'true'">
|
||||||
|
<!-- Disable when running in a pipeline as the time to upload or download the massive .pch/.pchast to the cache is greater than the savings they provide. -->
|
||||||
|
<UsePrecompiledHeaders Condition="'$(TF_BUILD)' != ''">false</UsePrecompiledHeaders>
|
||||||
|
|
||||||
|
<!-- Change this to bust the cache -->
|
||||||
|
<MSBuildCacheCacheUniverse Condition="'$(MSBuildCacheCacheUniverse)' == ''">202408150737</MSBuildCacheCacheUniverse>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Visual Studio telemetry reads various ApplicationInsights.config files and other files after the project is finished, likely in a detached process.
|
||||||
|
This is acceptable and should not impact cache correctness.
|
||||||
|
-->
|
||||||
|
<MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
||||||
|
$(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);
|
||||||
|
\**\ApplicationInsights.config;
|
||||||
|
$(LocalAppData)\Microsoft\VSApplicationInsights\**;
|
||||||
|
$(LocalAppData)\Microsoft\Windows\INetCache\**;
|
||||||
|
A:\;
|
||||||
|
E:\;
|
||||||
|
$(windir)\**;
|
||||||
|
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
||||||
|
|
||||||
|
<!-- Unit tests of low-priv processes, eg the preview handler tests, may log to this location. -->
|
||||||
|
<MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
||||||
|
$(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);
|
||||||
|
$(USERPROFILE)\AppData\LocalLow\Microsoft\PowerToys\**;
|
||||||
|
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
This repo uses a common output directory with many projects writing duplicate outputs. Allow everything, but note this costs some performance in the form of requiring
|
||||||
|
the cache to use copies instead of hardlinks when pulling from cache.
|
||||||
|
-->
|
||||||
|
<MSBuildCacheIdenticalDuplicateOutputPatterns>$(MSBuildCacheIdenticalDuplicateOutputPatterns);**</MSBuildCacheIdenticalDuplicateOutputPatterns>
|
||||||
|
|
||||||
|
<!-- version of MSBuildCache is not part of the cache key -->
|
||||||
|
<PackagesConfigFile>$(MSBuildThisFileDirectory)packages.config</PackagesConfigFile>
|
||||||
|
<MSBuildCacheIgnoredInputPatterns>$(MSBuildCacheIgnoredInputPatterns);$(PackagesConfigFile)</MSBuildCacheIgnoredInputPatterns>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(MSBuildCacheEnabled)' == 'true' and '$(MSBuildCachePackageRoot)' == ''">
|
||||||
|
<PackagesConfigContents>$([System.IO.File]::ReadAllText("$(PackagesConfigFile)"))</PackagesConfigContents>
|
||||||
|
<MSBuildCachePackageVersion>$([System.Text.RegularExpressions.Regex]::Match($(PackagesConfigContents), 'Microsoft.MSBuildCache.*?version="(.*?)"').Groups[1].Value)</MSBuildCachePackageVersion>
|
||||||
|
<MSBuildCachePackageRoot>$(MSBuildThisFileDirectory)packages\$(MSBuildCachePackageName).$(MSBuildCachePackageVersion)</MSBuildCachePackageRoot>
|
||||||
|
<MSBuildCacheSharedCompilationPackageRoot>$(MSBuildThisFileDirectory)packages\Microsoft.MSBuildCache.SharedCompilation.$(MSBuildCachePackageVersion)</MSBuildCacheSharedCompilationPackageRoot>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ImportGroup Condition="'$(MSBuildCacheEnabled)' == 'true'">
|
||||||
|
<Import Project="$(MSBuildCachePackageRoot)\build\$(MSBuildCachePackageName).props" />
|
||||||
|
<Import Project="$(MSBuildCacheSharedCompilationPackageRoot)\build\Microsoft.MSBuildCache.SharedCompilation.props" />
|
||||||
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<Import Project="$(MSBuildThisFileDirectory)\custom.targets" />
|
<Sdk Name="Microsoft.Build.CopyOnWrite" Version="1.0.282" />
|
||||||
</Project>
|
|
||||||
|
<Import Project="$(MSBuildCachePackageRoot)\build\$(MSBuildCachePackageName).targets" Condition="'$(MSBuildCacheEnabled)' == 'true'" />
|
||||||
|
<Import Project="$(MSBuildCacheSharedCompilationPackageRoot)\build\Microsoft.MSBuildCache.SharedCompilation.targets" Condition="'$(MSBuildCacheEnabled)' == 'true'" />
|
||||||
|
</Project>
|
||||||
@@ -6,14 +6,14 @@
|
|||||||
<PackageVersion Include="Appium.WebDriver" Version="4.4.5" />
|
<PackageVersion Include="Appium.WebDriver" Version="4.4.5" />
|
||||||
<PackageVersion Include="Azure.AI.OpenAI" Version="1.0.0-beta.12" />
|
<PackageVersion Include="Azure.AI.OpenAI" Version="1.0.0-beta.12" />
|
||||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Animations" Version="8.1.240821" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Animations" Version="8.0.240109" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Collections" Version="8.1.240821" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Collections" Version="8.0.240109" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.1.240821" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.0.240109" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.1.240821" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.0.240109" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Segmented" Version="8.1.240821" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Segmented" Version="8.0.240109" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.1.240821" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.0.240109" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Converters" Version="8.1.240821" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Converters" Version="8.0.240109" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.Extensions" Version="8.1.240821" />
|
<PackageVersion Include="CommunityToolkit.WinUI.Extensions" Version="8.0.240109" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
|
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
|
||||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
|
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
|
||||||
<PackageVersion Include="ControlzEx" Version="6.0.0" />
|
<PackageVersion Include="ControlzEx" Version="6.0.0" />
|
||||||
@@ -32,19 +32,15 @@
|
|||||||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
|
<PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
|
||||||
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2739.15" />
|
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2365.46" />
|
||||||
<!-- Package Microsoft.Win32.SystemEvents added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.1. This is a dependency of System.Drawing.Common but the 8.0.1 version wasn't published to nuget. -->
|
<!-- Package Microsoft.Win32.SystemEvents added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.1. This is a dependency of System.Drawing.Common but the 8.0.1 version wasn't published to nuget. -->
|
||||||
<PackageVersion Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
|
<PackageVersion Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
|
||||||
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="8.0.7" />
|
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="8.0.7" />
|
||||||
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
|
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
|
||||||
<!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. -->
|
<!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. -->
|
||||||
<!--
|
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.8" />
|
||||||
TODO: in Common.Dotnet.CsWinRT.props, on upgrade, verify RemoveCsWinRTPackageAnalyzer is no longer needed.
|
|
||||||
This is present due to a bug in CsWinRT where WPF projects cause the analyzer to fail.
|
|
||||||
-->
|
|
||||||
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.1.1" />
|
|
||||||
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
|
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
|
||||||
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.6.240829007" />
|
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.5.240428000" />
|
||||||
<PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
|
<PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
|
||||||
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
|
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
|
||||||
<PackageVersion Include="ModernWpfUI" Version="0.9.4" />
|
<PackageVersion Include="ModernWpfUI" Version="0.9.4" />
|
||||||
@@ -83,7 +79,7 @@
|
|||||||
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
||||||
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
|
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
|
||||||
<PackageVersion Include="UnicodeInformation" Version="2.6.0" />
|
<PackageVersion Include="UnicodeInformation" Version="2.6.0" />
|
||||||
<PackageVersion Include="UnitsNet" Version="5.56.0" />
|
<PackageVersion Include="UnitsNet" Version="5.50.0" />
|
||||||
<PackageVersion Include="UTF.Unknown" Version="2.5.1" />
|
<PackageVersion Include="UTF.Unknown" Version="2.5.1" />
|
||||||
<PackageVersion Include="WinUIEx" Version="2.2.0" />
|
<PackageVersion Include="WinUIEx" Version="2.2.0" />
|
||||||
<PackageVersion Include="WPF-UI" Version="3.0.0" />
|
<PackageVersion Include="WPF-UI" Version="3.0.0" />
|
||||||
|
|||||||
24
NOTICE.md
24
NOTICE.md
@@ -1299,14 +1299,14 @@ EXHIBIT A -Mozilla Public License.
|
|||||||
- Appium.WebDriver 4.4.5
|
- Appium.WebDriver 4.4.5
|
||||||
- Azure.AI.OpenAI 1.0.0-beta.12
|
- Azure.AI.OpenAI 1.0.0-beta.12
|
||||||
- CommunityToolkit.Mvvm 8.2.2
|
- CommunityToolkit.Mvvm 8.2.2
|
||||||
- CommunityToolkit.WinUI.Animations 8.1.240821
|
- CommunityToolkit.WinUI.Animations 8.0.240109
|
||||||
- CommunityToolkit.WinUI.Collections 8.1.240821
|
- CommunityToolkit.WinUI.Collections 8.0.240109
|
||||||
- CommunityToolkit.WinUI.Controls.Primitives 8.1.240821
|
- CommunityToolkit.WinUI.Controls.Primitives 8.0.240109
|
||||||
- CommunityToolkit.WinUI.Controls.Segmented 8.1.240821
|
- CommunityToolkit.WinUI.Controls.Segmented 8.0.240109
|
||||||
- CommunityToolkit.WinUI.Controls.SettingsControls 8.1.240821
|
- CommunityToolkit.WinUI.Controls.SettingsControls 8.0.240109
|
||||||
- CommunityToolkit.WinUI.Controls.Sizers 8.1.240821
|
- CommunityToolkit.WinUI.Controls.Sizers 8.0.240109
|
||||||
- CommunityToolkit.WinUI.Converters 8.1.240821
|
- CommunityToolkit.WinUI.Converters 8.0.240109
|
||||||
- CommunityToolkit.WinUI.Extensions 8.1.240821
|
- CommunityToolkit.WinUI.Extensions 8.0.240109
|
||||||
- CommunityToolkit.WinUI.UI.Controls.DataGrid 7.1.2
|
- CommunityToolkit.WinUI.UI.Controls.DataGrid 7.1.2
|
||||||
- CommunityToolkit.WinUI.UI.Controls.Markdown 7.1.2
|
- CommunityToolkit.WinUI.UI.Controls.Markdown 7.1.2
|
||||||
- ControlzEx 6.0.0
|
- ControlzEx 6.0.0
|
||||||
@@ -1325,13 +1325,13 @@ EXHIBIT A -Mozilla Public License.
|
|||||||
- Microsoft.Extensions.Logging 8.0.0
|
- Microsoft.Extensions.Logging 8.0.0
|
||||||
- Microsoft.Extensions.Logging.Abstractions 8.0.0
|
- Microsoft.Extensions.Logging.Abstractions 8.0.0
|
||||||
- Microsoft.Toolkit.Uwp.Notifications 7.1.2
|
- Microsoft.Toolkit.Uwp.Notifications 7.1.2
|
||||||
- Microsoft.Web.WebView2 1.0.2739.15
|
- Microsoft.Web.WebView2 1.0.2365.46
|
||||||
- Microsoft.Win32.SystemEvents 8.0.0
|
- Microsoft.Win32.SystemEvents 8.0.0
|
||||||
- Microsoft.Windows.Compatibility 8.0.7
|
- Microsoft.Windows.Compatibility 8.0.7
|
||||||
- Microsoft.Windows.CsWin32 0.2.46-beta
|
- Microsoft.Windows.CsWin32 0.2.46-beta
|
||||||
- Microsoft.Windows.CsWinRT 2.1.1
|
- Microsoft.Windows.CsWinRT 2.0.8
|
||||||
- Microsoft.Windows.SDK.BuildTools 10.0.22621.2428
|
- Microsoft.Windows.SDK.BuildTools 10.0.22621.2428
|
||||||
- Microsoft.WindowsAppSDK 1.6.240829007
|
- Microsoft.WindowsAppSDK 1.5.240428000
|
||||||
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9
|
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9
|
||||||
- Microsoft.Xaml.Behaviors.Wpf 1.1.39
|
- Microsoft.Xaml.Behaviors.Wpf 1.1.39
|
||||||
- ModernWpfUI 0.9.4
|
- ModernWpfUI 0.9.4
|
||||||
@@ -1363,7 +1363,7 @@ EXHIBIT A -Mozilla Public License.
|
|||||||
- System.Text.Encoding.CodePages 8.0.0
|
- System.Text.Encoding.CodePages 8.0.0
|
||||||
- System.Text.Json 8.0.4
|
- System.Text.Json 8.0.4
|
||||||
- UnicodeInformation 2.6.0
|
- UnicodeInformation 2.6.0
|
||||||
- UnitsNet 5.56.0
|
- UnitsNet 5.50.0
|
||||||
- UTF.Unknown 2.5.1
|
- UTF.Unknown 2.5.1
|
||||||
- WinUIEx 2.2.0
|
- WinUIEx 2.2.0
|
||||||
- WPF-UI 3.0.0
|
- WPF-UI 3.0.0
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||||||
Directory.Build.targets = Directory.Build.targets
|
Directory.Build.targets = Directory.Build.targets
|
||||||
Directory.Packages.props = Directory.Packages.props
|
Directory.Packages.props = Directory.Packages.props
|
||||||
Solution.props = Solution.props
|
Solution.props = Solution.props
|
||||||
|
src\Version.props = src\Version.props
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Settings.UI.Library", "src\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj", "{B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Settings.UI.Library", "src\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj", "{B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}"
|
||||||
|
|||||||
139
README.md
139
README.md
@@ -25,7 +25,7 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline
|
|||||||
| [Peek](https://aka.ms/PowerToysOverview_Peek) | [Paste as Plain Text](https://aka.ms/PowerToysOverview_PastePlain) | [PowerRename](https://aka.ms/PowerToysOverview_PowerRename) |
|
| [Peek](https://aka.ms/PowerToysOverview_Peek) | [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) | [Registry Preview](https://aka.ms/PowerToysOverview_RegistryPreview) |
|
| [PowerToys Run](https://aka.ms/PowerToysOverview_PowerToysRun) | [Quick Accent](https://aka.ms/PowerToysOverview_QuickAccent) | [Registry Preview](https://aka.ms/PowerToysOverview_RegistryPreview) |
|
||||||
| [Screen Ruler](https://aka.ms/PowerToysOverview_ScreenRuler) | [Shortcut Guide](https://aka.ms/PowerToysOverview_ShortcutGuide) | [Text Extractor](https://aka.ms/PowerToysOverview_TextExtractor) |
|
| [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) | [Workspaces](https://aka.ms/PowerToysOverview_Workspaces) |
|
| [Video Conference Mute](https://aka.ms/PowerToysOverview_VideoConference) |
|
||||||
|
|
||||||
## Installing and running Microsoft PowerToys
|
## Installing and running Microsoft PowerToys
|
||||||
|
|
||||||
@@ -41,19 +41,19 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline
|
|||||||
Go to the [Microsoft PowerToys GitHub releases page][github-release-link] and click on `Assets` at the bottom to show the files available in the release. Please use the appropriate PowerToys installer that matches your machine's architecture and install scope. For most, it is `x64` and per-user.
|
Go to the [Microsoft PowerToys GitHub releases page][github-release-link] and click on `Assets` at the bottom to show the files available in the release. Please use the appropriate PowerToys installer that matches your machine's architecture and install scope. For most, it is `x64` and per-user.
|
||||||
|
|
||||||
<!-- items that need to be updated release to release -->
|
<!-- items that need to be updated release to release -->
|
||||||
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.85%22
|
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.84%22
|
||||||
[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.84%22
|
[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.83%22
|
||||||
[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.1/PowerToysUserSetup-0.84.1-x64.exe
|
[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.83.0/PowerToysUserSetup-0.83.0-x64.exe
|
||||||
[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.1/PowerToysUserSetup-0.84.1-arm64.exe
|
[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.83.0/PowerToysUserSetup-0.83.0-arm64.exe
|
||||||
[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.1/PowerToysSetup-0.84.1-x64.exe
|
[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.83.0/PowerToysSetup-0.83.0-x64.exe
|
||||||
[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.84.1/PowerToysSetup-0.84.1-arm64.exe
|
[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.83.0/PowerToysSetup-0.83.0-arm64.exe
|
||||||
|
|
||||||
| Description | Filename | sha256 hash |
|
| Description | Filename | sha256 hash |
|
||||||
|----------------|----------|-------------|
|
|----------------|----------|-------------|
|
||||||
| Per user - x64 | [PowerToysUserSetup-0.84.1-x64.exe][ptUserX64] | 1CDAF3482B031D84DAE15188DE292FB44C5D211698089921040D94B256EBD3CA |
|
| Per user - x64 | [PowerToysUserSetup-0.83.0-x64.exe][ptUserX64] | C78E24F21C611F2BD774D8460ADD4B9AC8519085CA1253941CB46129331AB8C8 |
|
||||||
| Per user - ARM64 | [PowerToysUserSetup-0.84.1-arm64.exe][ptUserArm64] | E0207EF5147EE281D4F438E87A30586D8CAA24DE948950FF1B12E05454622CD9 |
|
| Per user - ARM64 | [PowerToysUserSetup-0.83.0-arm64.exe][ptUserArm64] | BA1C16003D55587D523A41B960D4A03718123CA37577D5F2A75E151D7653E6D3 |
|
||||||
| Machine wide - x64 | [PowerToysSetup-0.84.1-x64.exe][ptMachineX64] | 10DF9774DE1857051E135B9790A18A92C5C7F42587C733DEE991186E67231EE0 |
|
| Machine wide - x64 | [PowerToysSetup-0.83.0-x64.exe][ptMachineX64] | 7EC435A10849187D21A383E56A69213C1FF110B7FECA65900D9319D2F8162F35 |
|
||||||
| Machine wide - ARM64 | [PowerToysSetup-0.84.1-arm64.exe][ptMachineArm64] | EB5DDA5EFBA17E813DBF24AFF668DDF5424ED3659234ABBC15441D478D812699 |
|
| Machine wide - ARM64 | [PowerToysSetup-0.83.0-arm64.exe][ptMachineArm64] | 5E147424D1D12DFCA88DC4AA0657B7CC1F3B02812F1EBA3E564FAF691908D840 |
|
||||||
|
|
||||||
This is our preferred method.
|
This is our preferred method.
|
||||||
|
|
||||||
@@ -99,98 +99,117 @@ For guidance on developing for PowerToys, please read the [developer docs](/doc/
|
|||||||
|
|
||||||
Our [prioritized roadmap][roadmap] of features and utilities that the core team is focusing on.
|
Our [prioritized roadmap][roadmap] of features and utilities that the core team is focusing on.
|
||||||
|
|
||||||
### 0.84 - August 2024 Update
|
### 0.83 - July 2024 Update
|
||||||
|
|
||||||
In this release, we focused on adding a new utility (PowerToys Workspaces), Advanced paste custom actions feature, stability, and improvements.
|
In this release, we focused on stability and improvements.
|
||||||
|
|
||||||
**Highlights**
|
**Highlights**
|
||||||
|
|
||||||
- New utility: PowerToys Workspaces - this utility can launch a set of applications to a custom layout and configuration on the desktop. App arrangements can be saved as a workspace and then relaunched with one click from the Workspaces Editor or from a desktop shortcut. In the editor, app configuration can be customized using CLI arguments and "launch as admin" modifiers, and app window sizes and positions can be updated as desired. This is our first public version of Workspaces and we are excited for you to try it out for yourself! Make sure to file issues you encounter on our GitHub so the team can continue to improve the utility.
|
- Awake Quality of Life changes, including changing the tray icon to reflect the current mode. Thanks [@dend](https://github.com/dend)!
|
||||||
- Known issues - the team is actively working on fixing these:
|
- Changes to general GPO policies and new policies for Mouse Without Borders. The names for some intune policy configuration sets might need to be updated as seen in https://github.com/MicrosoftDocs/windows-dev-docs/pull/5045/files . Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||||
- Apps that launch as admin are unable to be repositioned to the desired layout.
|
|
||||||
- Border of "Remove" / "Add Back" app button in editor is not clearly visible on light themes.
|
|
||||||
- Added Awake --use-parent-pid CLI argument to attach to parent process. Thanks [@dend](https://github.com/dend)!
|
|
||||||
- Added custom actions - user-specified pre-defined prompts for the AI model. Additionally, actions (both standard and custom) are now searchable from prompt box and Ctrl + number in-app shortcuts are now applicable for first 9 search results.
|
|
||||||
- Ported all C++/CX code to C++/WinRT as part of a refactor and upgrade series aimed at enabling AOT (Ahead of Time) compilation for enhanced performance and reduced disk footprint.
|
|
||||||
|
|
||||||
### General
|
### General
|
||||||
|
- Reordered GPO policies, making it easier to find some policies. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||||
|
|
||||||
- Added DSC support for ImageResizer resize sizes property.
|
|
||||||
|
|
||||||
### Advanced Paste
|
### Advanced Paste
|
||||||
|
|
||||||
- Added custom actions - user-specified pre-defined prompts for the AI model. Additionally, actions (both standard and custom) are now searchable from prompt box and Ctrl + number in-app shortcuts are now applicable for first 9 search results.
|
- Fixed CSV parser to support double quotes and escape delimiters when pasting as JSON. Thanks [@GhostVaibhav](https://github.com/GhostVaibhav)!
|
||||||
|
- Improved double quote handling in the CSV parser when pasting as JSON. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||||
|
|
||||||
### Awake
|
### Awake
|
||||||
|
|
||||||
- Added --use-parent-pid CLI argument to attach to parent process and fixed issue causing tray icon to disappear. Thanks [@dend](https://github.com/dend)!
|
- Different modes will now show different icons in the system tray. Thanks [@dend](https://github.com/dend), and [@niels9001](https://github.com/niels9001) for the icon design!
|
||||||
|
- Removed the dependency on Windows Forms and used native Win32 APIs instead for the tray icon. Thanks [@dend](https://github.com/dend) and [@BrianPeek](https://github.com/BrianPeek)!
|
||||||
|
- Fixed an issue where the UI would become non-responsive after selecting no time for the timed mode. Thanks [@dend](https://github.com/dend)!
|
||||||
|
- Refactored code for easier maintenance. Thanks [@dend](https://github.com/dend)!
|
||||||
|
- The tray icon will now be shown when running Awake standalone to signal mode. Thanks [@dend](https://github.com/dend)!
|
||||||
|
- The tray icon tooltip shows how much time is left on the timer. Thanks [@dend](https://github.com/dend)!
|
||||||
|
- Added DPI awareness to the tray icon context menu. Thanks [@dend](https://github.com/dend)!
|
||||||
|
|
||||||
### Hosts File Editor
|
### Color Picker
|
||||||
|
|
||||||
- Fixed save failure when the hosts file is hidden. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
- Added support to using the mouse wheel to scroll through the color history. Thanks [@Fefedu973](https://github.com/Fefedu973)!
|
||||||
|
|
||||||
### File Explorer add-ons
|
### File Explorer add-ons
|
||||||
|
|
||||||
- Fixed multiple preview form positioning issues causing floating, detached windows, CoreWebView2 related exception and process leak. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
- Allow copying from the right-click menu in Monaco and Markdown previewers.
|
||||||
|
|
||||||
### Keyboard Manager
|
### File Locksmith
|
||||||
|
|
||||||
- Convert RemapBufferRow to a struct with descriptive field names. Thanks [@masaru-iritani](https://github.com/masaru-iritani)!
|
- Fixed a crash when there were a big number of entries being shown by moving the opened files of a process to another dialog.
|
||||||
- Fixed issue causing stuck Ctrl key when shortcuts contain AltGr key.
|
|
||||||
|
### Installer
|
||||||
|
|
||||||
|
- Fixed the path where DSC module files were installed for the user-scope installer. (This was a hotfix for 0.82)
|
||||||
|
|
||||||
|
### Mouse Without Borders
|
||||||
|
|
||||||
|
- Disabled non supported options in the old Mouse Without Borders UI. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||||
|
- Added new GPO policies to control the use of some features. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||||
|
|
||||||
### Peek
|
### Peek
|
||||||
|
|
||||||
- Added long paths support. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
- Allow copying from the right-click menu in Dev files and Markdown previews.
|
||||||
|
|
||||||
### Quick Accent
|
|
||||||
|
|
||||||
- Moved number superscripts and subscripts from Portuguese to all languages definition. Thanks [@octastylos-pseudodipteros](https://github.com/octastylos-pseudodipteros)!
|
|
||||||
|
|
||||||
### PowerRename
|
|
||||||
|
|
||||||
- Updated the tooltip text of the replace box info button. Thanks [@Agnibaan](https://github.com/Agnibaan)!
|
|
||||||
|
|
||||||
### PowerToys Run
|
### PowerToys Run
|
||||||
|
|
||||||
- Fixed window positioning on start-up introduced in 0.83.
|
- Fixed a crash on Windows 11 build 22000. (This was a hotfix for 0.82)
|
||||||
- Improved default web browser detection. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
- Blocked a transparency fix code from running on Windows 10, since it was causing graphical glitches. (This was a hotfix for 0.82)
|
||||||
- Fixed volume ounces conversion to support both imperial and metric. Thanks [@GhostVaibhav](https://github.com/GhostVaibhav)!
|
- Accept speed abbreviations like kilometers per hour (kmph) in the Unit Converter plugin. Thanks [@GhostVaibhav](https://github.com/GhostVaibhav)!
|
||||||
- Fixed thread-safety issue causing results not to be shown on first launch.
|
- Added settings to configure behavior of the "First week of year" and "First day of week" calculations in the DateTime plugin. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||||
|
- Fixed wrong initial position of the PowerToys Run when switching between monitors with different dpi values.
|
||||||
|
- Started allowing interchangeable use of / and \ in the registry plugin paths.
|
||||||
|
- Added support to automatic sign-in after rebooting with the System plugin. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||||
|
- Added suggested use example results to the Value Generator plugin. Thanks [@azlkiniue](https://github.com/azlkiniue)!
|
||||||
|
|
||||||
### Screen Ruler
|
### Quick Accent
|
||||||
|
|
||||||
- Added multiple measurements support for all measuring tools.
|
- Added support for the Bulgarian character set. Thanks [@octastylos-pseudodipteros](https://github.com/octastylos-pseudodipteros)!
|
||||||
|
|
||||||
|
### Runner
|
||||||
|
|
||||||
|
- Add code to handle release tags with an upper V when trying to detect new updates. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||||
|
|
||||||
### Settings
|
### Settings
|
||||||
|
|
||||||
- Improved disabled animations InfoBar in Find My Mouse page. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
- Fixed the UI spacing in the "update available" card. Thanks [@Agnibaan](https://github.com/Agnibaan)!
|
||||||
|
- Fixed the information bars in the Mouse Without Borders settings page to hide when the module is disabled. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||||
### Workspaces
|
- Improved consistency of the icons used in the Mouse Without Borders settings page. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||||
|
- Improved action keyword information bar padding in the PowerToys Run plugins section. Thanks [@htcfreek](https://github.com/htcfreek)!
|
||||||
- New utility: PowerToys Workspaces - this utility can launch a set of applications to a custom layout and configuration on the desktop. App arrangements can be saved as a workspace and then relaunched with one click from the Workspaces Editor or from a desktop shortcut. In the editor, app configuration can be customized using CLI arguments and "launch as admin" modifiers, and app window sizes and positions can be updated as desired. This is our first public version of Workspaces and we are excited for you to try it out for yourself! Make sure to file issues you encounter on our GitHub so the team can continue to improve the utility.
|
- Fixed a crash in the dashboard when Keyboard Manager Editor settings file became locked.
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
- Added ChatGPTPowerToys plugin mention to thirdPartyRunPlugins.md. Thanks [@ferraridavide](https://github.com/ferraridavide)!
|
- Added the RDP plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@anthony81799](https://github.com/anthony81799)!
|
||||||
|
- Added the GitHubRepo and ProcessKiller plugins to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@8LWXpg](https://github.com/8LWXpg)!
|
||||||
|
- Fixed a typo in the 0.82.0 release notes in README. Thanks [@walex999](https://github.com/walex999)!
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
|
|
||||||
- Ported all C++/CX code to C++/WinRT.
|
- Disabled FancyZone UI tests, to unblock PRs. We plan to bring them back in the future. (This was a hotfix for 0.82)
|
||||||
- Extracted self-containment related .csproj properties to src/Common.SelfContained.props.
|
- Fixed an issue where flakiness in CI was causing the installer custom actions DLL from being signed. (This was a hotfix for 0.82)
|
||||||
- Unused and obsolete dependencies cleanup. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
- Upgraded the Microsoft.Windows.Compatibility dependency to 8.0.7.
|
||||||
- Extracted CSWinRT related .csproj properties to src/Common.Dotnet.CsWinRT.props.
|
- Upgraded the System.Text.Json dependency to 8.0.4.
|
||||||
- Upgraded Microsoft.Windows.CsWinRT to 2.0.8 and updated verifyDepsJsonLibraryVersions.ps1 to unblock PRs.
|
- Upgraded the Microsoft.Data.Sqlite dependency to 8.0.7.
|
||||||
- Explicitly Set NuGet Audit Mode to Direct in Directory.Build.props to revert changes made with VS 17.12 update. Thanks [@snickler](https://github.com/snickler)!
|
- Upgraded the MSBuildCache dependency to 0.1.283-preview. Thanks [@dfederm](https://github.com/dfederm)!
|
||||||
- Upgraded UnitsNet to 5.56.0.
|
- Removed an unneeded /Zm compiler flag from Keyboard Manager Editor common build flags.
|
||||||
|
- Fixed the winget publish action to handle upper case V in the tag name. Thanks [@mdanish-kh](https://github.com/mdanish-kh)!
|
||||||
|
- Removed wildcard items from vcxproj files. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||||
|
- Removed the similar issues bot GitHub actions. Thanks [@craigloewen-msft](https://github.com/craigloewen-msft)!
|
||||||
|
- Fixed CODEOWNERS to better protect changes in some files.
|
||||||
|
- Switched machines being used in CI and pointed status badges in README to the new machines.
|
||||||
|
- Fixed NU1503 build warnings when building PowerToys. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
|
||||||
|
- Use the MSTest meta dependency for running the tests instead of the individual testing packages. Thanks [@stan-sz](https://github.com/stan-sz)!
|
||||||
|
- Added missing CppWinRT references.
|
||||||
|
|
||||||
#### What is being planned for version 0.84
|
#### What is being planned for version 0.84
|
||||||
|
|
||||||
For [v0.85][github-next-release-work], we'll work on the items below:
|
For [v0.84][github-next-release-work], we'll work on the items below:
|
||||||
|
|
||||||
- Stability / bug fixes
|
- Stability / bug fixes
|
||||||
|
- New utility: Dev Projects
|
||||||
- Language selection
|
- Language selection
|
||||||
- New module: File Actions Menu
|
- New module: File Actions Menu
|
||||||
- New module: New+
|
|
||||||
|
|
||||||
## PowerToys Community
|
## PowerToys Community
|
||||||
|
|
||||||
|
|||||||
136
custom.props
136
custom.props
@@ -1,136 +0,0 @@
|
|||||||
<Project>
|
|
||||||
<PropertyGroup Label="Version">
|
|
||||||
<VersionMajor>0</VersionMajor>
|
|
||||||
<VersionMinor>86</VersionMinor>
|
|
||||||
<VersionInfoProductName>PowerToys</VersionInfoProductName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<Copyright>Copyright (C) Microsoft Corporation. All rights reserved.</Copyright>
|
|
||||||
<AssemblyCopyright>Copyright (C) Microsoft Corporation. All rights reserved.</AssemblyCopyright>
|
|
||||||
<AssemblyProduct>PowerToys</AssemblyProduct>
|
|
||||||
<AssemblyCompany>Microsoft Corp.</AssemblyCompany>
|
|
||||||
<Company>Microsoft Corporation</Company>
|
|
||||||
<Authors>Microsoft Corporation</Authors>
|
|
||||||
<Product>PowerToys</Product>
|
|
||||||
<NeutralLanguage>en-US</NeutralLanguage>
|
|
||||||
<Platforms>x64;ARM64</Platforms>
|
|
||||||
<PackageTags>PowerToys</PackageTags>
|
|
||||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
|
||||||
<AnalysisMode>Recommended</AnalysisMode>
|
|
||||||
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
|
|
||||||
<NuGetAuditMode>direct</NuGetAuditMode>
|
|
||||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> <!-- Don't add source revision hash to the product version of binaries. -->
|
|
||||||
<PlatformTarget>$(Platform)</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
|
|
||||||
<RepositoryUrl>https://github.com/microsoft/PowerToys</RepositoryUrl>
|
|
||||||
<RepositoryType>GitHub</RepositoryType>
|
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<_PropertySheetDisplayName>PowerToys.Root.Props</_PropertySheetDisplayName>
|
|
||||||
<ForceImportBeforeCppProps>$(MsbuildThisFileDirectory)\Cpp.Build.props</ForceImportBeforeCppProps>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
|
|
||||||
<PackageReference Include="StyleCop.Analyzers">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
|
|
||||||
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\StyleCop.json" Link="StyleCop.json" />
|
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<!-- Add ability to run tests via "msbuild /t:Test" -->
|
|
||||||
<!--
|
|
||||||
Workaround an MSBuild bug where Microsoft.Common.Test.targets is missing from the Arm64 installation.
|
|
||||||
See: https://github.com/dotnet/msbuild/pull/9984
|
|
||||||
NB 1: This means that using "/t:Test" is not supported for Arm64 builds and tests will need to be run in an alternate way,
|
|
||||||
eg running tests in VS or invoking vstest.console directly.
|
|
||||||
NB 2: <Sdk> elements do not support conditions, so this is also being worked around.
|
|
||||||
Once the change referenced above is fixed, the ImportGroup below can be replaced with:
|
|
||||||
<Sdk Name="Microsoft.Build.RunVSTest" Version="1.0.319" />
|
|
||||||
-->
|
|
||||||
<ImportGroup Condition="'$(PROCESSOR_ARCHITECTURE)' != 'ARM64'">
|
|
||||||
<Import Project="Sdk.props" Sdk="Microsoft.Build.RunVSTest" Version="1.0.319" />
|
|
||||||
<Import Project="Sdk.targets" Sdk="Microsoft.Build.RunVSTest" Version="1.0.319" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<VSTestLogger>trx</VSTestLogger>
|
|
||||||
<!--
|
|
||||||
RunVSTest by default uses %VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe,
|
|
||||||
but some of the CI scenarios don't define %VSINSTALLDIR%, so be explicit about where to look for vstest.
|
|
||||||
Note: $(VsInstallRoot) is a built-in MSBuild property, so should always be defined.
|
|
||||||
-->
|
|
||||||
<VSTestToolPath>$(VsInstallRoot)\Common7\IDE\CommonExtensions\Microsoft\TestWindow</VSTestToolPath>
|
|
||||||
<!-- No arm64 agents to run the tests. -->
|
|
||||||
<RunVSTest Condition="'$(Platform)' == 'ARM64'">false</RunVSTest>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<!-- MSBuildCache -->
|
|
||||||
<PropertyGroup>
|
|
||||||
<!-- Off by default -->
|
|
||||||
<MSBuildCacheEnabled Condition="'$(MSBuildCacheEnabled)' == ''">false</MSBuildCacheEnabled>
|
|
||||||
|
|
||||||
<!-- In Azure pipelines, use Pipeline Caching as the cache storage backend. Otherwise, use the local cache. -->
|
|
||||||
<MSBuildCachePackageName Condition="'$(TF_BUILD)' != ''">Microsoft.MSBuildCache.AzurePipelines</MSBuildCachePackageName>
|
|
||||||
<MSBuildCachePackageName Condition="'$(MSBuildCachePackageName)' == ''">Microsoft.MSBuildCache.Local</MSBuildCachePackageName>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(MSBuildCacheEnabled)' == 'true'">
|
|
||||||
<!-- Disable when running in a pipeline as the time to upload or download the massive .pch/.pchast to the cache is greater than the savings they provide. -->
|
|
||||||
<UsePrecompiledHeaders Condition="'$(TF_BUILD)' != ''">false</UsePrecompiledHeaders>
|
|
||||||
|
|
||||||
<!-- Change this to bust the cache -->
|
|
||||||
<MSBuildCacheCacheUniverse Condition="'$(MSBuildCacheCacheUniverse)' == ''">202408150737</MSBuildCacheCacheUniverse>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Visual Studio telemetry reads various ApplicationInsights.config files and other files after the project is finished, likely in a detached process.
|
|
||||||
This is acceptable and should not impact cache correctness.
|
|
||||||
-->
|
|
||||||
<MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
|
||||||
$(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);
|
|
||||||
\**\ApplicationInsights.config;
|
|
||||||
$(LocalAppData)\Microsoft\VSApplicationInsights\**;
|
|
||||||
$(LocalAppData)\Microsoft\Windows\INetCache\**;
|
|
||||||
A:\;
|
|
||||||
E:\;
|
|
||||||
$(windir)\**;
|
|
||||||
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
|
||||||
|
|
||||||
<!-- Unit tests of low-priv processes, eg the preview handler tests, may log to this location. -->
|
|
||||||
<MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
|
||||||
$(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);
|
|
||||||
$(USERPROFILE)\AppData\LocalLow\Microsoft\PowerToys\**;
|
|
||||||
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
This repo uses a common output directory with many projects writing duplicate outputs. Allow everything, but note this costs some performance in the form of requiring
|
|
||||||
the cache to use copies instead of hardlinks when pulling from cache.
|
|
||||||
-->
|
|
||||||
<MSBuildCacheIdenticalDuplicateOutputPatterns>$(MSBuildCacheIdenticalDuplicateOutputPatterns);**</MSBuildCacheIdenticalDuplicateOutputPatterns>
|
|
||||||
|
|
||||||
<!-- version of MSBuildCache is not part of the cache key -->
|
|
||||||
<PackagesConfigFile>$(MSBuildThisFileDirectory)packages.config</PackagesConfigFile>
|
|
||||||
<MSBuildCacheIgnoredInputPatterns>$(MSBuildCacheIgnoredInputPatterns);$(PackagesConfigFile)</MSBuildCacheIgnoredInputPatterns>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(MSBuildCacheEnabled)' == 'true' and '$(MSBuildCachePackageRoot)' == ''">
|
|
||||||
<PackagesConfigContents>$([System.IO.File]::ReadAllText("$(PackagesConfigFile)"))</PackagesConfigContents>
|
|
||||||
<MSBuildCachePackageVersion>$([System.Text.RegularExpressions.Regex]::Match($(PackagesConfigContents), 'Microsoft.MSBuildCache.*?version="(.*?)"').Groups[1].Value)</MSBuildCachePackageVersion>
|
|
||||||
<MSBuildCachePackageRoot>$(MSBuildThisFileDirectory)packages\$(MSBuildCachePackageName).$(MSBuildCachePackageVersion)</MSBuildCachePackageRoot>
|
|
||||||
<MSBuildCacheSharedCompilationPackageRoot>$(MSBuildThisFileDirectory)packages\Microsoft.MSBuildCache.SharedCompilation.$(MSBuildCachePackageVersion)</MSBuildCacheSharedCompilationPackageRoot>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ImportGroup Condition="'$(MSBuildCacheEnabled)' == 'true'">
|
|
||||||
<Import Project="$(MSBuildCachePackageRoot)\build\$(MSBuildCachePackageName).props" />
|
|
||||||
<Import Project="$(MSBuildCacheSharedCompilationPackageRoot)\build\Microsoft.MSBuildCache.SharedCompilation.props" />
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<Project>
|
|
||||||
<Sdk Name="Microsoft.Build.CopyOnWrite" Version="1.0.282" />
|
|
||||||
|
|
||||||
<Import Project="$(MSBuildCachePackageRoot)\build\$(MSBuildCachePackageName).targets" Condition="'$(MSBuildCacheEnabled)' == 'true'" />
|
|
||||||
<Import Project="$(MSBuildCacheSharedCompilationPackageRoot)\build\Microsoft.MSBuildCache.SharedCompilation.targets" Condition="'$(MSBuildCacheEnabled)' == 'true'" />
|
|
||||||
</Project>
|
|
||||||
@@ -10,23 +10,12 @@ The build ID can be found in `Core\Constants.cs` in the `BuildId` variable - it
|
|||||||
|
|
||||||
The build ID moniker is made up of two components - a reference to a [Halo](https://en.wikipedia.org/wiki/Halo_(franchise)) character, and the date when the work on the specific build started in the format of `MMDDYYYY`.
|
The build ID moniker is made up of two components - a reference to a [Halo](https://en.wikipedia.org/wiki/Halo_(franchise)) character, and the date when the work on the specific build started in the format of `MMDDYYYY`.
|
||||||
|
|
||||||
| Build ID | Build Date |
|
| Build ID | Build Date |
|
||||||
|:-------------------------------------------------------------------|:----------------|
|
|:----------------------------------------------------------|:-----------------|
|
||||||
| [`VISEGRADRELAY_08152024`](#VISEGRADRELAY_08152024-august-15-2024) | August 15, 2024 |
|
| [`DAISY023_04102024`](#DAISY023_04102024-april-10-2024) | April 10, 2024 |
|
||||||
| [`DAISY023_04102024`](#DAISY023_04102024-april-10-2024) | April 10, 2024 |
|
| [`ATRIOX_04132023`](#ATRIOX_04132023-april-13-2023) | April 13, 2023 |
|
||||||
| [`ATRIOX_04132023`](#ATRIOX_04132023-april-13-2023) | April 13, 2023 |
|
| [`LIBRARIAN_03202022`](#librarian_03202022-march-20-2022) | March 20, 2022 |
|
||||||
| [`LIBRARIAN_03202022`](#librarian_03202022-march-20-2022) | March 20, 2022 |
|
| `ARBITER_01312022` | January 31, 2022 |
|
||||||
| `ARBITER_01312022` | January 31, 2022 |
|
|
||||||
|
|
||||||
### `VISEGRADRELAY_08152024` (August 15, 2024)
|
|
||||||
|
|
||||||
>[!NOTE]
|
|
||||||
>See pull request: [Awake - `VISEGRADRELAY_08152024`](https://github.com/microsoft/PowerToys/pull/34316)
|
|
||||||
|
|
||||||
- [#34148](https://github.com/microsoft/PowerToys/issues/34148) Fixes the issue where the Awake icon is not displayed.
|
|
||||||
- [#17969](https://github.com/microsoft/PowerToys/issues/17969) Add the ability to bind the process target to the parent of the Awake launcher.
|
|
||||||
- PID binding now correctly ignores irrelevant parameters (e.g., expiration, interval) and only works for indefinite periods.
|
|
||||||
- Amending the native API surface to make sure that the Win32 error is set correctly.
|
|
||||||
|
|
||||||
### `DAISY023_04102024` (April 10, 2024)
|
### `DAISY023_04102024` (April 10, 2024)
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ Contact the developers of a plugin directly for assistance with a specific plugi
|
|||||||
| [PowerHexInspector](https://github.com/NaroZeol/PowerHexInspector) | [NaroZeol](https://github.com/NaroZeol) | Peek other forms of an input number |
|
| [PowerHexInspector](https://github.com/NaroZeol/PowerHexInspector) | [NaroZeol](https://github.com/NaroZeol) | Peek other forms of an input number |
|
||||||
| [GitHubRepo](https://github.com/8LWXpg/PowerToysRun-GitHubRepo) | [8LWXpg](https://github.com/8LWXpg) | Search and open GitHub repositories |
|
| [GitHubRepo](https://github.com/8LWXpg/PowerToysRun-GitHubRepo) | [8LWXpg](https://github.com/8LWXpg) | Search and open GitHub repositories |
|
||||||
| [ProcessKiller](https://github.com/8LWXpg/PowerToysRun-ProcessKiller) | [8LWXpg](https://github.com/8LWXpg) | Search and kill processes |
|
| [ProcessKiller](https://github.com/8LWXpg/PowerToysRun-ProcessKiller) | [8LWXpg](https://github.com/8LWXpg) | Search and kill processes |
|
||||||
| [ChatGPT](https://github.com/ferraridavide/ChatGPTPowerToys) | [ferraridavide](https://github.com/ferraridavide) | Ask a question to ChatGPT |
|
|
||||||
|
|
||||||
## Extending software plugins
|
## Extending software plugins
|
||||||
|
|
||||||
@@ -50,7 +49,7 @@ Below are community created plugins that target a website or software. They are
|
|||||||
| [Edge Workspaces](https://github.com/quachpas/PowerToys-Run-EdgeWorkspaces) | [quachpas](https://github.com/quachpas) | Open Microsoft Edge workspaces|
|
| [Edge Workspaces](https://github.com/quachpas/PowerToys-Run-EdgeWorkspaces) | [quachpas](https://github.com/quachpas) | Open Microsoft Edge workspaces|
|
||||||
| [Everything](https://github.com/lin-ycv/EverythingPowerToys) | [Yu Chieh (Victor) Lin](https://github.com/Lin-ycv) | Get search results from Everything |
|
| [Everything](https://github.com/lin-ycv/EverythingPowerToys) | [Yu Chieh (Victor) Lin](https://github.com/Lin-ycv) | Get search results from Everything |
|
||||||
| [GitKraken](https://github.com/davidegiacometti/PowerToys-Run-GitKraken) | [davidegiacometti](https://github.com/davidegiacometti) | Open GitKraken repositories |
|
| [GitKraken](https://github.com/davidegiacometti/PowerToys-Run-GitKraken) | [davidegiacometti](https://github.com/davidegiacometti) | Open GitKraken repositories |
|
||||||
| [RDP](https://github.com/anthony81799/PowerToysRun-RDP) | [anthony81799](https://github.com/anthony81799) | Open Remote Desktop connections |
|
| [RDP](https://github.com/anthony81799/PowerToysRun-RDP)) | [anthony81799](https://github.com/anthony81799) | Open Remote Desktop connections |
|
||||||
| [Visual Studio Recents](https://github.com/davidegiacometti/PowerToys-Run-VisualStudio) | [davidegiacometti](https://github.com/davidegiacometti) | Open Visual Studio recents |
|
| [Visual Studio Recents](https://github.com/davidegiacometti/PowerToys-Run-VisualStudio) | [davidegiacometti](https://github.com/davidegiacometti) | Open Visual Studio recents |
|
||||||
| [WinGet](https://github.com/bostrot/PowerToysRunPluginWinget) | [bostrot](https://github.com/bostrot) | Search and install packages from WinGet |
|
| [WinGet](https://github.com/bostrot/PowerToysRunPluginWinget) | [bostrot](https://github.com/bostrot) | Search and install packages from WinGet |
|
||||||
| [Scoop](https://github.com/Quriz/PowerToysRunScoop) | [Quriz](https://github.com/Quriz) | Search and install packages from Scoop |
|
| [Scoop](https://github.com/Quriz/PowerToysRunScoop) | [Quriz](https://github.com/Quriz) | Search and install packages from Scoop |
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
DefaultTargets="Build"
|
DefaultTargets="Build"
|
||||||
InitialTargets="EnsureNuGetPackageBuildImports"
|
InitialTargets="EnsureNuGetPackageBuildImports"
|
||||||
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="..\..\custom.props" />
|
<Import Project="..\..\src\Version.props" Condition="Exists('..\..\src\Version.props')" />
|
||||||
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
|
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<DefineConstants>Version=$(VersionMajor).$(VersionMinor)</DefineConstants>
|
<DefineConstants>Version=$(Version)</DefineConstants>
|
||||||
<Name>PowerToysBootstrapper</Name>
|
<Name>PowerToysBootstrapper</Name>
|
||||||
<ProjectGuid>{31d72625-43c1-41b1-b784-bce4a8dc5543}</ProjectGuid>
|
<ProjectGuid>{31d72625-43c1-41b1-b784-bce4a8dc5543}</ProjectGuid>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -84,4 +84,4 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Restore" />
|
<Target Name="Restore" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports"
|
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports"
|
||||||
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="..\..\custom.props" />
|
<Import Project="..\..\src\Version.props" Condition="Exists('..\..\src\Version.props')" />
|
||||||
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
|
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Platform)' == 'x64'">
|
<PropertyGroup Condition="'$(Platform)' == 'x64'">
|
||||||
<DefineConstants>Version=$(VersionMajor).$(VersionMinor);MonacoSRCHarvestPath=$(ProjectDir)..\..\x64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants>
|
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\x64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants>
|
||||||
<!-- THIS IS AN INNER LOOP OPTIMIZATION
|
<!-- THIS IS AN INNER LOOP OPTIMIZATION
|
||||||
The build pipeline builds the Settings and Launcher projects for Publication
|
The build pipeline builds the Settings and Launcher projects for Publication
|
||||||
using a specific profile. If you're doing local installer builds, this will
|
using a specific profile. If you're doing local installer builds, this will
|
||||||
@@ -194,4 +194,4 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="Restore" />
|
<Target Name="Restore" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
//
|
//
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../../src/common/version/version.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -13,6 +14,39 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// English (United States) resources
|
// English (United States) resources
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,36 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../common/version/version.h"
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
<!-- Some items may be set in Directory.Build.props in root -->
|
<!-- Some items may be set in Directory.Build.props in root -->
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<WindowsSdkPackageVersion>10.0.22621.38</WindowsSdkPackageVersion>
|
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||||
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
|
|
||||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||||
@@ -34,11 +33,4 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Windows.CsWinRT" />
|
<PackageReference Include="Microsoft.Windows.CsWinRT" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- this may need to be removed on future CsWinRT upgrades-->
|
|
||||||
<Target Name="RemoveCsWinRTPackageAnalyzer" BeforeTargets="CoreCompile">
|
|
||||||
<ItemGroup>
|
|
||||||
<Analyzer Remove="@(Analyzer)" Condition="%(Analyzer.NuGetPackageId) == 'Microsoft.Windows.CsWinRT'" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Target>
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,3 +1,36 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../common/version/version.h"
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
using Microsoft.PowerToys.Settings.UI.Library.Telemetry.Events;
|
using Microsoft.PowerToys.Settings.UI.Library.Telemetry.Events;
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.VariantAssignment.Client;
|
using Microsoft.VariantAssignment.Client;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
using Markdig;
|
using Markdig;
|
||||||
|
|
||||||
namespace Microsoft.PowerToys.FilePreviewCommon
|
namespace Microsoft.PowerToys.FilePreviewCommon
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ using System.Globalization;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
using Microsoft.PowerToys.FilePreviewCommon.Monaco.Formatters;
|
using Microsoft.PowerToys.FilePreviewCommon.Monaco.Formatters;
|
||||||
|
|
||||||
namespace Microsoft.PowerToys.FilePreviewCommon
|
namespace Microsoft.PowerToys.FilePreviewCommon
|
||||||
|
|||||||
@@ -1,7 +1,40 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../../../common/version/version.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
#include "winres.h"
|
#include "winres.h"
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using System.Diagnostics;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO.Abstractions;
|
using System.IO.Abstractions;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
using PowerToys.Interop;
|
using PowerToys.Interop;
|
||||||
|
|
||||||
namespace ManagedCommon
|
namespace ManagedCommon
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using System;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace ManagedCommon
|
namespace ManagedCommon
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|
||||||
namespace Microsoft.PowerToys.Telemetry
|
namespace Microsoft.PowerToys.Telemetry
|
||||||
|
|||||||
@@ -1,3 +1,36 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../version/version.h"
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|||||||
@@ -51,21 +51,17 @@ namespace winrt::PowerToys::Interop::implementation
|
|||||||
{
|
{
|
||||||
return CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT;
|
return CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT;
|
||||||
}
|
}
|
||||||
hstring Constants::AdvancedPasteShowUIMessage()
|
hstring Constants::ShowAdvancedPasteSharedEvent()
|
||||||
{
|
{
|
||||||
return CommonSharedConstants::ADVANCED_PASTE_SHOW_UI_MESSAGE;
|
return CommonSharedConstants::SHOW_ADVANCED_PASTE_SHARED_EVENT;
|
||||||
}
|
}
|
||||||
hstring Constants::AdvancedPasteMarkdownMessage()
|
hstring Constants::AdvancedPasteMarkdownEvent()
|
||||||
{
|
{
|
||||||
return CommonSharedConstants::ADVANCED_PASTE_MARKDOWN_MESSAGE;
|
return CommonSharedConstants::ADVANCED_PASTE_MARKDOWN_EVENT;
|
||||||
}
|
}
|
||||||
hstring Constants::AdvancedPasteJsonMessage()
|
hstring Constants::AdvancedPasteJsonEvent()
|
||||||
{
|
{
|
||||||
return CommonSharedConstants::ADVANCED_PASTE_JSON_MESSAGE;
|
return CommonSharedConstants::ADVANCED_PASTE_JSON_EVENT;
|
||||||
}
|
|
||||||
hstring Constants::AdvancedPasteCustomActionMessage()
|
|
||||||
{
|
|
||||||
return CommonSharedConstants::ADVANCED_PASTE_CUSTOM_ACTION_MESSAGE;
|
|
||||||
}
|
}
|
||||||
hstring Constants::ShowPowerOCRSharedEvent()
|
hstring Constants::ShowPowerOCRSharedEvent()
|
||||||
{
|
{
|
||||||
@@ -151,8 +147,4 @@ namespace winrt::PowerToys::Interop::implementation
|
|||||||
{
|
{
|
||||||
return CommonSharedConstants::WORKSPACES_LAUNCH_EDITOR_EVENT;
|
return CommonSharedConstants::WORKSPACES_LAUNCH_EDITOR_EVENT;
|
||||||
}
|
}
|
||||||
hstring Constants::WorkspacesHotkeyEvent()
|
|
||||||
{
|
|
||||||
return CommonSharedConstants::WORKSPACES_HOTKEY_EVENT;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,10 +16,9 @@ namespace winrt::PowerToys::Interop::implementation
|
|||||||
static hstring FZEToggleEvent();
|
static hstring FZEToggleEvent();
|
||||||
static hstring ColorPickerSendSettingsTelemetryEvent();
|
static hstring ColorPickerSendSettingsTelemetryEvent();
|
||||||
static hstring ShowColorPickerSharedEvent();
|
static hstring ShowColorPickerSharedEvent();
|
||||||
static hstring AdvancedPasteShowUIMessage();
|
static hstring ShowAdvancedPasteSharedEvent();
|
||||||
static hstring AdvancedPasteMarkdownMessage();
|
static hstring AdvancedPasteMarkdownEvent();
|
||||||
static hstring AdvancedPasteJsonMessage();
|
static hstring AdvancedPasteJsonEvent();
|
||||||
static hstring AdvancedPasteCustomActionMessage();
|
|
||||||
static hstring ShowPowerOCRSharedEvent();
|
static hstring ShowPowerOCRSharedEvent();
|
||||||
static hstring MouseJumpShowPreviewEvent();
|
static hstring MouseJumpShowPreviewEvent();
|
||||||
static hstring AwakeExitEvent();
|
static hstring AwakeExitEvent();
|
||||||
@@ -41,7 +40,6 @@ namespace winrt::PowerToys::Interop::implementation
|
|||||||
static hstring ShowEnvironmentVariablesSharedEvent();
|
static hstring ShowEnvironmentVariablesSharedEvent();
|
||||||
static hstring ShowEnvironmentVariablesAdminSharedEvent();
|
static hstring ShowEnvironmentVariablesAdminSharedEvent();
|
||||||
static hstring WorkspacesLaunchEditorEvent();
|
static hstring WorkspacesLaunchEditorEvent();
|
||||||
static hstring WorkspacesHotkeyEvent();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,9 @@ namespace PowerToys
|
|||||||
static String FZEToggleEvent();
|
static String FZEToggleEvent();
|
||||||
static String ColorPickerSendSettingsTelemetryEvent();
|
static String ColorPickerSendSettingsTelemetryEvent();
|
||||||
static String ShowColorPickerSharedEvent();
|
static String ShowColorPickerSharedEvent();
|
||||||
static String AdvancedPasteShowUIMessage();
|
static String ShowAdvancedPasteSharedEvent();
|
||||||
static String AdvancedPasteMarkdownMessage();
|
static String AdvancedPasteMarkdownEvent();
|
||||||
static String AdvancedPasteJsonMessage();
|
static String AdvancedPasteJsonEvent();
|
||||||
static String AdvancedPasteCustomActionMessage();
|
|
||||||
static String ShowPowerOCRSharedEvent();
|
static String ShowPowerOCRSharedEvent();
|
||||||
static String MouseJumpShowPreviewEvent();
|
static String MouseJumpShowPreviewEvent();
|
||||||
static String AwakeExitEvent();
|
static String AwakeExitEvent();
|
||||||
@@ -38,7 +37,6 @@ namespace PowerToys
|
|||||||
static String ShowEnvironmentVariablesSharedEvent();
|
static String ShowEnvironmentVariablesSharedEvent();
|
||||||
static String ShowEnvironmentVariablesAdminSharedEvent();
|
static String ShowEnvironmentVariablesAdminSharedEvent();
|
||||||
static String WorkspacesLaunchEditorEvent();
|
static String WorkspacesLaunchEditorEvent();
|
||||||
static String WorkspacesHotkeyEvent();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using PowerToys.Interop;
|
using PowerToys.Interop;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -25,14 +25,12 @@ namespace CommonSharedConstants
|
|||||||
|
|
||||||
const wchar_t COLOR_PICKER_SEND_SETTINGS_TELEMETRY_EVENT[] = L"Local\\ColorPickerSettingsTelemetryEvent-6c7071d8-4014-46ec-b687-913bd8a422f1";
|
const wchar_t COLOR_PICKER_SEND_SETTINGS_TELEMETRY_EVENT[] = L"Local\\ColorPickerSettingsTelemetryEvent-6c7071d8-4014-46ec-b687-913bd8a422f1";
|
||||||
|
|
||||||
// IPC Messages used in Advanced Paste
|
// Path to the event used to show Advanced Paste UI
|
||||||
const wchar_t ADVANCED_PASTE_SHOW_UI_MESSAGE[] = L"ShowUI";
|
const wchar_t SHOW_ADVANCED_PASTE_SHARED_EVENT[] = L"Local\\ShowAdvancedPasteEvent-9a46be2a-3e05-4186-b56b-4ae986ef2526";
|
||||||
|
|
||||||
const wchar_t ADVANCED_PASTE_MARKDOWN_MESSAGE[] = L"PasteMarkdown";
|
const wchar_t ADVANCED_PASTE_MARKDOWN_EVENT[] = L"Local\\AdvancedPasteJsonEvent-a18c0798-3ee6-4fc5-bb9f-114c57ac0d47";
|
||||||
|
|
||||||
const wchar_t ADVANCED_PASTE_JSON_MESSAGE[] = L"PasteJson";
|
const wchar_t ADVANCED_PASTE_JSON_EVENT[] = L"Local\\AdvancedPasteJsonEvent-9ed021ab-b711-4cf3-9f33-135a698a9d21";
|
||||||
|
|
||||||
const wchar_t ADVANCED_PASTE_CUSTOM_ACTION_MESSAGE[] = L"CustomAction";
|
|
||||||
|
|
||||||
// Path to the event used to show Color Picker
|
// Path to the event used to show Color Picker
|
||||||
const wchar_t SHOW_COLOR_PICKER_SHARED_EVENT[] = L"Local\\ShowColorPickerEvent-8c46be2a-3e05-4186-b56b-4ae986ef2525";
|
const wchar_t SHOW_COLOR_PICKER_SHARED_EVENT[] = L"Local\\ShowColorPickerEvent-8c46be2a-3e05-4186-b56b-4ae986ef2525";
|
||||||
@@ -43,9 +41,7 @@ namespace CommonSharedConstants
|
|||||||
|
|
||||||
const wchar_t FANCY_ZONES_EDITOR_TOGGLE_EVENT[] = L"Local\\FancyZones-ToggleEditorEvent-1e174338-06a3-472b-874d-073b21c62f14";
|
const wchar_t FANCY_ZONES_EDITOR_TOGGLE_EVENT[] = L"Local\\FancyZones-ToggleEditorEvent-1e174338-06a3-472b-874d-073b21c62f14";
|
||||||
|
|
||||||
// Path to the event used by Workspaces
|
|
||||||
const wchar_t WORKSPACES_LAUNCH_EDITOR_EVENT[] = L"Local\\Workspaces-LaunchEditorEvent-a55ff427-cf62-4994-a2cd-9f72139296bf";
|
const wchar_t WORKSPACES_LAUNCH_EDITOR_EVENT[] = L"Local\\Workspaces-LaunchEditorEvent-a55ff427-cf62-4994-a2cd-9f72139296bf";
|
||||||
const wchar_t WORKSPACES_HOTKEY_EVENT[] = L"Local\\PowerToys-Workspaces-HotkeyEvent-2625C3C8-BAC9-4DB3-BCD6-3B4391A26FD0";
|
|
||||||
|
|
||||||
const wchar_t SHOW_HOSTS_EVENT[] = L"Local\\Hosts-ShowHostsEvent-5a0c0aae-5ff5-40f5-95c2-20e37ed671f0";
|
const wchar_t SHOW_HOSTS_EVENT[] = L"Local\\Hosts-ShowHostsEvent-5a0c0aae-5ff5-40f5-95c2-20e37ed671f0";
|
||||||
|
|
||||||
@@ -102,6 +98,8 @@ namespace CommonSharedConstants
|
|||||||
const wchar_t SHOW_ENVIRONMENT_VARIABLES_EVENT[] = L"Local\\PowerToysEnvironmentVariables-ShowEnvironmentVariablesEvent-1021f616-e951-4d64-b231-a8f972159978";
|
const wchar_t SHOW_ENVIRONMENT_VARIABLES_EVENT[] = L"Local\\PowerToysEnvironmentVariables-ShowEnvironmentVariablesEvent-1021f616-e951-4d64-b231-a8f972159978";
|
||||||
const wchar_t SHOW_ENVIRONMENT_VARIABLES_ADMIN_EVENT[] = L"Local\\PowerToysEnvironmentVariables-EnvironmentVariablesAdminEvent-8c95d2ad-047c-49a2-9e8b-b4656326cfb2";
|
const wchar_t SHOW_ENVIRONMENT_VARIABLES_ADMIN_EVENT[] = L"Local\\PowerToysEnvironmentVariables-EnvironmentVariablesAdminEvent-8c95d2ad-047c-49a2-9e8b-b4656326cfb2";
|
||||||
|
|
||||||
|
const wchar_t WORKSPACES_EXIT_EVENT[] = L"Local\\PowerToys-Workspaces-ExitEvent-29a1566f-f4f8-4d56-9435-d2a437f727c6";
|
||||||
|
|
||||||
// Max DWORD for key code to disable keys.
|
// Max DWORD for key code to disable keys.
|
||||||
const DWORD VK_DISABLED = 0x100;
|
const DWORD VK_DISABLED = 0x100;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,36 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../../version/version.h"
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|||||||
@@ -1,7 +1,21 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#define STRINGIZE2(s) #s
|
||||||
|
#define STRINGIZE(s) STRINGIZE2(s)
|
||||||
|
|
||||||
#include "Generated Files\version_gen.h"
|
#include "Generated Files\version_gen.h"
|
||||||
|
|
||||||
|
#define FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, 0
|
||||||
|
#define FILE_VERSION_STRING \
|
||||||
|
STRINGIZE(VERSION_MAJOR) \
|
||||||
|
"." STRINGIZE(VERSION_MINOR) "." STRINGIZE(VERSION_REVISION) ".0"
|
||||||
|
#define PRODUCT_VERSION FILE_VERSION
|
||||||
|
#define PRODUCT_VERSION_STRING FILE_VERSION_STRING
|
||||||
|
|
||||||
|
#define COMPANY_NAME "Microsoft Corporation"
|
||||||
|
#define COPYRIGHT_NOTE "Copyright (C) Microsoft Corporation. All rights reserved."
|
||||||
|
#define PRODUCT_NAME "PowerToys"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
enum class version_architecture
|
enum class version_architecture
|
||||||
|
|||||||
@@ -1,21 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<PtEmbeddedMajor>$(VersionProductMajor)</PtEmbeddedMajor>
|
|
||||||
<PtEmbeddedMinor>$(VersionProductMinor)</PtEmbeddedMinor>
|
|
||||||
<PtEmbeddedRevision>$(VersionProductBuildRevision)</PtEmbeddedRevision>
|
|
||||||
<PtEmbeddedMajor Condition="'$(PtEmbeddedMajor)'==''">0</PtEmbeddedMajor>
|
|
||||||
<PtEmbeddedMinor Condition="'$(PtEmbeddedMinor)'==''">0</PtEmbeddedMinor>
|
|
||||||
<PtEmbeddedRevision Condition="'$(PtEmbeddedRevision)'==''">0</PtEmbeddedRevision>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Target Name="GenerateVersionData" BeforeTargets="PrepareForBuild">
|
<Target Name="GenerateVersionData" BeforeTargets="PrepareForBuild">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<HeaderLines Include="#pragma once" />
|
<HeaderLines Include="#pragma once" />
|
||||||
<HeaderLines Include="#define VERSION_MAJOR $(PtEmbeddedMajor)" />
|
<HeaderLines Include="#define VERSION_MAJOR $(Version.Split('.')[0])" />
|
||||||
<HeaderLines Include="#define VERSION_MINOR $(PtEmbeddedMinor)" />
|
<HeaderLines Include="#define VERSION_MINOR $(Version.Split('.')[1])" />
|
||||||
<HeaderLines Include="#define VERSION_REVISION $(PtEmbeddedRevision)" />
|
<HeaderLines Include="#define VERSION_REVISION $(Version.Split('.')[2])" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<WriteLinesToFile File="Generated Files\version_gen.h" Lines="@(HeaderLines)" Overwrite="true" Encoding="Unicode" WriteOnlyWhenDifferent="true" />
|
<WriteLinesToFile File="Generated Files\version_gen.h" Lines="@(HeaderLines)" Overwrite="true" Encoding="Unicode" WriteOnlyWhenDifferent="true" />
|
||||||
</Target>
|
</Target>
|
||||||
@@ -80,4 +71,4 @@
|
|||||||
<ClCompile Include="helper.cpp" />
|
<ClCompile Include="helper.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -24,17 +24,4 @@ properties:
|
|||||||
FancyzonesEditorHotkey: "Shift+Ctrl+Alt+F"
|
FancyzonesEditorHotkey: "Shift+Ctrl+Alt+F"
|
||||||
FileLocksmith:
|
FileLocksmith:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
ImageResizer:
|
|
||||||
ImageResizerSizes:
|
|
||||||
- Name: Square2x
|
|
||||||
Width: 200
|
|
||||||
Height: 200
|
|
||||||
Unit: "Percent"
|
|
||||||
Fit: "Stretch"
|
|
||||||
- Name: MyInchSize
|
|
||||||
Width: 1024
|
|
||||||
Height: 1024
|
|
||||||
Unit: "Inch"
|
|
||||||
Fit: "Fit"
|
|
||||||
|
|
||||||
configurationVersion: 0.2.0
|
configurationVersion: 0.2.0
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using static PowerToys.Settings.DSC.Schema.Introspection;
|
using static PowerToys.Settings.DSC.Schema.Introspection;
|
||||||
|
|
||||||
namespace PowerToys.Settings.DSC.Schema;
|
namespace PowerToys.Settings.DSC.Schema;
|
||||||
@@ -22,7 +21,7 @@ internal sealed class DSCGeneration
|
|||||||
public string Type;
|
public string Type;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly Dictionary<string, AdditionalPropertiesInfo> AdditionalPropertiesInfoPerModule = new Dictionary<string, AdditionalPropertiesInfo> { { "PowerLauncher", new AdditionalPropertiesInfo { Name = "Plugins", Type = "Hashtable[]" } }, { "ImageResizer", new AdditionalPropertiesInfo { Name = "ImageresizerSizes", Type = "Hashtable[]" } } };
|
private static readonly Dictionary<string, AdditionalPropertiesInfo> AdditionalPropertiesInfoPerModule = new Dictionary<string, AdditionalPropertiesInfo> { { "PowerLauncher", new AdditionalPropertiesInfo { Name = "Plugins", Type = "Hashtable[]" } } };
|
||||||
|
|
||||||
private static string EmitEnumDefinition(Type type)
|
private static string EmitEnumDefinition(Type type)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using static PowerToys.Settings.DSC.Schema.Introspection;
|
using static PowerToys.Settings.DSC.Schema.Introspection;
|
||||||
|
|
||||||
namespace PowerToys.Settings.DSC.Schema;
|
namespace PowerToys.Settings.DSC.Schema;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
using Settings.UI.Library.Attributes;
|
using Settings.UI.Library.Attributes;
|
||||||
|
|
||||||
namespace PowerToys.Settings.DSC.Schema;
|
namespace PowerToys.Settings.DSC.Schema;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using static PowerToys.Settings.DSC.Schema.Introspection;
|
using static PowerToys.Settings.DSC.Schema.Introspection;
|
||||||
|
|
||||||
namespace PowerToys.Settings.DSC.Schema;
|
namespace PowerToys.Settings.DSC.Schema;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright (c) Microsoft Corporation.
|
<!-- Copyright (c) Microsoft Corporation.
|
||||||
Licensed under the MIT License. -->
|
Licensed under the MIT License. -->
|
||||||
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.12" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.11" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
||||||
<displayName>PowerToys</displayName>
|
<displayName>PowerToys</displayName>
|
||||||
<description>PowerToys</description>
|
<description>PowerToys</description>
|
||||||
<resources>
|
<resources>
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
<string id="InstallerUpdates">Installer and Updates</string>
|
<string id="InstallerUpdates">Installer and Updates</string>
|
||||||
<string id="PowerToysRun">PowerToys Run</string>
|
<string id="PowerToysRun">PowerToys Run</string>
|
||||||
<string id="AdvancedPaste">Advanced Paste</string>
|
<string id="AdvancedPaste">Advanced Paste</string>
|
||||||
|
<string id="Workspaces">Workspaces</string>
|
||||||
<string id="MouseWithoutBorders">Mouse Without Borders</string>
|
<string id="MouseWithoutBorders">Mouse Without Borders</string>
|
||||||
<string id="GeneralSettings">General settings</string>
|
<string id="GeneralSettings">General settings</string>
|
||||||
|
|
||||||
@@ -111,6 +112,12 @@ If you don't configure this setting, users are able to enable or disable the plu
|
|||||||
You can override this policy for individual plugins using the policy "Configure enabled state for individual plugins".
|
You can override this policy for individual plugins using the policy "Configure enabled state for individual plugins".
|
||||||
|
|
||||||
Note: Changes require a restart of PowerToys Run.
|
Note: Changes require a restart of PowerToys Run.
|
||||||
|
</string>
|
||||||
|
<string id="ConfigureEnabledUtilityWorkspaces">This policy configures the enabled disable state for the Workspaces utility.
|
||||||
|
|
||||||
|
If you enable or don't configure this policy, the user takes control over the enabled state of the Workspaces utility.
|
||||||
|
|
||||||
|
If you disable this policy, the user won't be able to enable Enable and use the Workspaces utility.
|
||||||
</string>
|
</string>
|
||||||
<string id="PowerToysRunIndividualPluginEnabledStateDescription">With this policy you can configure an individual enabled state for each PowerToys Run plugin that you add to the list.
|
<string id="PowerToysRunIndividualPluginEnabledStateDescription">With this policy you can configure an individual enabled state for each PowerToys Run plugin that you add to the list.
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
using AdvancedPaste.Helpers;
|
using AdvancedPaste.Helpers;
|
||||||
using AdvancedPaste.Settings;
|
using AdvancedPaste.Settings;
|
||||||
using AdvancedPaste.ViewModels;
|
using AdvancedPaste.ViewModels;
|
||||||
@@ -18,11 +13,8 @@ using Microsoft.UI.Windowing;
|
|||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Windows.Graphics;
|
using Windows.Graphics;
|
||||||
using WinUIEx;
|
using WinUIEx;
|
||||||
|
|
||||||
using static AdvancedPaste.Helpers.NativeMethods;
|
using static AdvancedPaste.Helpers.NativeMethods;
|
||||||
|
|
||||||
using DispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue;
|
|
||||||
|
|
||||||
// To learn more about WinUI, the WinUI project structure,
|
// To learn more about WinUI, the WinUI project structure,
|
||||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||||
namespace AdvancedPaste
|
namespace AdvancedPaste
|
||||||
@@ -34,13 +26,12 @@ namespace AdvancedPaste
|
|||||||
{
|
{
|
||||||
public IHost Host { get; private set; }
|
public IHost Host { get; private set; }
|
||||||
|
|
||||||
private readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
|
||||||
private readonly OptionsViewModel viewModel;
|
|
||||||
|
|
||||||
private MainWindow window;
|
private MainWindow window;
|
||||||
|
|
||||||
private nint windowHwnd;
|
private nint windowHwnd;
|
||||||
|
|
||||||
|
private OptionsViewModel viewModel;
|
||||||
|
|
||||||
private bool disposedValue;
|
private bool disposedValue;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -83,7 +74,7 @@ namespace AdvancedPaste
|
|||||||
/// Invoked when the application is launched.
|
/// Invoked when the application is launched.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="args">Details about the launch request and process.</param>
|
/// <param name="args">Details about the launch request and process.</param>
|
||||||
protected override void OnLaunched(LaunchActivatedEventArgs args)
|
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
|
||||||
{
|
{
|
||||||
var cmdArgs = Environment.GetCommandLineArgs();
|
var cmdArgs = Environment.GetCommandLineArgs();
|
||||||
if (cmdArgs?.Length > 1)
|
if (cmdArgs?.Length > 1)
|
||||||
@@ -97,44 +88,9 @@ namespace AdvancedPaste
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmdArgs?.Length > 2)
|
NativeEventWaiter.WaitForEventLoop(PowerToys.Interop.Constants.ShowAdvancedPasteSharedEvent(), OnAdvancedPasteHotkey);
|
||||||
{
|
NativeEventWaiter.WaitForEventLoop(PowerToys.Interop.Constants.AdvancedPasteMarkdownEvent(), OnAdvancedPasteMarkdownHotkey);
|
||||||
ProcessNamedPipe(cmdArgs[2]);
|
NativeEventWaiter.WaitForEventLoop(PowerToys.Interop.Constants.AdvancedPasteJsonEvent(), OnAdvancedPasteJsonHotkey);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ProcessNamedPipe(string pipeName)
|
|
||||||
{
|
|
||||||
void OnMessage(string message) => _dispatcherQueue.TryEnqueue(() => OnNamedPipeMessage(message));
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
|
||||||
{
|
|
||||||
var connectTimeout = TimeSpan.FromSeconds(10);
|
|
||||||
await NamedPipeProcessor.ProcessNamedPipeAsync(pipeName, connectTimeout, OnMessage, CancellationToken.None);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnNamedPipeMessage(string message)
|
|
||||||
{
|
|
||||||
var messageParts = message.Split();
|
|
||||||
var messageType = messageParts.First();
|
|
||||||
|
|
||||||
if (messageType == PowerToys.Interop.Constants.AdvancedPasteShowUIMessage())
|
|
||||||
{
|
|
||||||
OnAdvancedPasteHotkey();
|
|
||||||
}
|
|
||||||
else if (messageType == PowerToys.Interop.Constants.AdvancedPasteMarkdownMessage())
|
|
||||||
{
|
|
||||||
OnAdvancedPasteMarkdownHotkey();
|
|
||||||
}
|
|
||||||
else if (messageType == PowerToys.Interop.Constants.AdvancedPasteJsonMessage())
|
|
||||||
{
|
|
||||||
OnAdvancedPasteJsonHotkey();
|
|
||||||
}
|
|
||||||
else if (messageType == PowerToys.Interop.Constants.AdvancedPasteCustomActionMessage())
|
|
||||||
{
|
|
||||||
OnAdvancedPasteCustomActionHotkey(messageParts);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
|
private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
|
||||||
@@ -144,43 +100,17 @@ namespace AdvancedPaste
|
|||||||
|
|
||||||
private void OnAdvancedPasteJsonHotkey()
|
private void OnAdvancedPasteJsonHotkey()
|
||||||
{
|
{
|
||||||
viewModel.ReadClipboard();
|
viewModel.GetClipboardData();
|
||||||
viewModel.ToJsonFunction(true);
|
viewModel.ToJsonFunction(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAdvancedPasteMarkdownHotkey()
|
private void OnAdvancedPasteMarkdownHotkey()
|
||||||
{
|
{
|
||||||
viewModel.ReadClipboard();
|
viewModel.GetClipboardData();
|
||||||
viewModel.ToMarkdownFunction(true);
|
viewModel.ToMarkdownFunction(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAdvancedPasteHotkey()
|
private void OnAdvancedPasteHotkey()
|
||||||
{
|
|
||||||
ShowWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnAdvancedPasteCustomActionHotkey(string[] messageParts)
|
|
||||||
{
|
|
||||||
if (messageParts.Length != 2)
|
|
||||||
{
|
|
||||||
Logger.LogWarning("Unexpected custom action message");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!int.TryParse(messageParts[1], CultureInfo.InvariantCulture, out int customActionId))
|
|
||||||
{
|
|
||||||
Logger.LogWarning($"Unexpected custom action message id {messageParts[1]}");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowWindow();
|
|
||||||
viewModel.ReadClipboard();
|
|
||||||
viewModel.ExecuteCustomActionWithPaste(customActionId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ShowWindow()
|
|
||||||
{
|
{
|
||||||
viewModel.OnShow();
|
viewModel.OnShow();
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
using Microsoft.UI.Composition;
|
using Microsoft.UI.Composition;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Media;
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace AdvancedPaste.Controls
|
|||||||
{
|
{
|
||||||
[TemplatePart(Name = LoadingGrid, Type = typeof(Grid))]
|
[TemplatePart(Name = LoadingGrid, Type = typeof(Grid))]
|
||||||
[TemplatePart(Name = LoadingBrush, Type = typeof(AnimatedBorderBrush))]
|
[TemplatePart(Name = LoadingBrush, Type = typeof(AnimatedBorderBrush))]
|
||||||
public partial class AnimatedContentControl : ContentControl
|
public class AnimatedContentControl : ContentControl
|
||||||
{
|
{
|
||||||
internal const string LoadingGrid = "PART_LoadingGrid";
|
internal const string LoadingGrid = "PART_LoadingGrid";
|
||||||
internal const string LoadingBrush = "PART_LoadingBrush";
|
internal const string LoadingBrush = "PART_LoadingBrush";
|
||||||
|
|||||||
@@ -3,11 +3,10 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:animations="using:CommunityToolkit.WinUI.Animations"
|
xmlns:animations="using:CommunityToolkit.WinUI.Animations"
|
||||||
xmlns:converters="using:AdvancedPaste.Converters"
|
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="using:AdvancedPaste.Controls"
|
xmlns:local="using:AdvancedPaste.Controls"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters"
|
|
||||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
@@ -324,12 +323,7 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
<tkconverters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
||||||
<tkconverters:BoolToVisibilityConverter
|
|
||||||
x:Key="BoolToInvertedVisibilityConverter"
|
|
||||||
FalseValue="Visible"
|
|
||||||
TrueValue="Collapsed" />
|
|
||||||
<converters:CountToVisibilityConverter x:Key="CountToVisibilityConverter" />
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid x:Name="PromptBoxGrid" Loaded="Grid_Loaded">
|
<Grid x:Name="PromptBoxGrid" Loaded="Grid_Loaded">
|
||||||
@@ -346,12 +340,13 @@
|
|||||||
x:Name="InputTxtBox"
|
x:Name="InputTxtBox"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
x:FieldModifier="public"
|
x:FieldModifier="public"
|
||||||
IsEnabled="{x:Bind ViewModel.IsClipboardDataText, Mode=OneWay}"
|
IsEnabled="{x:Bind ViewModel.IsCustomAIEnabled, Mode=OneWay}"
|
||||||
KeyDown="InputTxtBox_KeyDown"
|
KeyDown="InputTxtBox_KeyDown"
|
||||||
PlaceholderText="{x:Bind ViewModel.InputTxtBoxPlaceholderText, Mode=OneWay}"
|
PlaceholderText="{x:Bind ViewModel.InputTxtBoxPlaceholderText, Mode=OneWay}"
|
||||||
Style="{StaticResource CustomTextBoxStyle}"
|
Style="{StaticResource CustomTextBoxStyle}"
|
||||||
TabIndex="0"
|
TabIndex="0"
|
||||||
Text="{x:Bind ViewModel.Query, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
Text="{x:Bind Prompt, Mode=TwoWay}"
|
||||||
|
TextChanging="InputTxtBox_TextChanging">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<TextBlock x:Uid="InputTxtBoxTooltip" />
|
<TextBlock x:Uid="InputTxtBoxTooltip" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
@@ -536,63 +531,48 @@
|
|||||||
<animations:OffsetAnimation Duration="0:0:1" />
|
<animations:OffsetAnimation Duration="0:0:1" />
|
||||||
</animations:Implicit.Animations>
|
</animations:Implicit.Animations>
|
||||||
</Button>-->
|
</Button>-->
|
||||||
<Grid
|
<Button
|
||||||
|
x:Name="SendBtn"
|
||||||
|
x:Uid="SendButtonAutomation"
|
||||||
Width="32"
|
Width="32"
|
||||||
Height="32"
|
Height="32"
|
||||||
Margin="0,0,4,0"
|
Margin="0,0,4,0"
|
||||||
|
Padding="0"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Stretch">
|
VerticalAlignment="Stretch"
|
||||||
<Button
|
ui:VisualExtensions.NormalizedCenterPoint="0.5,0.5"
|
||||||
x:Name="SendBtn"
|
Command="{x:Bind GenerateCustomCommand}"
|
||||||
x:Uid="SendButtonAutomation"
|
Content="{ui:FontIcon Glyph=,
|
||||||
Padding="0"
|
FontSize=16}"
|
||||||
HorizontalAlignment="Stretch"
|
Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}"
|
||||||
VerticalAlignment="Stretch"
|
Style="{StaticResource SubtleButtonStyle}"
|
||||||
ui:VisualExtensions.NormalizedCenterPoint="0.5,0.5"
|
TabIndex="1"
|
||||||
Command="{x:Bind GenerateCustomCommand}"
|
Visibility="Collapsed">
|
||||||
Content="{ui:FontIcon Glyph=,
|
<ToolTipService.ToolTip>
|
||||||
FontSize=16}"
|
<TextBlock x:Uid="SendBtnToolTip" TextWrapping="WrapWholeWords" />
|
||||||
Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}"
|
</ToolTipService.ToolTip>
|
||||||
IsEnabled="{x:Bind ViewModel.IsCustomAIEnabled, Mode=OneWay}"
|
<animations:Implicit.ShowAnimations>
|
||||||
Style="{StaticResource SubtleButtonStyle}"
|
<animations:ScaleAnimation
|
||||||
TabIndex="1"
|
From="0.4"
|
||||||
Visibility="{x:Bind ViewModel.Query.Length, Mode=OneWay, Converter={StaticResource CountToVisibilityConverter}}">
|
To="1"
|
||||||
<ToolTipService.ToolTip>
|
Duration="0:0:0.167" />
|
||||||
<TextBlock x:Uid="SendBtnToolTip" TextWrapping="WrapWholeWords" />
|
<animations:OpacityAnimation
|
||||||
</ToolTipService.ToolTip>
|
From="0.0"
|
||||||
<animations:Implicit.ShowAnimations>
|
To="1.0"
|
||||||
<animations:ScaleAnimation
|
Duration="0:0:0.167" />
|
||||||
From="0.4"
|
</animations:Implicit.ShowAnimations>
|
||||||
To="1"
|
<animations:Implicit.HideAnimations>
|
||||||
Duration="0:0:0.167" />
|
<animations:ScaleAnimation
|
||||||
<animations:OpacityAnimation
|
From="1"
|
||||||
From="0.0"
|
To="0.4"
|
||||||
To="1.0"
|
Duration="0:0:0.167" />
|
||||||
Duration="0:0:0.167" />
|
<animations:OpacityAnimation
|
||||||
</animations:Implicit.ShowAnimations>
|
From="1.0"
|
||||||
<animations:Implicit.HideAnimations>
|
To="0.0"
|
||||||
<animations:ScaleAnimation
|
Duration="0:0:0.167" />
|
||||||
From="1"
|
</animations:Implicit.HideAnimations>
|
||||||
To="0.4"
|
</Button>
|
||||||
Duration="0:0:0.167" />
|
<!--</StackPanel>-->
|
||||||
<animations:OpacityAnimation
|
|
||||||
From="1.0"
|
|
||||||
To="0.0"
|
|
||||||
Duration="0:0:0.167" />
|
|
||||||
</animations:Implicit.HideAnimations>
|
|
||||||
</Button>
|
|
||||||
<!-- Transparent overlay to show tooltip -->
|
|
||||||
<Grid
|
|
||||||
x:Name="SendBtnOverlay"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
Background="Transparent"
|
|
||||||
Visibility="{x:Bind ViewModel.IsCustomAIEnabled, Mode=OneWay, Converter={StaticResource BoolToInvertedVisibilityConverter}}">
|
|
||||||
<ToolTipService.ToolTip>
|
|
||||||
<ToolTip Content="{x:Bind ViewModel.GeneralErrorText}" />
|
|
||||||
</ToolTipService.ToolTip>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</local:AnimatedContentControl>
|
</local:AnimatedContentControl>
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
@@ -638,7 +618,7 @@
|
|||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
Foreground="{ThemeResource SystemFillColorCriticalBrush}"
|
Foreground="{ThemeResource SystemFillColorCriticalBrush}"
|
||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
Text="{x:Bind ViewModel.ApiErrorText, Mode=OneWay}" />
|
Text="{x:Bind ViewModel.InputTxtBoxErrorText, Mode=OneWay}" />
|
||||||
<HyperlinkButton
|
<HyperlinkButton
|
||||||
x:Uid="SettingsBtn"
|
x:Uid="SettingsBtn"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@@ -655,6 +635,7 @@
|
|||||||
<animations:OpacityAnimation To="0.0" Duration="0:0:0.167" />
|
<animations:OpacityAnimation To="0.0" Duration="0:0:0.167" />
|
||||||
</animations:Implicit.HideAnimations>
|
</animations:Implicit.HideAnimations>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
<VisualState x:Name="DefaultState" />
|
<VisualState x:Name="DefaultState" />
|
||||||
|
|||||||
@@ -2,10 +2,8 @@
|
|||||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using AdvancedPaste.Helpers;
|
using AdvancedPaste.Helpers;
|
||||||
using AdvancedPaste.Settings;
|
using AdvancedPaste.Settings;
|
||||||
using AdvancedPaste.ViewModels;
|
using AdvancedPaste.ViewModels;
|
||||||
@@ -20,14 +18,23 @@ namespace AdvancedPaste.Controls
|
|||||||
{
|
{
|
||||||
public sealed partial class PromptBox : Microsoft.UI.Xaml.Controls.UserControl
|
public sealed partial class PromptBox : Microsoft.UI.Xaml.Controls.UserControl
|
||||||
{
|
{
|
||||||
// Minimum time to show spinner when generating custom format using forcePasteCustom
|
|
||||||
private static readonly TimeSpan MinTaskTime = TimeSpan.FromSeconds(2);
|
|
||||||
|
|
||||||
private readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
private readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
||||||
private readonly IUserSettings _userSettings;
|
private readonly IUserSettings _userSettings;
|
||||||
|
|
||||||
|
public static readonly DependencyProperty PromptProperty = DependencyProperty.Register(
|
||||||
|
nameof(Prompt),
|
||||||
|
typeof(string),
|
||||||
|
typeof(PromptBox),
|
||||||
|
new PropertyMetadata(defaultValue: string.Empty));
|
||||||
|
|
||||||
public OptionsViewModel ViewModel { get; private set; }
|
public OptionsViewModel ViewModel { get; private set; }
|
||||||
|
|
||||||
|
public string Prompt
|
||||||
|
{
|
||||||
|
get => (string)GetValue(PromptProperty);
|
||||||
|
set => SetValue(PromptProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
public static readonly DependencyProperty PlaceholderTextProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty PlaceholderTextProperty = DependencyProperty.Register(
|
||||||
nameof(PlaceholderText),
|
nameof(PlaceholderText),
|
||||||
typeof(string),
|
typeof(string),
|
||||||
@@ -59,7 +66,6 @@ namespace AdvancedPaste.Controls
|
|||||||
_userSettings = App.GetService<IUserSettings>();
|
_userSettings = App.GetService<IUserSettings>();
|
||||||
|
|
||||||
ViewModel = App.GetService<OptionsViewModel>();
|
ViewModel = App.GetService<OptionsViewModel>();
|
||||||
ViewModel.CustomActionActivated += (_, e) => GenerateCustom(e.ForcePasteCustom);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Grid_Loaded(object sender, RoutedEventArgs e)
|
private void Grid_Loaded(object sender, RoutedEventArgs e)
|
||||||
@@ -68,30 +74,27 @@ namespace AdvancedPaste.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void GenerateCustom() => GenerateCustom(false);
|
private void GenerateCustom()
|
||||||
|
|
||||||
private void GenerateCustom(bool forcePasteCustom)
|
|
||||||
{
|
{
|
||||||
Logger.LogTrace();
|
Logger.LogTrace();
|
||||||
|
|
||||||
VisualStateManager.GoToState(this, "LoadingState", true);
|
VisualStateManager.GoToState(this, "LoadingState", true);
|
||||||
string inputInstructions = ViewModel.Query;
|
string inputInstructions = InputTxtBox.Text;
|
||||||
ViewModel.SaveQuery(inputInstructions);
|
ViewModel.SaveQuery(inputInstructions);
|
||||||
|
|
||||||
var customFormatTask = ViewModel.GenerateCustomFunction(inputInstructions);
|
var customFormatTask = ViewModel.GenerateCustomFunction(inputInstructions);
|
||||||
var delayTask = forcePasteCustom ? Task.Delay(MinTaskTime) : Task.CompletedTask;
|
|
||||||
Task.WhenAll(customFormatTask, delayTask)
|
customFormatTask.ContinueWith(
|
||||||
.ContinueWith(
|
t =>
|
||||||
_ =>
|
|
||||||
{
|
{
|
||||||
_dispatcherQueue.TryEnqueue(() =>
|
_dispatcherQueue.TryEnqueue(() =>
|
||||||
{
|
{
|
||||||
ViewModel.CustomFormatResult = customFormatTask.Result;
|
ViewModel.CustomFormatResult = t.Result;
|
||||||
|
|
||||||
if (ViewModel.ApiRequestStatus == (int)HttpStatusCode.OK)
|
if (ViewModel.ApiRequestStatus == (int)HttpStatusCode.OK)
|
||||||
{
|
{
|
||||||
VisualStateManager.GoToState(this, "DefaultState", true);
|
VisualStateManager.GoToState(this, "DefaultState", true);
|
||||||
if (_userSettings.ShowCustomPreview && !forcePasteCustom)
|
if (_userSettings.ShowCustomPreview)
|
||||||
{
|
{
|
||||||
PreviewGrid.Width = InputTxtBox.ActualWidth;
|
PreviewGrid.Width = InputTxtBox.ActualWidth;
|
||||||
PreviewFlyout.ShowAt(InputTxtBox);
|
PreviewFlyout.ShowAt(InputTxtBox);
|
||||||
@@ -127,9 +130,14 @@ namespace AdvancedPaste.Controls
|
|||||||
ClipboardHelper.SetClipboardTextContent(lastQuery.ClipboardData);
|
ClipboardHelper.SetClipboardTextContent(lastQuery.ClipboardData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InputTxtBox_TextChanging(Microsoft.UI.Xaml.Controls.TextBox sender, TextBoxTextChangingEventArgs args)
|
||||||
|
{
|
||||||
|
SendBtn.Visibility = InputTxtBox.Text.Length > 0 ? Visibility.Visible : Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
|
||||||
private void InputTxtBox_KeyDown(object sender, Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e)
|
private void InputTxtBox_KeyDown(object sender, Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Key == Windows.System.VirtualKey.Enter && InputTxtBox.Text.Length > 0 && ViewModel.IsCustomAIEnabled)
|
if (e.Key == Windows.System.VirtualKey.Enter && InputTxtBox.Text.Length > 0)
|
||||||
{
|
{
|
||||||
GenerateCustom();
|
GenerateCustom();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
// 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.Collections;
|
|
||||||
|
|
||||||
using Microsoft.UI.Xaml.Data;
|
|
||||||
|
|
||||||
namespace AdvancedPaste.Converters;
|
|
||||||
|
|
||||||
public sealed partial class CountToDoubleConverter : IValueConverter
|
|
||||||
{
|
|
||||||
public double ValueIfZero { get; set; }
|
|
||||||
|
|
||||||
public double ValueIfNonZero { get; set; }
|
|
||||||
|
|
||||||
public object Convert(object value, Type targetType, object parameter, string language)
|
|
||||||
{
|
|
||||||
bool hasCount = ((value is int intValue) && intValue > 0) || (value is IEnumerable collection && collection.GetEnumerator().MoveNext());
|
|
||||||
|
|
||||||
return hasCount ? ValueIfNonZero : ValueIfZero;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, string language) => throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
// 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.Collections;
|
|
||||||
|
|
||||||
using Microsoft.UI.Xaml;
|
|
||||||
using Microsoft.UI.Xaml.Data;
|
|
||||||
|
|
||||||
namespace AdvancedPaste.Converters;
|
|
||||||
|
|
||||||
public sealed partial class CountToVisibilityConverter : IValueConverter
|
|
||||||
{
|
|
||||||
public object Convert(object value, Type targetType, object parameter, string language)
|
|
||||||
{
|
|
||||||
bool hasCount = ((value is int intValue) && intValue > 0) || (value is IEnumerable collection && collection.GetEnumerator().MoveNext());
|
|
||||||
|
|
||||||
if (targetType == typeof(Visibility))
|
|
||||||
{
|
|
||||||
return hasCount ? Visibility.Visible : Visibility.Collapsed;
|
|
||||||
}
|
|
||||||
else if (targetType == typeof(bool))
|
|
||||||
{
|
|
||||||
return hasCount;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new ArgumentOutOfRangeException(nameof(targetType));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, string language) => throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
// 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 Microsoft.UI.Xaml.Controls;
|
||||||
|
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||||
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
using Microsoft.UI.Xaml.Media;
|
||||||
|
|
||||||
|
namespace AdvancedPaste.Converters
|
||||||
|
{
|
||||||
|
public sealed class ListViewIndexConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
|
{
|
||||||
|
var presenter = value as ListViewItemPresenter;
|
||||||
|
var item = VisualTreeHelper.GetParent(presenter) as ListViewItem;
|
||||||
|
|
||||||
|
var listView = ItemsControl.ItemsControlFromItemContainer(item);
|
||||||
|
int index = listView.IndexFromContainer(item) + 1;
|
||||||
|
#pragma warning disable CA1305 // Specify IFormatProvider
|
||||||
|
return index.ToString();
|
||||||
|
#pragma warning restore CA1305 // Specify IFormatProvider
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
using AdvancedPaste.Helpers;
|
using AdvancedPaste.Helpers;
|
||||||
using AdvancedPaste.Settings;
|
using AdvancedPaste.Settings;
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
@@ -27,18 +26,6 @@ namespace AdvancedPaste
|
|||||||
|
|
||||||
_userSettings = App.GetService<IUserSettings>();
|
_userSettings = App.GetService<IUserSettings>();
|
||||||
|
|
||||||
var baseHeight = MinHeight;
|
|
||||||
|
|
||||||
void UpdateHeight()
|
|
||||||
{
|
|
||||||
var trimmedCustomActionCount = Math.Min(_userSettings.CustomActions.Count, 5);
|
|
||||||
Height = MinHeight = baseHeight + (trimmedCustomActionCount * 40);
|
|
||||||
}
|
|
||||||
|
|
||||||
UpdateHeight();
|
|
||||||
|
|
||||||
_userSettings.CustomActions.CollectionChanged += (_, _) => UpdateHeight();
|
|
||||||
|
|
||||||
AppWindow.SetIcon("Assets/AdvancedPaste/AdvancedPaste.ico");
|
AppWindow.SetIcon("Assets/AdvancedPaste/AdvancedPaste.ico");
|
||||||
this.ExtendsContentIntoTitleBar = true;
|
this.ExtendsContentIntoTitleBar = true;
|
||||||
this.SetTitleBar(titleBar);
|
this.SetTitleBar(titleBar);
|
||||||
|
|||||||
@@ -5,21 +5,14 @@
|
|||||||
xmlns:controls="using:AdvancedPaste.Controls"
|
xmlns:controls="using:AdvancedPaste.Controls"
|
||||||
xmlns:converters="using:AdvancedPaste.Converters"
|
xmlns:converters="using:AdvancedPaste.Converters"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:library="using:Microsoft.PowerToys.Settings.UI.Library"
|
|
||||||
xmlns:local="using:AdvancedPaste.Models"
|
xmlns:local="using:AdvancedPaste.Models"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters"
|
|
||||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||||
KeyDown="Page_KeyDown"
|
KeyDown="Page_KeyDown"
|
||||||
KeyboardAcceleratorPlacementMode="Hidden"
|
KeyboardAcceleratorPlacementMode="Hidden"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Page.Resources>
|
<Page.Resources>
|
||||||
<tkconverters:BoolToVisibilityConverter x:Name="BoolToVisibilityConverter" />
|
<converters:ListViewIndexConverter x:Name="listViewIndexConverter" />
|
||||||
<converters:CountToVisibilityConverter x:Name="countToVisibilityConverter" />
|
|
||||||
<converters:CountToDoubleConverter
|
|
||||||
x:Name="customActionsCountToMinHeightConverter"
|
|
||||||
ValueIfNonZero="40"
|
|
||||||
ValueIfZero="0" />
|
|
||||||
<Style
|
<Style
|
||||||
x:Key="PaddingLessFlyoutPresenterStyle"
|
x:Key="PaddingLessFlyoutPresenterStyle"
|
||||||
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
|
BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
|
||||||
@@ -28,38 +21,6 @@
|
|||||||
<Setter Property="Padding" Value="0" />
|
<Setter Property="Padding" Value="0" />
|
||||||
</Style.Setters>
|
</Style.Setters>
|
||||||
</Style>
|
</Style>
|
||||||
<DataTemplate x:Key="PasteFormatTemplate" x:DataType="local:PasteFormat">
|
|
||||||
<Grid>
|
|
||||||
<ToolTipService.ToolTip>
|
|
||||||
<TextBlock Text="{x:Bind ToolTip}" />
|
|
||||||
</ToolTipService.ToolTip>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="26" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
Margin="0,0,0,0"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
AutomationProperties.AccessibilityView="Raw"
|
|
||||||
FontSize="16"
|
|
||||||
Glyph="{x:Bind IconGlyph}" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
x:Phase="1"
|
|
||||||
Text="{x:Bind Name}" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="2"
|
|
||||||
Margin="0,0,8,0"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
|
||||||
Text="{x:Bind ShortcutText, Mode=OneWay}"
|
|
||||||
Visibility="{x:Bind ShortcutText.Length, Mode=OneWay, Converter={StaticResource countToVisibilityConverter}}" />
|
|
||||||
</Grid>
|
|
||||||
</DataTemplate>
|
|
||||||
</Page.Resources>
|
</Page.Resources>
|
||||||
<Page.KeyboardAccelerators>
|
<Page.KeyboardAccelerators>
|
||||||
<KeyboardAccelerator Key="Escape" Invoked="KeyboardAccelerator_Invoked" />
|
<KeyboardAccelerator Key="Escape" Invoked="KeyboardAccelerator_Invoked" />
|
||||||
@@ -75,30 +36,6 @@
|
|||||||
Key="Number3"
|
Key="Number3"
|
||||||
Invoked="KeyboardAccelerator_Invoked"
|
Invoked="KeyboardAccelerator_Invoked"
|
||||||
Modifiers="Control" />
|
Modifiers="Control" />
|
||||||
<KeyboardAccelerator
|
|
||||||
Key="Number4"
|
|
||||||
Invoked="KeyboardAccelerator_Invoked"
|
|
||||||
Modifiers="Control" />
|
|
||||||
<KeyboardAccelerator
|
|
||||||
Key="Number5"
|
|
||||||
Invoked="KeyboardAccelerator_Invoked"
|
|
||||||
Modifiers="Control" />
|
|
||||||
<KeyboardAccelerator
|
|
||||||
Key="Number6"
|
|
||||||
Invoked="KeyboardAccelerator_Invoked"
|
|
||||||
Modifiers="Control" />
|
|
||||||
<KeyboardAccelerator
|
|
||||||
Key="Number7"
|
|
||||||
Invoked="KeyboardAccelerator_Invoked"
|
|
||||||
Modifiers="Control" />
|
|
||||||
<KeyboardAccelerator
|
|
||||||
Key="Number8"
|
|
||||||
Invoked="KeyboardAccelerator_Invoked"
|
|
||||||
Modifiers="Control" />
|
|
||||||
<KeyboardAccelerator
|
|
||||||
Key="Number9"
|
|
||||||
Invoked="KeyboardAccelerator_Invoked"
|
|
||||||
Modifiers="Control" />
|
|
||||||
</Page.KeyboardAccelerators>
|
</Page.KeyboardAccelerators>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@@ -166,55 +103,73 @@
|
|||||||
BorderThickness="0,1,0,0"
|
BorderThickness="0,1,0,0"
|
||||||
RowSpacing="4">
|
RowSpacing="4">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="*" MinHeight="{x:Bind ViewModel.CustomActionPasteFormats.Count, Mode=OneWay, Converter={StaticResource customActionsCountToMinHeightConverter}}" />
|
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
x:Name="PasteOptionsListView"
|
x:Name="PasteOptionsListView"
|
||||||
Grid.Row="0"
|
|
||||||
VerticalAlignment="Bottom"
|
VerticalAlignment="Bottom"
|
||||||
IsEnabled="{x:Bind ViewModel.IsClipboardDataText, Mode=OneWay}"
|
|
||||||
IsItemClickEnabled="True"
|
IsItemClickEnabled="True"
|
||||||
ItemClick="ListView_Click"
|
ItemClick="PasteOptionsListView_ItemClick"
|
||||||
ItemContainerTransitions="{x:Null}"
|
ItemContainerTransitions="{x:Null}"
|
||||||
ItemTemplate="{StaticResource PasteFormatTemplate}"
|
ItemsSource="{x:Bind pasteFormats, Mode=OneWay}"
|
||||||
ItemsSource="{x:Bind ViewModel.StandardPasteFormats, Mode=OneWay}"
|
|
||||||
SelectionMode="None"
|
SelectionMode="None"
|
||||||
TabIndex="1" />
|
TabIndex="1">
|
||||||
|
<ListView.ItemTemplate>
|
||||||
|
<DataTemplate x:DataType="local:PasteFormat">
|
||||||
|
<Grid>
|
||||||
|
<ToolTipService.ToolTip>
|
||||||
|
<TextBlock>
|
||||||
|
<Run Text="{x:Bind Name}" />
|
||||||
|
<Run Text="(" /><Run Text="Ctrl" /><Run Text="+" /><Run Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource listViewIndexConverter}}" /><Run Text=")" />
|
||||||
|
</TextBlock>
|
||||||
|
</ToolTipService.ToolTip>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="26" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Viewbox
|
||||||
|
x:Name="IconHolderBox"
|
||||||
|
MaxWidth="16"
|
||||||
|
MaxHeight="16"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<ContentPresenter
|
||||||
|
x:Name="IconHolder"
|
||||||
|
x:Phase="2"
|
||||||
|
Content="{x:Bind Icon}" />
|
||||||
|
</Viewbox>
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
x:Phase="1"
|
||||||
|
Text="{x:Bind Name}" />
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="2"
|
||||||
|
Margin="0,0,8,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
|
Style="{StaticResource CaptionTextBlockStyle}">
|
||||||
|
<Run Text="Ctrl" /><Run Text="+" /><Run Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource listViewIndexConverter}}" />
|
||||||
|
</TextBlock>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListView.ItemTemplate>
|
||||||
|
</ListView>
|
||||||
|
|
||||||
<Rectangle
|
<Rectangle
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Height="1"
|
Height="1"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Fill="{ThemeResource DividerStrokeColorDefaultBrush}"
|
|
||||||
Visibility="{x:Bind ViewModel.CustomActionPasteFormats.Count, Mode=OneWay, Converter={StaticResource countToVisibilityConverter}}" />
|
|
||||||
|
|
||||||
<ListView
|
|
||||||
x:Name="CustomActionsListView"
|
|
||||||
Grid.Row="2"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
IsEnabled="{x:Bind ViewModel.IsCustomAIEnabled, Mode=OneWay}"
|
|
||||||
IsItemClickEnabled="True"
|
|
||||||
ItemClick="ListView_Click"
|
|
||||||
ItemContainerTransitions="{x:Null}"
|
|
||||||
ItemTemplate="{StaticResource PasteFormatTemplate}"
|
|
||||||
ItemsSource="{x:Bind ViewModel.CustomActionPasteFormats, Mode=OneWay}"
|
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
|
||||||
ScrollViewer.VerticalScrollMode="Auto"
|
|
||||||
SelectionMode="None"
|
|
||||||
TabIndex="2" />
|
|
||||||
|
|
||||||
<Rectangle
|
|
||||||
Grid.Row="3"
|
|
||||||
Height="1"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Fill="{ThemeResource DividerStrokeColorDefaultBrush}" />
|
Fill="{ThemeResource DividerStrokeColorDefaultBrush}" />
|
||||||
<!-- x:Uid="ClipboardHistoryButton" -->
|
<!-- x:Uid="ClipboardHistoryButton" -->
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="4"
|
Grid.Row="2"
|
||||||
Height="32"
|
Height="32"
|
||||||
Margin="4,0,4,4"
|
Margin="4,0,4,4"
|
||||||
Padding="{StaticResource ButtonPadding}"
|
Padding="{StaticResource ButtonPadding}"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using AdvancedPaste.Helpers;
|
using AdvancedPaste.Helpers;
|
||||||
using AdvancedPaste.Models;
|
using AdvancedPaste.Models;
|
||||||
using AdvancedPaste.ViewModels;
|
using AdvancedPaste.ViewModels;
|
||||||
@@ -25,8 +25,8 @@ namespace AdvancedPaste.Pages
|
|||||||
public sealed partial class MainPage : Page
|
public sealed partial class MainPage : Page
|
||||||
{
|
{
|
||||||
private readonly ObservableCollection<ClipboardItem> clipboardHistory;
|
private readonly ObservableCollection<ClipboardItem> clipboardHistory;
|
||||||
|
private readonly ObservableCollection<PasteFormat> pasteFormats;
|
||||||
private readonly Microsoft.UI.Dispatching.DispatcherQueue _dispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread();
|
private readonly Microsoft.UI.Dispatching.DispatcherQueue _dispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread();
|
||||||
private (VirtualKey Key, DateTime Timestamp) _lastKeyEvent = (VirtualKey.None, DateTime.MinValue);
|
|
||||||
|
|
||||||
public OptionsViewModel ViewModel { get; private set; }
|
public OptionsViewModel ViewModel { get; private set; }
|
||||||
|
|
||||||
@@ -34,6 +34,13 @@ namespace AdvancedPaste.Pages
|
|||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
|
|
||||||
|
pasteFormats =
|
||||||
|
[
|
||||||
|
new PasteFormat { Icon = new FontIcon() { Glyph = "\uE8E9" }, Name = ResourceLoaderInstance.ResourceLoader.GetString("PasteAsPlainText"), Format = PasteFormats.PlainText },
|
||||||
|
new PasteFormat { Icon = new FontIcon() { Glyph = "\ue8a5" }, Name = ResourceLoaderInstance.ResourceLoader.GetString("PasteAsMarkdown"), Format = PasteFormats.Markdown },
|
||||||
|
new PasteFormat { Icon = new FontIcon() { Glyph = "\uE943" }, Name = ResourceLoaderInstance.ResourceLoader.GetString("PasteAsJson"), Format = PasteFormats.Json },
|
||||||
|
];
|
||||||
|
|
||||||
ViewModel = App.GetService<OptionsViewModel>();
|
ViewModel = App.GetService<OptionsViewModel>();
|
||||||
|
|
||||||
clipboardHistory = new ObservableCollection<ClipboardItem>();
|
clipboardHistory = new ObservableCollection<ClipboardItem>();
|
||||||
@@ -114,8 +121,6 @@ namespace AdvancedPaste.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static MainWindow GetMainWindow() => (App.Current as App)?.GetMainWindow();
|
|
||||||
|
|
||||||
private void ClipboardHistoryItemDeleteButton_Click(object sender, RoutedEventArgs e)
|
private void ClipboardHistoryItemDeleteButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Logger.LogTrace();
|
Logger.LogTrace();
|
||||||
@@ -130,49 +135,83 @@ namespace AdvancedPaste.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ListView_Click(object sender, ItemClickEventArgs e)
|
private void PasteAsPlain()
|
||||||
|
{
|
||||||
|
ViewModel.ToPlainTextFunction();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PasteAsMarkdown()
|
||||||
|
{
|
||||||
|
ViewModel.ToMarkdownFunction();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PasteAsJson()
|
||||||
|
{
|
||||||
|
ViewModel.ToJsonFunction();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PasteOptionsListView_ItemClick(object sender, ItemClickEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.ClickedItem is PasteFormat format)
|
if (e.ClickedItem is PasteFormat format)
|
||||||
{
|
{
|
||||||
ViewModel.ExecutePasteFormat(format);
|
switch (format.Format)
|
||||||
|
{
|
||||||
|
case PasteFormats.PlainText:
|
||||||
|
{
|
||||||
|
PasteAsPlain();
|
||||||
|
PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteFormatClickedEvent(PasteFormats.PlainText));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case PasteFormats.Markdown:
|
||||||
|
{
|
||||||
|
PasteAsMarkdown();
|
||||||
|
PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteFormatClickedEvent(PasteFormats.Markdown));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case PasteFormats.Json:
|
||||||
|
{
|
||||||
|
PasteAsJson();
|
||||||
|
PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteFormatClickedEvent(PasteFormats.Json));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void KeyboardAccelerator_Invoked(Microsoft.UI.Xaml.Input.KeyboardAccelerator sender, Microsoft.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
|
private void KeyboardAccelerator_Invoked(Microsoft.UI.Xaml.Input.KeyboardAccelerator sender, Microsoft.UI.Xaml.Input.KeyboardAcceleratorInvokedEventArgs args)
|
||||||
{
|
{
|
||||||
if (GetMainWindow()?.Visible is false)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger.LogTrace();
|
Logger.LogTrace();
|
||||||
|
|
||||||
var thisKeyEvent = (sender.Key, Timestamp: DateTime.Now);
|
|
||||||
if (thisKeyEvent.Key == _lastKeyEvent.Key && (thisKeyEvent.Timestamp - _lastKeyEvent.Timestamp) < TimeSpan.FromMilliseconds(200))
|
|
||||||
{
|
|
||||||
// Sometimes, multiple keyboard accelerator events are raised for a single Ctrl + VirtualKey press.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_lastKeyEvent = thisKeyEvent;
|
|
||||||
|
|
||||||
switch (sender.Key)
|
switch (sender.Key)
|
||||||
{
|
{
|
||||||
case VirtualKey.Escape:
|
case VirtualKey.Escape:
|
||||||
GetMainWindow()?.Close();
|
{
|
||||||
break;
|
(App.Current as App).GetMainWindow().Close();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case VirtualKey.Number1:
|
case VirtualKey.Number1:
|
||||||
|
{
|
||||||
|
PasteAsPlain();
|
||||||
|
PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteInAppKeyboardShortcutEvent(PasteFormats.PlainText));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case VirtualKey.Number2:
|
case VirtualKey.Number2:
|
||||||
|
{
|
||||||
|
PasteAsMarkdown();
|
||||||
|
PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteInAppKeyboardShortcutEvent(PasteFormats.Markdown));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case VirtualKey.Number3:
|
case VirtualKey.Number3:
|
||||||
case VirtualKey.Number4:
|
{
|
||||||
case VirtualKey.Number5:
|
PasteAsJson();
|
||||||
case VirtualKey.Number6:
|
PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteInAppKeyboardShortcutEvent(PasteFormats.Json));
|
||||||
case VirtualKey.Number7:
|
break;
|
||||||
case VirtualKey.Number8:
|
}
|
||||||
case VirtualKey.Number9:
|
|
||||||
ViewModel.ExecutePasteFormat(sender.Key);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -183,7 +222,7 @@ namespace AdvancedPaste.Pages
|
|||||||
{
|
{
|
||||||
if (e.Key == VirtualKey.Escape)
|
if (e.Key == VirtualKey.Escape)
|
||||||
{
|
{
|
||||||
GetMainWindow()?.Close();
|
(App.Current as App).GetMainWindow().Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using System;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
using Azure;
|
using Azure;
|
||||||
using Azure.AI.OpenAI;
|
using Azure.AI.OpenAI;
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
using Microsoft.UI.Xaml.Media.Imaging;
|
using Microsoft.UI.Xaml.Media.Imaging;
|
||||||
using Windows.ApplicationModel.DataTransfer;
|
using Windows.ApplicationModel.DataTransfer;
|
||||||
|
|||||||
@@ -2,10 +2,6 @@
|
|||||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
|
|
||||||
using Microsoft.PowerToys.Settings.UI.Library;
|
|
||||||
|
|
||||||
namespace AdvancedPaste.Settings
|
namespace AdvancedPaste.Settings
|
||||||
{
|
{
|
||||||
public interface IUserSettings
|
public interface IUserSettings
|
||||||
@@ -15,7 +11,5 @@ namespace AdvancedPaste.Settings
|
|||||||
public bool SendPasteKeyCombination { get; }
|
public bool SendPasteKeyCombination { get; }
|
||||||
|
|
||||||
public bool CloseAfterLosingFocus { get; }
|
public bool CloseAfterLosingFocus { get; }
|
||||||
|
|
||||||
public ObservableCollection<AdvancedPasteCustomAction> CustomActions { get; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ using System.Linq;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Windows.ApplicationModel.DataTransfer;
|
using Windows.ApplicationModel.DataTransfer;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using HtmlAgilityPack;
|
using HtmlAgilityPack;
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
using Windows.ApplicationModel.DataTransfer;
|
using Windows.ApplicationModel.DataTransfer;
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
// 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.IO;
|
|
||||||
using System.IO.Pipes;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AdvancedPaste.Helpers;
|
|
||||||
|
|
||||||
public static class NamedPipeProcessor
|
|
||||||
{
|
|
||||||
public static async Task ProcessNamedPipeAsync(string pipeName, TimeSpan connectTimeout, Action<string> messageHandler, CancellationToken cancellationToken)
|
|
||||||
{
|
|
||||||
using NamedPipeClientStream pipeClient = new(".", pipeName, PipeDirection.In);
|
|
||||||
|
|
||||||
await pipeClient.ConnectAsync(connectTimeout, cancellationToken);
|
|
||||||
|
|
||||||
using StreamReader streamReader = new(pipeClient, Encoding.Unicode);
|
|
||||||
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
var message = await streamReader.ReadLineAsync(cancellationToken);
|
|
||||||
|
|
||||||
if (message != null)
|
|
||||||
{
|
|
||||||
messageHandler(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
var intraMessageDelay = TimeSpan.FromMilliseconds(10);
|
|
||||||
await Task.Delay(intraMessageDelay, cancellationToken);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// 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 Microsoft.UI.Dispatching;
|
||||||
|
|
||||||
|
namespace AdvancedPaste.Helpers
|
||||||
|
{
|
||||||
|
public static class NativeEventWaiter
|
||||||
|
{
|
||||||
|
public static void WaitForEventLoop(string eventName, Action callback)
|
||||||
|
{
|
||||||
|
var dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, eventName);
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (eventHandle.WaitOne())
|
||||||
|
{
|
||||||
|
dispatcherQueue.TryEnqueue(() => callback());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,38 +3,29 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.IO.Abstractions;
|
using System.IO.Abstractions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
using Microsoft.PowerToys.Settings.UI.Library;
|
using Microsoft.PowerToys.Settings.UI.Library;
|
||||||
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
|
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
|
||||||
|
|
||||||
namespace AdvancedPaste.Settings
|
namespace AdvancedPaste.Settings
|
||||||
{
|
{
|
||||||
internal sealed class UserSettings : IUserSettings, IDisposable
|
internal sealed class UserSettings : IUserSettings
|
||||||
{
|
{
|
||||||
private readonly SettingsUtils _settingsUtils;
|
private readonly SettingsUtils _settingsUtils;
|
||||||
private readonly TaskScheduler _taskScheduler;
|
|
||||||
private readonly IFileSystemWatcher _watcher;
|
private readonly IFileSystemWatcher _watcher;
|
||||||
private readonly object _loadingSettingsLock = new();
|
private readonly object _loadingSettingsLock = new object();
|
||||||
|
|
||||||
private const string AdvancedPasteModuleName = "AdvancedPaste";
|
private const string AdvancedPasteModuleName = "AdvancedPaste";
|
||||||
private const int MaxNumberOfRetry = 5;
|
private const int MaxNumberOfRetry = 5;
|
||||||
|
|
||||||
private bool _disposedValue;
|
|
||||||
private CancellationTokenSource _cancellationTokenSource;
|
|
||||||
|
|
||||||
public bool ShowCustomPreview { get; private set; }
|
public bool ShowCustomPreview { get; private set; }
|
||||||
|
|
||||||
public bool SendPasteKeyCombination { get; private set; }
|
public bool SendPasteKeyCombination { get; private set; }
|
||||||
|
|
||||||
public bool CloseAfterLosingFocus { get; private set; }
|
public bool CloseAfterLosingFocus { get; private set; }
|
||||||
|
|
||||||
public ObservableCollection<AdvancedPasteCustomAction> CustomActions { get; private set; }
|
|
||||||
|
|
||||||
public UserSettings()
|
public UserSettings()
|
||||||
{
|
{
|
||||||
_settingsUtils = new SettingsUtils();
|
_settingsUtils = new SettingsUtils();
|
||||||
@@ -42,25 +33,10 @@ namespace AdvancedPaste.Settings
|
|||||||
ShowCustomPreview = true;
|
ShowCustomPreview = true;
|
||||||
SendPasteKeyCombination = true;
|
SendPasteKeyCombination = true;
|
||||||
CloseAfterLosingFocus = false;
|
CloseAfterLosingFocus = false;
|
||||||
CustomActions = [];
|
|
||||||
|
|
||||||
_taskScheduler = TaskScheduler.FromCurrentSynchronizationContext();
|
|
||||||
|
|
||||||
LoadSettingsFromJson();
|
LoadSettingsFromJson();
|
||||||
|
|
||||||
_watcher = Helper.GetFileWatcher(AdvancedPasteModuleName, "settings.json", OnSettingsFileChanged);
|
_watcher = Helper.GetFileWatcher(AdvancedPasteModuleName, "settings.json", () => LoadSettingsFromJson());
|
||||||
}
|
|
||||||
|
|
||||||
private void OnSettingsFileChanged()
|
|
||||||
{
|
|
||||||
lock (_loadingSettingsLock)
|
|
||||||
{
|
|
||||||
_cancellationTokenSource?.Cancel();
|
|
||||||
_cancellationTokenSource = new CancellationTokenSource();
|
|
||||||
|
|
||||||
Task.Delay(TimeSpan.FromMilliseconds(500))
|
|
||||||
.ContinueWith(_ => LoadSettingsFromJson(), _cancellationTokenSource.Token, TaskContinuationOptions.NotOnCanceled, TaskScheduler.Default);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadSettingsFromJson()
|
private void LoadSettingsFromJson()
|
||||||
@@ -86,25 +62,9 @@ namespace AdvancedPaste.Settings
|
|||||||
var settings = _settingsUtils.GetSettingsOrDefault<AdvancedPasteSettings>(AdvancedPasteModuleName);
|
var settings = _settingsUtils.GetSettingsOrDefault<AdvancedPasteSettings>(AdvancedPasteModuleName);
|
||||||
if (settings != null)
|
if (settings != null)
|
||||||
{
|
{
|
||||||
void UpdateSettings()
|
ShowCustomPreview = settings.Properties.ShowCustomPreview;
|
||||||
{
|
SendPasteKeyCombination = settings.Properties.SendPasteKeyCombination;
|
||||||
ShowCustomPreview = settings.Properties.ShowCustomPreview;
|
CloseAfterLosingFocus = settings.Properties.CloseAfterLosingFocus;
|
||||||
SendPasteKeyCombination = settings.Properties.SendPasteKeyCombination;
|
|
||||||
CloseAfterLosingFocus = settings.Properties.CloseAfterLosingFocus;
|
|
||||||
|
|
||||||
CustomActions.Clear();
|
|
||||||
foreach (var customAction in settings.Properties.CustomActions.Value)
|
|
||||||
{
|
|
||||||
if (customAction.IsShown && customAction.IsValid)
|
|
||||||
{
|
|
||||||
CustomActions.Add(customAction);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Task.Factory
|
|
||||||
.StartNew(UpdateSettings, CancellationToken.None, TaskCreationOptions.None, _taskScheduler)
|
|
||||||
.Wait();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
retry = false;
|
retry = false;
|
||||||
@@ -122,30 +82,5 @@ namespace AdvancedPaste.Settings
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
Dispose(true);
|
|
||||||
GC.SuppressFinalize(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (!_disposedValue)
|
|
||||||
{
|
|
||||||
if (disposing)
|
|
||||||
{
|
|
||||||
_cancellationTokenSource.Dispose();
|
|
||||||
_watcher.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
_disposedValue = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
~UserSettings()
|
|
||||||
{
|
|
||||||
Dispose(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
// 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;
|
|
||||||
|
|
||||||
namespace AdvancedPaste.Models;
|
|
||||||
|
|
||||||
public sealed class CustomActionActivatedEventArgs(string text, bool forcePasteCustom) : EventArgs
|
|
||||||
{
|
|
||||||
public string Text { get; private set; } = text;
|
|
||||||
|
|
||||||
public bool ForcePasteCustom { get; private set; } = forcePasteCustom;
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
using AdvancedPaste.Helpers;
|
using AdvancedPaste.Helpers;
|
||||||
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
||||||
|
|
||||||
|
|||||||
@@ -2,38 +2,16 @@
|
|||||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Microsoft.PowerToys.Settings.UI.Library;
|
|
||||||
|
|
||||||
namespace AdvancedPaste.Models;
|
namespace AdvancedPaste.Models
|
||||||
|
|
||||||
public partial class PasteFormat : ObservableObject
|
|
||||||
{
|
{
|
||||||
[ObservableProperty]
|
public class PasteFormat
|
||||||
private string _shortcutText = string.Empty;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private string _toolTip = string.Empty;
|
|
||||||
|
|
||||||
public PasteFormat()
|
|
||||||
{
|
{
|
||||||
|
public IconElement Icon { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public PasteFormats Format { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public PasteFormat(AdvancedPasteCustomAction customAction, string shortcutText)
|
|
||||||
{
|
|
||||||
IconGlyph = "\uE945";
|
|
||||||
Name = customAction.Name;
|
|
||||||
Prompt = customAction.Prompt;
|
|
||||||
Format = PasteFormats.Custom;
|
|
||||||
ShortcutText = shortcutText;
|
|
||||||
ToolTip = customAction.Prompt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string IconGlyph { get; init; }
|
|
||||||
|
|
||||||
public string Name { get; init; }
|
|
||||||
|
|
||||||
public PasteFormats Format { get; init; }
|
|
||||||
|
|
||||||
public string Prompt { get; init; } = string.Empty;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
using Microsoft.UI.Dispatching;
|
using Microsoft.UI.Dispatching;
|
||||||
using Microsoft.Windows.AppLifecycle;
|
using Microsoft.Windows.AppLifecycle;
|
||||||
|
|||||||
@@ -59,7 +59,10 @@
|
|||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: 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: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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
@@ -225,7 +228,4 @@
|
|||||||
<data name="OpenAIGpoDisabled" xml:space="preserve">
|
<data name="OpenAIGpoDisabled" xml:space="preserve">
|
||||||
<value>To custom with AI is disabled by your organization</value>
|
<value>To custom with AI is disabled by your organization</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="CtrlKey" xml:space="preserve">
|
</root>
|
||||||
<value>Ctrl</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using AdvancedPaste.Models;
|
using AdvancedPaste.Models;
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using AdvancedPaste.Models;
|
using AdvancedPaste.Models;
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|||||||
@@ -5,10 +5,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using AdvancedPaste.Helpers;
|
using AdvancedPaste.Helpers;
|
||||||
using AdvancedPaste.Models;
|
using AdvancedPaste.Models;
|
||||||
using AdvancedPaste.Settings;
|
using AdvancedPaste.Settings;
|
||||||
@@ -17,73 +15,48 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
|||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
using Microsoft.PowerToys.Settings.UI.Library;
|
using Microsoft.PowerToys.Settings.UI.Library;
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.UI.Dispatching;
|
||||||
using Microsoft.UI.Xaml;
|
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using Windows.ApplicationModel.DataTransfer;
|
using Windows.ApplicationModel.DataTransfer;
|
||||||
using Windows.System;
|
|
||||||
using WinUIEx;
|
using WinUIEx;
|
||||||
|
|
||||||
using DispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue;
|
|
||||||
|
|
||||||
namespace AdvancedPaste.ViewModels
|
namespace AdvancedPaste.ViewModels
|
||||||
{
|
{
|
||||||
public partial class OptionsViewModel : ObservableObject, IDisposable
|
public partial class OptionsViewModel : ObservableObject
|
||||||
{
|
{
|
||||||
private readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
private readonly DispatcherQueue _dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
||||||
private readonly DispatcherTimer _clipboardTimer;
|
|
||||||
private readonly IUserSettings _userSettings;
|
private readonly IUserSettings _userSettings;
|
||||||
private readonly AICompletionsHelper aiHelper;
|
|
||||||
private readonly App app = App.Current as App;
|
private App app = App.Current as App;
|
||||||
private readonly PasteFormat[] _allStandardPasteFormats;
|
|
||||||
|
private AICompletionsHelper aiHelper;
|
||||||
|
|
||||||
public DataPackageView ClipboardData { get; set; }
|
public DataPackageView ClipboardData { get; set; }
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
[NotifyPropertyChangedFor(nameof(InputTxtBoxPlaceholderText))]
|
[NotifyPropertyChangedFor(nameof(InputTxtBoxPlaceholderText))]
|
||||||
[NotifyPropertyChangedFor(nameof(GeneralErrorText))]
|
|
||||||
[NotifyPropertyChangedFor(nameof(IsCustomAIEnabled))]
|
[NotifyPropertyChangedFor(nameof(IsCustomAIEnabled))]
|
||||||
private bool _isClipboardDataText;
|
private bool _isClipboardDataText;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
[NotifyPropertyChangedFor(nameof(InputTxtBoxPlaceholderText))]
|
||||||
|
private bool _isCustomAIEnabled;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private bool _clipboardHistoryEnabled;
|
private bool _clipboardHistoryEnabled;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
[NotifyPropertyChangedFor(nameof(InputTxtBoxPlaceholderText))]
|
[NotifyPropertyChangedFor(nameof(InputTxtBoxErrorText))]
|
||||||
[NotifyPropertyChangedFor(nameof(GeneralErrorText))]
|
|
||||||
[NotifyPropertyChangedFor(nameof(IsCustomAIEnabled))]
|
|
||||||
private bool _isAllowedByGPO;
|
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
[NotifyPropertyChangedFor(nameof(ApiErrorText))]
|
|
||||||
private int _apiRequestStatus;
|
private int _apiRequestStatus;
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private string _query = string.Empty;
|
|
||||||
|
|
||||||
private bool _pasteFormatsDirty;
|
|
||||||
|
|
||||||
public ObservableCollection<PasteFormat> StandardPasteFormats { get; } = [];
|
|
||||||
|
|
||||||
public ObservableCollection<PasteFormat> CustomActionPasteFormats { get; } = [];
|
|
||||||
|
|
||||||
public bool IsCustomAIEnabled => IsAllowedByGPO && IsClipboardDataText && aiHelper.IsAIEnabled;
|
|
||||||
|
|
||||||
public event EventHandler<CustomActionActivatedEventArgs> CustomActionActivated;
|
|
||||||
|
|
||||||
public OptionsViewModel(IUserSettings userSettings)
|
public OptionsViewModel(IUserSettings userSettings)
|
||||||
{
|
{
|
||||||
aiHelper = new AICompletionsHelper();
|
aiHelper = new AICompletionsHelper();
|
||||||
_userSettings = userSettings;
|
_userSettings = userSettings;
|
||||||
|
|
||||||
ApiRequestStatus = (int)HttpStatusCode.OK;
|
IsCustomAIEnabled = IsClipboardDataText && aiHelper.IsAIEnabled;
|
||||||
|
|
||||||
_allStandardPasteFormats =
|
ApiRequestStatus = (int)HttpStatusCode.OK;
|
||||||
[
|
|
||||||
new PasteFormat { IconGlyph = "\uE8E9", Name = ResourceLoaderInstance.ResourceLoader.GetString("PasteAsPlainText"), Format = PasteFormats.PlainText },
|
|
||||||
new PasteFormat { IconGlyph = "\ue8a5", Name = ResourceLoaderInstance.ResourceLoader.GetString("PasteAsMarkdown"), Format = PasteFormats.Markdown },
|
|
||||||
new PasteFormat { IconGlyph = "\uE943", Name = ResourceLoaderInstance.ResourceLoader.GetString("PasteAsJson"), Format = PasteFormats.Json },
|
|
||||||
];
|
|
||||||
|
|
||||||
GeneratedResponses = new ObservableCollection<string>();
|
GeneratedResponses = new ObservableCollection<string>();
|
||||||
GeneratedResponses.CollectionChanged += (s, e) =>
|
GeneratedResponses.CollectionChanged += (s, e) =>
|
||||||
@@ -93,87 +66,10 @@ namespace AdvancedPaste.ViewModels
|
|||||||
};
|
};
|
||||||
|
|
||||||
ClipboardHistoryEnabled = IsClipboardHistoryEnabled();
|
ClipboardHistoryEnabled = IsClipboardHistoryEnabled();
|
||||||
ReadClipboard();
|
GetClipboardData();
|
||||||
_clipboardTimer = new() { Interval = TimeSpan.FromSeconds(1) };
|
|
||||||
_clipboardTimer.Tick += ClipboardTimer_Tick;
|
|
||||||
_clipboardTimer.Start();
|
|
||||||
|
|
||||||
RefreshPasteFormats();
|
|
||||||
_userSettings.CustomActions.CollectionChanged += (_, _) => EnqueueRefreshPasteFormats();
|
|
||||||
PropertyChanged += (_, e) =>
|
|
||||||
{
|
|
||||||
if (e.PropertyName == nameof(Query))
|
|
||||||
{
|
|
||||||
EnqueueRefreshPasteFormats();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClipboardTimer_Tick(object sender, object e)
|
public void GetClipboardData()
|
||||||
{
|
|
||||||
if (app.GetMainWindow()?.Visible is true)
|
|
||||||
{
|
|
||||||
ReadClipboard();
|
|
||||||
UpdateAllowedByGPO();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EnqueueRefreshPasteFormats()
|
|
||||||
{
|
|
||||||
if (_pasteFormatsDirty)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_pasteFormatsDirty = true;
|
|
||||||
_dispatcherQueue.TryEnqueue(() =>
|
|
||||||
{
|
|
||||||
RefreshPasteFormats();
|
|
||||||
_pasteFormatsDirty = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RefreshPasteFormats()
|
|
||||||
{
|
|
||||||
bool Filter(string text) => text.Contains(Query, StringComparison.CurrentCultureIgnoreCase);
|
|
||||||
|
|
||||||
var ctrlString = ResourceLoaderInstance.ResourceLoader.GetString("CtrlKey");
|
|
||||||
int shortcutNum = 0;
|
|
||||||
|
|
||||||
string GetNextShortcutText()
|
|
||||||
{
|
|
||||||
shortcutNum++;
|
|
||||||
return shortcutNum <= 9 ? $"{ctrlString}+{shortcutNum}" : string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardPasteFormats.Clear();
|
|
||||||
foreach (var format in _allStandardPasteFormats)
|
|
||||||
{
|
|
||||||
if (Filter(format.Name))
|
|
||||||
{
|
|
||||||
format.ShortcutText = GetNextShortcutText();
|
|
||||||
format.ToolTip = $"{format.Name} ({format.ShortcutText})";
|
|
||||||
StandardPasteFormats.Add(format);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomActionPasteFormats.Clear();
|
|
||||||
foreach (var customAction in _userSettings.CustomActions)
|
|
||||||
{
|
|
||||||
if (Filter(customAction.Name) || Filter(customAction.Prompt))
|
|
||||||
{
|
|
||||||
CustomActionPasteFormats.Add(new PasteFormat(customAction, GetNextShortcutText()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
_clipboardTimer.Stop();
|
|
||||||
GC.SuppressFinalize(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ReadClipboard()
|
|
||||||
{
|
{
|
||||||
ClipboardData = Clipboard.GetContent();
|
ClipboardData = Clipboard.GetContent();
|
||||||
IsClipboardDataText = ClipboardData.Contains(StandardDataFormats.Text);
|
IsClipboardDataText = ClipboardData.Contains(StandardDataFormats.Text);
|
||||||
@@ -181,10 +77,14 @@ namespace AdvancedPaste.ViewModels
|
|||||||
|
|
||||||
public void OnShow()
|
public void OnShow()
|
||||||
{
|
{
|
||||||
ReadClipboard();
|
GetClipboardData();
|
||||||
UpdateAllowedByGPO();
|
|
||||||
|
|
||||||
if (IsAllowedByGPO)
|
if (PowerToys.GPOWrapper.GPOWrapper.GetAllowedAdvancedPasteOnlineAIModelsValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
|
||||||
|
{
|
||||||
|
IsCustomAIEnabled = false;
|
||||||
|
OnPropertyChanged(nameof(InputTxtBoxPlaceholderText));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
var openAIKey = AICompletionsHelper.LoadOpenAIKey();
|
var openAIKey = AICompletionsHelper.LoadOpenAIKey();
|
||||||
var currentKey = aiHelper.GetKey();
|
var currentKey = aiHelper.GetKey();
|
||||||
@@ -204,12 +104,15 @@ namespace AdvancedPaste.ViewModels
|
|||||||
{
|
{
|
||||||
app.GetMainWindow().FinishLoading(aiHelper.IsAIEnabled);
|
app.GetMainWindow().FinishLoading(aiHelper.IsAIEnabled);
|
||||||
OnPropertyChanged(nameof(InputTxtBoxPlaceholderText));
|
OnPropertyChanged(nameof(InputTxtBoxPlaceholderText));
|
||||||
OnPropertyChanged(nameof(GeneralErrorText));
|
IsCustomAIEnabled = IsClipboardDataText && aiHelper.IsAIEnabled;
|
||||||
OnPropertyChanged(nameof(IsCustomAIEnabled));
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
TaskScheduler.Default);
|
TaskScheduler.Default);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IsCustomAIEnabled = IsClipboardDataText && aiHelper.IsAIEnabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ClipboardHistoryEnabled = IsClipboardHistoryEnabled();
|
ClipboardHistoryEnabled = IsClipboardHistoryEnabled();
|
||||||
@@ -249,44 +152,47 @@ namespace AdvancedPaste.ViewModels
|
|||||||
{
|
{
|
||||||
app.GetMainWindow().ClearInputText();
|
app.GetMainWindow().ClearInputText();
|
||||||
|
|
||||||
return IsClipboardDataText ? ResourceLoaderInstance.ResourceLoader.GetString("CustomFormatTextBox/PlaceholderText") : GeneralErrorText;
|
if (PowerToys.GPOWrapper.GPOWrapper.GetAllowedAdvancedPasteOnlineAIModelsValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GeneralErrorText
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (!IsClipboardDataText)
|
|
||||||
{
|
|
||||||
return ResourceLoaderInstance.ResourceLoader.GetString("ClipboardDataTypeMismatchWarning");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!IsAllowedByGPO)
|
|
||||||
{
|
{
|
||||||
return ResourceLoaderInstance.ResourceLoader.GetString("OpenAIGpoDisabled");
|
return ResourceLoaderInstance.ResourceLoader.GetString("OpenAIGpoDisabled");
|
||||||
}
|
}
|
||||||
|
else if (!aiHelper.IsAIEnabled)
|
||||||
if (!aiHelper.IsAIEnabled)
|
|
||||||
{
|
{
|
||||||
return ResourceLoaderInstance.ResourceLoader.GetString("OpenAINotConfigured");
|
return ResourceLoaderInstance.ResourceLoader.GetString("OpenAINotConfigured");
|
||||||
}
|
}
|
||||||
|
else if (!IsClipboardDataText)
|
||||||
|
{
|
||||||
|
return ResourceLoaderInstance.ResourceLoader.GetString("ClipboardDataTypeMismatchWarning");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return ResourceLoaderInstance.ResourceLoader.GetString("CustomFormatTextBox/PlaceholderText");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ApiErrorText
|
public string InputTxtBoxErrorText
|
||||||
{
|
{
|
||||||
get => (HttpStatusCode)ApiRequestStatus switch
|
get
|
||||||
{
|
{
|
||||||
HttpStatusCode.TooManyRequests => ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyTooManyRequests"),
|
if (ApiRequestStatus != (int)HttpStatusCode.OK)
|
||||||
HttpStatusCode.Unauthorized => ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyUnauthorized"),
|
{
|
||||||
HttpStatusCode.OK => string.Empty,
|
if (ApiRequestStatus == (int)HttpStatusCode.TooManyRequests)
|
||||||
_ => ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyError") + ApiRequestStatus.ToString(CultureInfo.InvariantCulture),
|
{
|
||||||
};
|
return ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyTooManyRequests");
|
||||||
|
}
|
||||||
|
else if (ApiRequestStatus == (int)HttpStatusCode.Unauthorized)
|
||||||
|
{
|
||||||
|
return ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyUnauthorized");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return ResourceLoaderInstance.ResourceLoader.GetString("OpenAIApiKeyError") + ApiRequestStatus.ToString(CultureInfo.InvariantCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
@@ -295,12 +201,7 @@ namespace AdvancedPaste.ViewModels
|
|||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
public void PasteCustom()
|
public void PasteCustom()
|
||||||
{
|
{
|
||||||
var text = GeneratedResponses.ElementAtOrDefault(CurrentResponseIndex);
|
PasteCustomFunction(GeneratedResponses[CurrentResponseIndex]);
|
||||||
|
|
||||||
if (text != null)
|
|
||||||
{
|
|
||||||
PasteCustomFunction(text);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Command to select the previous custom format
|
// Command to select the previous custom format
|
||||||
@@ -405,59 +306,6 @@ namespace AdvancedPaste.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ExecutePasteFormat(VirtualKey key)
|
|
||||||
{
|
|
||||||
var index = key - VirtualKey.Number1;
|
|
||||||
var pasteFormat = StandardPasteFormats.ElementAtOrDefault(index) ?? CustomActionPasteFormats.ElementAtOrDefault(index - StandardPasteFormats.Count);
|
|
||||||
|
|
||||||
if (pasteFormat != null)
|
|
||||||
{
|
|
||||||
ExecutePasteFormat(pasteFormat);
|
|
||||||
PowerToysTelemetry.Log.WriteEvent(new Telemetry.AdvancedPasteInAppKeyboardShortcutEvent(pasteFormat.Format));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void ExecutePasteFormat(PasteFormat pasteFormat)
|
|
||||||
{
|
|
||||||
if (!IsClipboardDataText || (pasteFormat.Format == PasteFormats.Custom && !IsCustomAIEnabled))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (pasteFormat.Format)
|
|
||||||
{
|
|
||||||
case PasteFormats.PlainText:
|
|
||||||
ToPlainTextFunction();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PasteFormats.Markdown:
|
|
||||||
ToMarkdownFunction();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PasteFormats.Json:
|
|
||||||
ToJsonFunction();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PasteFormats.Custom:
|
|
||||||
Query = pasteFormat.Prompt;
|
|
||||||
CustomActionActivated?.Invoke(this, new CustomActionActivatedEventArgs(pasteFormat.Prompt, false));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void ExecuteCustomActionWithPaste(int customActionId)
|
|
||||||
{
|
|
||||||
Logger.LogTrace();
|
|
||||||
|
|
||||||
var customAction = _userSettings.CustomActions.FirstOrDefault(customAction => customAction.Id == customActionId);
|
|
||||||
|
|
||||||
if (customAction != null)
|
|
||||||
{
|
|
||||||
Query = customAction.Prompt;
|
|
||||||
CustomActionActivated?.Invoke(this, new CustomActionActivatedEventArgs(customAction.Prompt, true));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal async Task<string> GenerateCustomFunction(string inputInstructions)
|
internal async Task<string> GenerateCustomFunction(string inputInstructions)
|
||||||
{
|
{
|
||||||
Logger.LogTrace();
|
Logger.LogTrace();
|
||||||
@@ -467,7 +315,7 @@ namespace AdvancedPaste.ViewModels
|
|||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsClipboardDataText)
|
if (ClipboardData == null || !ClipboardData.Contains(StandardDataFormats.Text))
|
||||||
{
|
{
|
||||||
Logger.LogWarning("Clipboard does not contain text data");
|
Logger.LogWarning("Clipboard does not contain text data");
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
@@ -568,10 +416,5 @@ namespace AdvancedPaste.ViewModels
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateAllowedByGPO()
|
|
||||||
{
|
|
||||||
IsAllowedByGPO = PowerToys.GPOWrapper.GPOWrapper.GetAllowedAdvancedPasteOnlineAIModelsValue() != PowerToys.GPOWrapper.GpoRuleConfigured.Disabled;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,40 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../../../../common/version/version.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
#include "winres.h"
|
#include "winres.h"
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|||||||
@@ -14,10 +14,6 @@
|
|||||||
#include <common/utils/logger_helper.h>
|
#include <common/utils/logger_helper.h>
|
||||||
#include <common/utils/winapi_error.h>
|
#include <common/utils/winapi_error.h>
|
||||||
|
|
||||||
#include <atlfile.h>
|
|
||||||
#include <atlstr.h>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lpReserved*/)
|
BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lpReserved*/)
|
||||||
{
|
{
|
||||||
switch (ul_reason_for_call)
|
switch (ul_reason_for_call)
|
||||||
@@ -39,10 +35,6 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lp
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
const wchar_t JSON_KEY_PROPERTIES[] = L"properties";
|
const wchar_t JSON_KEY_PROPERTIES[] = L"properties";
|
||||||
const wchar_t JSON_KEY_CUSTOM_ACTIONS[] = L"custom-actions";
|
|
||||||
const wchar_t JSON_KEY_SHORTCUT[] = L"shortcut";
|
|
||||||
const wchar_t JSON_KEY_IS_SHOWN[] = L"isShown";
|
|
||||||
const wchar_t JSON_KEY_ID[] = L"id";
|
|
||||||
const wchar_t JSON_KEY_WIN[] = L"win";
|
const wchar_t JSON_KEY_WIN[] = L"win";
|
||||||
const wchar_t JSON_KEY_ALT[] = L"alt";
|
const wchar_t JSON_KEY_ALT[] = L"alt";
|
||||||
const wchar_t JSON_KEY_CTRL[] = L"ctrl";
|
const wchar_t JSON_KEY_CTRL[] = L"ctrl";
|
||||||
@@ -68,30 +60,33 @@ private:
|
|||||||
|
|
||||||
HANDLE m_hProcess;
|
HANDLE m_hProcess;
|
||||||
|
|
||||||
std::thread create_pipe_thread;
|
|
||||||
std::unique_ptr<CAtlFile> m_write_pipe;
|
|
||||||
|
|
||||||
// Time to wait for process to close after sending WM_CLOSE signal
|
// Time to wait for process to close after sending WM_CLOSE signal
|
||||||
static const constexpr int MAX_WAIT_MILLISEC = 10000;
|
static const int MAX_WAIT_MILLISEC = 10000;
|
||||||
|
|
||||||
static const constexpr int NUM_DEFAULT_HOTKEYS = 4;
|
|
||||||
|
|
||||||
Hotkey m_paste_as_plain_hotkey = { .win = true, .ctrl = true, .shift = false, .alt = true, .key = 'V' };
|
Hotkey m_paste_as_plain_hotkey = { .win = true, .ctrl = true, .shift = false, .alt = true, .key = 'V' };
|
||||||
Hotkey m_advanced_paste_ui_hotkey = { .win = true, .ctrl = false, .shift = true, .alt = false, .key = 'V' };
|
Hotkey m_advanced_paste_ui_hotkey = { .win = true, .ctrl = false, .shift = true, .alt = false, .key = 'V' };
|
||||||
Hotkey m_paste_as_markdown_hotkey{};
|
Hotkey m_paste_as_markdown_hotkey{};
|
||||||
Hotkey m_paste_as_json_hotkey{};
|
Hotkey m_paste_as_json_hotkey{};
|
||||||
|
|
||||||
std::vector<Hotkey> m_custom_action_hotkeys;
|
|
||||||
std::vector<int> m_custom_action_ids;
|
|
||||||
|
|
||||||
bool m_preview_custom_format_output = true;
|
bool m_preview_custom_format_output = true;
|
||||||
|
|
||||||
Hotkey parse_single_hotkey(const wchar_t* keyName, const winrt::Windows::Data::Json::JsonObject& settingsObject)
|
// Handle to event used to invoke AdvancedPaste
|
||||||
|
HANDLE m_hShowUIEvent;
|
||||||
|
HANDLE m_hPasteMarkdownEvent;
|
||||||
|
HANDLE m_hPasteJsonEvent;
|
||||||
|
|
||||||
|
Hotkey parse_single_hotkey(const wchar_t* hotkey, const winrt::Windows::Data::Json::JsonObject& settingsObject)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
const auto jsonHotkeyObject = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(keyName);
|
Hotkey _temp_paste_as_plain;
|
||||||
return parse_single_hotkey(jsonHotkeyObject);
|
auto jsonHotkeyObject = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(hotkey);
|
||||||
|
_temp_paste_as_plain.win = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_WIN);
|
||||||
|
_temp_paste_as_plain.alt = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_ALT);
|
||||||
|
_temp_paste_as_plain.shift = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_SHIFT);
|
||||||
|
_temp_paste_as_plain.ctrl = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_CTRL);
|
||||||
|
_temp_paste_as_plain.key = static_cast<unsigned char>(jsonHotkeyObject.GetNamedNumber(JSON_KEY_CODE));
|
||||||
|
return _temp_paste_as_plain;
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
@@ -101,38 +96,6 @@ private:
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
static Hotkey parse_single_hotkey(const winrt::Windows::Data::Json::JsonObject& jsonHotkeyObject)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Hotkey hotkey;
|
|
||||||
hotkey.win = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_WIN);
|
|
||||||
hotkey.alt = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_ALT);
|
|
||||||
hotkey.shift = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_SHIFT);
|
|
||||||
hotkey.ctrl = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_CTRL);
|
|
||||||
hotkey.key = static_cast<unsigned char>(jsonHotkeyObject.GetNamedNumber(JSON_KEY_CODE));
|
|
||||||
return hotkey;
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
Logger::error("Failed to initialize AdvancedPaste shortcut from settings. Value will keep unchanged.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
static json::JsonObject to_json_object(const Hotkey& hotkey)
|
|
||||||
{
|
|
||||||
json::JsonObject jsonObject;
|
|
||||||
jsonObject.SetNamedValue(JSON_KEY_WIN, json::value(hotkey.win));
|
|
||||||
jsonObject.SetNamedValue(JSON_KEY_ALT, json::value(hotkey.alt));
|
|
||||||
jsonObject.SetNamedValue(JSON_KEY_SHIFT, json::value(hotkey.shift));
|
|
||||||
jsonObject.SetNamedValue(JSON_KEY_CTRL, json::value(hotkey.ctrl));
|
|
||||||
jsonObject.SetNamedValue(JSON_KEY_CODE, json::value(hotkey.key));
|
|
||||||
|
|
||||||
return jsonObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool migrate_data_and_remove_data_file(Hotkey& old_paste_as_plain_hotkey)
|
bool migrate_data_and_remove_data_file(Hotkey& old_paste_as_plain_hotkey)
|
||||||
{
|
{
|
||||||
const wchar_t OLD_JSON_KEY_ACTIVATION_SHORTCUT[] = L"ActivationShortcut";
|
const wchar_t OLD_JSON_KEY_ACTIVATION_SHORTCUT[] = L"ActivationShortcut";
|
||||||
@@ -168,7 +131,7 @@ private:
|
|||||||
{
|
{
|
||||||
auto settingsObject = settings.get_raw_json();
|
auto settingsObject = settings.get_raw_json();
|
||||||
|
|
||||||
// Migrate Paste As Plain text shortcut
|
// Migrate Paste As PLain text shortcut
|
||||||
Hotkey old_paste_as_plain_hotkey;
|
Hotkey old_paste_as_plain_hotkey;
|
||||||
bool old_data_migrated = migrate_data_and_remove_data_file(old_paste_as_plain_hotkey);
|
bool old_data_migrated = migrate_data_and_remove_data_file(old_paste_as_plain_hotkey);
|
||||||
if (old_data_migrated)
|
if (old_data_migrated)
|
||||||
@@ -176,7 +139,12 @@ private:
|
|||||||
m_paste_as_plain_hotkey = old_paste_as_plain_hotkey;
|
m_paste_as_plain_hotkey = old_paste_as_plain_hotkey;
|
||||||
|
|
||||||
// override settings file
|
// override settings file
|
||||||
const auto new_hotkey_value = to_json_object(old_paste_as_plain_hotkey);
|
json::JsonObject new_hotkey_value;
|
||||||
|
new_hotkey_value.SetNamedValue(JSON_KEY_WIN, json::value(old_paste_as_plain_hotkey.win));
|
||||||
|
new_hotkey_value.SetNamedValue(JSON_KEY_ALT, json::value(old_paste_as_plain_hotkey.alt));
|
||||||
|
new_hotkey_value.SetNamedValue(JSON_KEY_SHIFT, json::value(old_paste_as_plain_hotkey.shift));
|
||||||
|
new_hotkey_value.SetNamedValue(JSON_KEY_CTRL, json::value(old_paste_as_plain_hotkey.ctrl));
|
||||||
|
new_hotkey_value.SetNamedValue(JSON_KEY_CODE, json::value(old_paste_as_plain_hotkey.key));
|
||||||
|
|
||||||
if (!settingsObject.HasKey(JSON_KEY_PROPERTIES))
|
if (!settingsObject.HasKey(JSON_KEY_PROPERTIES))
|
||||||
{
|
{
|
||||||
@@ -185,7 +153,13 @@ private:
|
|||||||
|
|
||||||
settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).SetNamedValue(JSON_KEY_PASTE_AS_PLAIN_HOTKEY, new_hotkey_value);
|
settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).SetNamedValue(JSON_KEY_PASTE_AS_PLAIN_HOTKEY, new_hotkey_value);
|
||||||
|
|
||||||
const auto ui_hotkey = to_json_object(m_advanced_paste_ui_hotkey);
|
|
||||||
|
json::JsonObject ui_hotkey;
|
||||||
|
ui_hotkey.SetNamedValue(JSON_KEY_WIN, json::value(m_advanced_paste_ui_hotkey.win));
|
||||||
|
ui_hotkey.SetNamedValue(JSON_KEY_ALT, json::value(m_advanced_paste_ui_hotkey.alt));
|
||||||
|
ui_hotkey.SetNamedValue(JSON_KEY_SHIFT, json::value(m_advanced_paste_ui_hotkey.shift));
|
||||||
|
ui_hotkey.SetNamedValue(JSON_KEY_CTRL, json::value(m_advanced_paste_ui_hotkey.ctrl));
|
||||||
|
ui_hotkey.SetNamedValue(JSON_KEY_CODE, json::value(m_advanced_paste_ui_hotkey.key));
|
||||||
settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).SetNamedValue(JSON_KEY_ADVANCED_PASTE_UI_HOTKEY, ui_hotkey);
|
settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).SetNamedValue(JSON_KEY_ADVANCED_PASTE_UI_HOTKEY, ui_hotkey);
|
||||||
|
|
||||||
settings.save_to_settings_file();
|
settings.save_to_settings_file();
|
||||||
@@ -194,56 +168,40 @@ private:
|
|||||||
{
|
{
|
||||||
if (settingsObject.GetView().Size())
|
if (settingsObject.GetView().Size())
|
||||||
{
|
{
|
||||||
const std::array<std::pair<Hotkey*, LPCWSTR>, NUM_DEFAULT_HOTKEYS> defaultHotkeys{
|
if (settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).HasKey(JSON_KEY_PASTE_AS_PLAIN_HOTKEY))
|
||||||
{ { &m_paste_as_plain_hotkey, JSON_KEY_PASTE_AS_PLAIN_HOTKEY },
|
|
||||||
{ &m_advanced_paste_ui_hotkey, JSON_KEY_ADVANCED_PASTE_UI_HOTKEY },
|
|
||||||
{ &m_paste_as_markdown_hotkey, JSON_KEY_PASTE_AS_MARKDOWN_HOTKEY },
|
|
||||||
{ &m_paste_as_json_hotkey, JSON_KEY_PASTE_AS_JSON_HOTKEY } }
|
|
||||||
};
|
|
||||||
|
|
||||||
for (auto& [hotkey, keyName] : defaultHotkeys)
|
|
||||||
{
|
{
|
||||||
*hotkey = parse_single_hotkey(keyName, settingsObject);
|
m_paste_as_plain_hotkey = parse_single_hotkey(JSON_KEY_PASTE_AS_PLAIN_HOTKEY, settingsObject);
|
||||||
}
|
}
|
||||||
|
if (settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).HasKey(JSON_KEY_ADVANCED_PASTE_UI_HOTKEY))
|
||||||
m_custom_action_hotkeys.clear();
|
|
||||||
m_custom_action_ids.clear();
|
|
||||||
|
|
||||||
if (settingsObject.HasKey(JSON_KEY_PROPERTIES))
|
|
||||||
{
|
{
|
||||||
const auto propertiesObject = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES);
|
m_advanced_paste_ui_hotkey = parse_single_hotkey(JSON_KEY_ADVANCED_PASTE_UI_HOTKEY, settingsObject);
|
||||||
|
}
|
||||||
if (propertiesObject.HasKey(JSON_KEY_CUSTOM_ACTIONS))
|
if (settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).HasKey(JSON_KEY_PASTE_AS_MARKDOWN_HOTKEY))
|
||||||
{
|
{
|
||||||
const auto customActions = propertiesObject.GetNamedObject(JSON_KEY_CUSTOM_ACTIONS).GetNamedArray(JSON_KEY_VALUE);
|
m_paste_as_markdown_hotkey = parse_single_hotkey(JSON_KEY_PASTE_AS_MARKDOWN_HOTKEY, settingsObject);
|
||||||
|
}
|
||||||
for (const auto& customAction : customActions)
|
if (settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).HasKey(JSON_KEY_PASTE_AS_JSON_HOTKEY))
|
||||||
{
|
{
|
||||||
const auto object = customAction.GetObjectW();
|
m_paste_as_json_hotkey = parse_single_hotkey(JSON_KEY_PASTE_AS_JSON_HOTKEY, settingsObject);
|
||||||
|
|
||||||
if (object.GetNamedBoolean(JSON_KEY_IS_SHOWN, false))
|
|
||||||
{
|
|
||||||
m_custom_action_hotkeys.push_back(parse_single_hotkey(object.GetNamedObject(JSON_KEY_SHORTCUT)));
|
|
||||||
m_custom_action_ids.push_back(static_cast<int>(object.GetNamedNumber(JSON_KEY_ID)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_process_running() const
|
bool is_process_running()
|
||||||
{
|
{
|
||||||
return WaitForSingleObject(m_hProcess, 0) == WAIT_TIMEOUT;
|
return WaitForSingleObject(m_hProcess, 0) == WAIT_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void launch_process(const std::wstring& pipe_name)
|
void launch_process(const std::wstring& arg = L"")
|
||||||
{
|
{
|
||||||
Logger::trace(L"Starting AdvancedPaste process");
|
Logger::trace(L"Starting AdvancedPaste process");
|
||||||
const unsigned long powertoys_pid = GetCurrentProcessId();
|
unsigned long powertoys_pid = GetCurrentProcessId();
|
||||||
|
|
||||||
const auto executable_args = std::format(L"{} {}", std::to_wstring(powertoys_pid), pipe_name);
|
std::wstring executable_args = L"";
|
||||||
|
executable_args.append(std::to_wstring(powertoys_pid));
|
||||||
|
|
||||||
|
executable_args += L" " + arg;
|
||||||
|
|
||||||
SHELLEXECUTEINFOW sei{ sizeof(sei) };
|
SHELLEXECUTEINFOW sei{ sizeof(sei) };
|
||||||
sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI };
|
sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI };
|
||||||
@@ -263,55 +221,6 @@ private:
|
|||||||
m_hProcess = sei.hProcess;
|
m_hProcess = sei.hProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::optional<std::wstring> get_pipe_name(const std::wstring& prefix) const
|
|
||||||
{
|
|
||||||
UUID temp_uuid;
|
|
||||||
wchar_t* uuid_chars = nullptr;
|
|
||||||
if (UuidCreate(&temp_uuid) == RPC_S_UUID_NO_ADDRESS)
|
|
||||||
{
|
|
||||||
const auto val = get_last_error_message(GetLastError());
|
|
||||||
Logger::error(L"UuidCreate cannot create guid. {}", val.has_value() ? val.value() : L"");
|
|
||||||
return std::nullopt;
|
|
||||||
}
|
|
||||||
else if (UuidToString(&temp_uuid, reinterpret_cast<RPC_WSTR*>(&uuid_chars)) != RPC_S_OK)
|
|
||||||
{
|
|
||||||
const auto val = get_last_error_message(GetLastError());
|
|
||||||
Logger::error(L"UuidToString cannot convert to string. {}", val.has_value() ? val.value() : L"");
|
|
||||||
return std::nullopt;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto pipe_name = std::format(L"{}{}", prefix, std::wstring(uuid_chars));
|
|
||||||
RpcStringFree(reinterpret_cast<RPC_WSTR*>(&uuid_chars));
|
|
||||||
|
|
||||||
return pipe_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
void launch_process_and_named_pipe()
|
|
||||||
{
|
|
||||||
const auto pipe_name = get_pipe_name(L"powertoys_advanced_paste_");
|
|
||||||
|
|
||||||
if (!pipe_name)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
create_pipe_thread = std::thread([&] { start_named_pipe_server(pipe_name.value()); });
|
|
||||||
launch_process(pipe_name.value());
|
|
||||||
create_pipe_thread.join();
|
|
||||||
}
|
|
||||||
|
|
||||||
void send_named_pipe_message(const std::wstring& message_type, const std::wstring& message_arg = L"")
|
|
||||||
{
|
|
||||||
if (m_write_pipe)
|
|
||||||
{
|
|
||||||
const auto message = message_arg.empty() ? std::format(L"{}\r\n", message_type) : std::format(L"{} {}\r\n", message_type, message_arg);
|
|
||||||
|
|
||||||
const CString file_name(message.c_str());
|
|
||||||
m_write_pipe->Write(file_name, file_name.GetLength() * sizeof(TCHAR));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load the settings file.
|
// Load the settings file.
|
||||||
void init_settings()
|
void init_settings()
|
||||||
{
|
{
|
||||||
@@ -349,7 +258,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void try_inject_modifier_key_restore(std::vector<INPUT>& inputs, short modifier)
|
void try_inject_modifier_key_restore(std::vector<INPUT> &inputs, short modifier)
|
||||||
{
|
{
|
||||||
// Most significant bit is set if key is down
|
// Most significant bit is set if key is down
|
||||||
if ((GetAsyncKeyState(static_cast<int>(modifier)) & 0x8000) != 0)
|
if ((GetAsyncKeyState(static_cast<int>(modifier)) & 0x8000) != 0)
|
||||||
@@ -578,54 +487,15 @@ private:
|
|||||||
EnumWindows(enum_windows, (LPARAM)m_hProcess);
|
EnumWindows(enum_windows, (LPARAM)m_hProcess);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT start_named_pipe_server(const std::wstring& pipe_name)
|
|
||||||
{
|
|
||||||
const constexpr DWORD BUFSIZE = 4096 * 4;
|
|
||||||
|
|
||||||
const auto full_pipe_name = std::format(L"\\\\.\\pipe\\{}", pipe_name);
|
|
||||||
|
|
||||||
const auto hPipe = CreateNamedPipe(
|
|
||||||
full_pipe_name.c_str(), // pipe name
|
|
||||||
PIPE_ACCESS_OUTBOUND, // write access
|
|
||||||
PIPE_TYPE_MESSAGE | // message type pipe
|
|
||||||
PIPE_READMODE_MESSAGE | // message-read mode
|
|
||||||
PIPE_WAIT, // blocking mode
|
|
||||||
1, // max. instances
|
|
||||||
BUFSIZE, // output buffer size
|
|
||||||
0, // input buffer size
|
|
||||||
0, // client time-out
|
|
||||||
NULL); // default security attribute
|
|
||||||
|
|
||||||
if (hPipe == NULL || hPipe == INVALID_HANDLE_VALUE)
|
|
||||||
{
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This call blocks until a client process connects to the pipe
|
|
||||||
BOOL connected = ConnectNamedPipe(hPipe, NULL);
|
|
||||||
if (!connected)
|
|
||||||
{
|
|
||||||
if (GetLastError() == ERROR_PIPE_CONNECTED)
|
|
||||||
{
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CloseHandle(hPipe);
|
|
||||||
}
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_write_pipe = std::make_unique<CAtlFile>(hPipe);
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AdvancedPaste()
|
AdvancedPaste()
|
||||||
{
|
{
|
||||||
app_name = GET_RESOURCE_STRING(IDS_ADVANCED_PASTE_NAME);
|
app_name = GET_RESOURCE_STRING(IDS_ADVANCED_PASTE_NAME);
|
||||||
app_key = AdvancedPasteConstants::ModuleKey;
|
app_key = AdvancedPasteConstants::ModuleKey;
|
||||||
LoggerHelpers::init_logger(app_key, L"ModuleInterface", "AdvancedPaste");
|
LoggerHelpers::init_logger(app_key, L"ModuleInterface", "AdvancedPaste");
|
||||||
|
m_hShowUIEvent = CreateDefaultEvent(CommonSharedConstants::SHOW_ADVANCED_PASTE_SHARED_EVENT);
|
||||||
|
m_hPasteMarkdownEvent = CreateDefaultEvent(CommonSharedConstants::ADVANCED_PASTE_MARKDOWN_EVENT);
|
||||||
|
m_hPasteJsonEvent = CreateDefaultEvent(CommonSharedConstants::ADVANCED_PASTE_JSON_EVENT);
|
||||||
init_settings();
|
init_settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,7 +559,7 @@ public:
|
|||||||
|
|
||||||
parse_hotkeys(values);
|
parse_hotkeys(values);
|
||||||
|
|
||||||
const auto settingsObject = values.get_raw_json();
|
auto settingsObject = values.get_raw_json();
|
||||||
if (settingsObject.GetView().Size() && settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).HasKey(JSON_KEY_SHOW_CUSTOM_PREVIEW))
|
if (settingsObject.GetView().Size() && settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).HasKey(JSON_KEY_SHOW_CUSTOM_PREVIEW))
|
||||||
{
|
{
|
||||||
m_preview_custom_format_output = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(JSON_KEY_SHOW_CUSTOM_PREVIEW).GetNamedBoolean(JSON_KEY_VALUE);
|
m_preview_custom_format_output = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(JSON_KEY_SHOW_CUSTOM_PREVIEW).GetNamedBoolean(JSON_KEY_VALUE);
|
||||||
@@ -697,10 +567,10 @@ public:
|
|||||||
|
|
||||||
// order of args matter
|
// order of args matter
|
||||||
Trace::AdvancedPaste_SettingsTelemetry(m_paste_as_plain_hotkey,
|
Trace::AdvancedPaste_SettingsTelemetry(m_paste_as_plain_hotkey,
|
||||||
m_advanced_paste_ui_hotkey,
|
m_advanced_paste_ui_hotkey,
|
||||||
m_paste_as_markdown_hotkey,
|
m_paste_as_markdown_hotkey,
|
||||||
m_paste_as_json_hotkey,
|
m_paste_as_json_hotkey,
|
||||||
m_preview_custom_format_output);
|
m_preview_custom_format_output);
|
||||||
|
|
||||||
// If you don't need to do any custom processing of the settings, proceed
|
// If you don't need to do any custom processing of the settings, proceed
|
||||||
// to persists the values calling:
|
// to persists the values calling:
|
||||||
@@ -718,9 +588,12 @@ public:
|
|||||||
{
|
{
|
||||||
Logger::trace("AdvancedPaste::enable()");
|
Logger::trace("AdvancedPaste::enable()");
|
||||||
Trace::AdvancedPaste_Enable(true);
|
Trace::AdvancedPaste_Enable(true);
|
||||||
|
ResetEvent(m_hShowUIEvent);
|
||||||
|
ResetEvent(m_hPasteMarkdownEvent);
|
||||||
|
ResetEvent(m_hPasteJsonEvent);
|
||||||
m_enabled = true;
|
m_enabled = true;
|
||||||
|
|
||||||
launch_process_and_named_pipe();
|
launch_process();
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void disable()
|
virtual void disable()
|
||||||
@@ -728,8 +601,9 @@ public:
|
|||||||
Logger::trace("AdvancedPaste::disable()");
|
Logger::trace("AdvancedPaste::disable()");
|
||||||
if (m_enabled)
|
if (m_enabled)
|
||||||
{
|
{
|
||||||
m_write_pipe = nullptr;
|
ResetEvent(m_hShowUIEvent);
|
||||||
|
ResetEvent(m_hPasteMarkdownEvent);
|
||||||
|
ResetEvent(m_hPasteJsonEvent);
|
||||||
TerminateProcess(m_hProcess, 1);
|
TerminateProcess(m_hProcess, 1);
|
||||||
Trace::AdvancedPaste_Enable(false);
|
Trace::AdvancedPaste_Enable(false);
|
||||||
|
|
||||||
@@ -748,12 +622,13 @@ public:
|
|||||||
if (!is_process_running())
|
if (!is_process_running())
|
||||||
{
|
{
|
||||||
Logger::trace(L"Launching new process");
|
Logger::trace(L"Launching new process");
|
||||||
launch_process_and_named_pipe();
|
launch_process();
|
||||||
|
|
||||||
|
Trace::AdvancedPaste_Invoked(L"AdvancedPasteUI");
|
||||||
}
|
}
|
||||||
|
|
||||||
// hotkeyId in same order as set by get_hotkeys
|
// hotkeyId in same order as set by get_hotkeys
|
||||||
if (hotkeyId == 0)
|
if (hotkeyId == 0) { // m_paste_as_plain_hotkey
|
||||||
{ // m_paste_as_plain_hotkey
|
|
||||||
Logger::trace(L"Paste as plain text hotkey pressed");
|
Logger::trace(L"Paste as plain text hotkey pressed");
|
||||||
|
|
||||||
std::thread([=]() {
|
std::thread([=]() {
|
||||||
@@ -766,40 +641,21 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hotkeyId == 1)
|
if (hotkeyId == 1) { // m_advanced_paste_ui_hotkey
|
||||||
{ // m_advanced_paste_ui_hotkey
|
|
||||||
Logger::trace(L"Setting start up event");
|
Logger::trace(L"Setting start up event");
|
||||||
|
|
||||||
bring_process_to_front();
|
bring_process_to_front();
|
||||||
send_named_pipe_message(CommonSharedConstants::ADVANCED_PASTE_SHOW_UI_MESSAGE);
|
SetEvent(m_hShowUIEvent);
|
||||||
Trace::AdvancedPaste_Invoked(L"AdvancedPasteUI");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (hotkeyId == 2)
|
if (hotkeyId == 2) { // m_paste_as_markdown_hotkey
|
||||||
{ // m_paste_as_markdown_hotkey
|
|
||||||
Logger::trace(L"Starting paste as markdown directly");
|
Logger::trace(L"Starting paste as markdown directly");
|
||||||
send_named_pipe_message(CommonSharedConstants::ADVANCED_PASTE_MARKDOWN_MESSAGE);
|
SetEvent(m_hPasteMarkdownEvent);
|
||||||
Trace::AdvancedPaste_Invoked(L"MarkdownDirect");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (hotkeyId == 3)
|
if (hotkeyId == 3) { // m_paste_as_json_hotkey
|
||||||
{ // m_paste_as_json_hotkey
|
|
||||||
Logger::trace(L"Starting paste as json directly");
|
Logger::trace(L"Starting paste as json directly");
|
||||||
send_named_pipe_message(CommonSharedConstants::ADVANCED_PASTE_JSON_MESSAGE);
|
SetEvent(m_hPasteJsonEvent);
|
||||||
Trace::AdvancedPaste_Invoked(L"JsonDirect");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto custom_action_index = hotkeyId - NUM_DEFAULT_HOTKEYS;
|
|
||||||
|
|
||||||
if (custom_action_index < m_custom_action_ids.size())
|
|
||||||
{
|
|
||||||
const auto id = m_custom_action_ids.at(custom_action_index);
|
|
||||||
|
|
||||||
Logger::trace(L"Starting custom action id={}", id);
|
|
||||||
|
|
||||||
send_named_pipe_message(CommonSharedConstants::ADVANCED_PASTE_CUSTOM_ACTION_MESSAGE, std::to_wstring(id));
|
|
||||||
Trace::AdvancedPaste_Invoked(L"CustomActionDirect");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -809,20 +665,14 @@ public:
|
|||||||
|
|
||||||
virtual size_t get_hotkeys(Hotkey* hotkeys, size_t buffer_size) override
|
virtual size_t get_hotkeys(Hotkey* hotkeys, size_t buffer_size) override
|
||||||
{
|
{
|
||||||
const size_t num_hotkeys = NUM_DEFAULT_HOTKEYS + m_custom_action_hotkeys.size();
|
if (hotkeys && buffer_size >= 4)
|
||||||
|
|
||||||
if (hotkeys && buffer_size >= num_hotkeys)
|
|
||||||
{
|
{
|
||||||
const std::array default_hotkeys = { m_paste_as_plain_hotkey,
|
hotkeys[0] = m_paste_as_plain_hotkey;
|
||||||
m_advanced_paste_ui_hotkey,
|
hotkeys[1] = m_advanced_paste_ui_hotkey;
|
||||||
m_paste_as_markdown_hotkey,
|
hotkeys[2] = m_paste_as_markdown_hotkey;
|
||||||
m_paste_as_json_hotkey };
|
hotkeys[3] = m_paste_as_json_hotkey;
|
||||||
|
|
||||||
std::copy(default_hotkeys.begin(), default_hotkeys.end(), hotkeys);
|
|
||||||
std::copy(m_custom_action_hotkeys.begin(), m_custom_action_hotkeys.end(), hotkeys + NUM_DEFAULT_HOTKEYS);
|
|
||||||
}
|
}
|
||||||
|
return 4;
|
||||||
return num_hotkeys;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool is_enabled() override
|
virtual bool is_enabled() override
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Microsoft Visual C++ generated resource script.
|
// Microsoft Visual C++ generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../../../common/version/version.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -12,6 +13,39 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// English (United States) resources
|
// English (United States) resources
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<ProjectGuid>{f5e1146e-b7b3-4e11-85fd-270a500bd78c}</ProjectGuid>
|
<ProjectGuid>{f5e1146e-b7b3-4e11-85fd-270a500bd78c}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>CropAndLock</RootNamespace>
|
<RootNamespace>CropAndLock</RootNamespace>
|
||||||
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.22621.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.20348.0</WindowsTargetPlatformVersion>
|
||||||
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
|
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
|||||||
@@ -1,7 +1,40 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../../../common/version/version.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
#include "winres.h"
|
#include "winres.h"
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO.Abstractions;
|
using System.IO.Abstractions;
|
||||||
|
|
||||||
using EnvironmentVariables.Telemetry;
|
using EnvironmentVariables.Telemetry;
|
||||||
using EnvironmentVariablesUILib;
|
using EnvironmentVariablesUILib;
|
||||||
using EnvironmentVariablesUILib.Helpers;
|
using EnvironmentVariablesUILib.Helpers;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using EnvironmentVariables.Win32;
|
using EnvironmentVariables.Win32;
|
||||||
using EnvironmentVariablesUILib;
|
using EnvironmentVariablesUILib;
|
||||||
using EnvironmentVariablesUILib.Helpers;
|
using EnvironmentVariablesUILib.Helpers;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
using EnvironmentVariablesUILib.Helpers;
|
using EnvironmentVariablesUILib.Helpers;
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
using Microsoft.UI.Dispatching;
|
using Microsoft.UI.Dispatching;
|
||||||
using Microsoft.Windows.AppLifecycle;
|
using Microsoft.Windows.AppLifecycle;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
|
|
||||||
using EnvironmentVariablesUILib.Models;
|
using EnvironmentVariablesUILib.Models;
|
||||||
using Microsoft.PowerToys.Telemetry;
|
using Microsoft.PowerToys.Telemetry;
|
||||||
using Microsoft.PowerToys.Telemetry.Events;
|
using Microsoft.PowerToys.Telemetry.Events;
|
||||||
|
|||||||
@@ -1,7 +1,40 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "../../../common/version/version.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
#include "winres.h"
|
#include "winres.h"
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION FILE_VERSION
|
||||||
|
PRODUCTVERSION PRODUCT_VERSION
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", COMPANY_NAME
|
||||||
|
VALUE "FileDescription", FILE_DESCRIPTION
|
||||||
|
VALUE "FileVersion", FILE_VERSION_STRING
|
||||||
|
VALUE "InternalName", INTERNAL_NAME
|
||||||
|
VALUE "LegalCopyright", COPYRIGHT_NOTE
|
||||||
|
VALUE "OriginalFilename", ORIGINAL_FILENAME
|
||||||
|
VALUE "ProductName", PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", PRODUCT_VERSION_STRING
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|||||||
@@ -3,13 +3,12 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
using EnvironmentVariablesUILib.Models;
|
using EnvironmentVariablesUILib.Models;
|
||||||
using Microsoft.UI.Xaml.Data;
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
|
||||||
namespace EnvironmentVariablesUILib.Converters;
|
namespace EnvironmentVariablesUILib.Converters;
|
||||||
|
|
||||||
public partial class EnvironmentStateToBoolConverter : IValueConverter
|
public class EnvironmentStateToBoolConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, string language)
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,14 +3,13 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
using EnvironmentVariablesUILib.Helpers;
|
using EnvironmentVariablesUILib.Helpers;
|
||||||
using EnvironmentVariablesUILib.Models;
|
using EnvironmentVariablesUILib.Models;
|
||||||
using Microsoft.UI.Xaml.Data;
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
|
||||||
namespace EnvironmentVariablesUILib.Converters;
|
namespace EnvironmentVariablesUILib.Converters;
|
||||||
|
|
||||||
public partial class EnvironmentStateToMessageConverter : IValueConverter
|
public class EnvironmentStateToMessageConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, string language)
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,14 +3,13 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
using EnvironmentVariablesUILib.Helpers;
|
using EnvironmentVariablesUILib.Helpers;
|
||||||
using EnvironmentVariablesUILib.Models;
|
using EnvironmentVariablesUILib.Models;
|
||||||
using Microsoft.UI.Xaml.Data;
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
|
||||||
namespace EnvironmentVariablesUILib.Converters;
|
namespace EnvironmentVariablesUILib.Converters;
|
||||||
|
|
||||||
public partial class EnvironmentStateToTitleConverter : IValueConverter
|
public class EnvironmentStateToTitleConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, string language)
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,14 +3,13 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
using EnvironmentVariablesUILib.Models;
|
using EnvironmentVariablesUILib.Models;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Data;
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
|
||||||
namespace EnvironmentVariablesUILib.Converters;
|
namespace EnvironmentVariablesUILib.Converters;
|
||||||
|
|
||||||
public partial class EnvironmentStateToVisibilityConverter : IValueConverter
|
public class EnvironmentStateToVisibilityConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, string language)
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,13 +3,12 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
using EnvironmentVariablesUILib.Models;
|
using EnvironmentVariablesUILib.Models;
|
||||||
using Microsoft.UI.Xaml.Data;
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
|
||||||
namespace EnvironmentVariablesUILib.Converters;
|
namespace EnvironmentVariablesUILib.Converters;
|
||||||
|
|
||||||
public partial class VariableTypeToGlyphConverter : IValueConverter
|
public class VariableTypeToGlyphConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, string language)
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using EnvironmentVariablesUILib.Models;
|
using EnvironmentVariablesUILib.Models;
|
||||||
using EnvironmentVariablesUILib.ViewModels;
|
using EnvironmentVariablesUILib.ViewModels;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user