mirror of
https://github.com/microsoft/terminal.git
synced 2026-05-17 15:36:35 +00:00
Compare commits
59 Commits
dev/lhecke
...
v1.25.1241
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
168dc99a6a | ||
|
|
e9f8ec877b | ||
|
|
021a571dfb | ||
|
|
ed6cb17ecb | ||
|
|
b2d88cbe42 | ||
|
|
fcc614e9f5 | ||
|
|
5af583ef5a | ||
|
|
82dfa63202 | ||
|
|
418401e1c2 | ||
|
|
88a236c913 | ||
|
|
0252c78997 | ||
|
|
82d5e0cad3 | ||
|
|
d960f4a05a | ||
|
|
2c9277cbb4 | ||
|
|
e382d328b2 | ||
|
|
2bd369939c | ||
|
|
7f5185eb06 | ||
|
|
0291d97503 | ||
|
|
f7a5515cf7 | ||
|
|
2219739391 | ||
|
|
7cff119b34 | ||
|
|
58414c542f | ||
|
|
bf77086b60 | ||
|
|
2644ca0a8a | ||
|
|
1ad9a2e932 | ||
|
|
74f3bb42e1 | ||
|
|
c0ca78c3ee | ||
|
|
37dc437e65 | ||
|
|
4a782b062c | ||
|
|
4701843082 | ||
|
|
efe9f27c00 | ||
|
|
008e293205 | ||
|
|
7adb2157a5 | ||
|
|
9ae724aa5b | ||
|
|
d6da2555f5 | ||
|
|
f740350283 | ||
|
|
62512eb116 | ||
|
|
b6f041c4a4 | ||
|
|
1414abc843 | ||
|
|
3b8c5606ee | ||
|
|
3918332853 | ||
|
|
28c98c5dc1 | ||
|
|
854079e284 | ||
|
|
e05a5fb6d8 | ||
|
|
fbd48e7463 | ||
|
|
ab4000ca9a | ||
|
|
b4259e61a5 | ||
|
|
0a3fbdefb3 | ||
|
|
9f0cd70ae9 | ||
|
|
127775118d | ||
|
|
343db95021 | ||
|
|
f20c549d15 | ||
|
|
300bc2b513 | ||
|
|
b6375cc028 | ||
|
|
67669a35c5 | ||
|
|
e20e1f7bf9 | ||
|
|
c81c66b406 | ||
|
|
83b9569ce0 | ||
|
|
830935d500 |
3
.github/actions/spelling/allow/allow.txt
vendored
3
.github/actions/spelling/allow/allow.txt
vendored
@@ -67,11 +67,14 @@ servicebus
|
||||
slnt
|
||||
stakeholders
|
||||
subpage
|
||||
subpages
|
||||
sustainability
|
||||
sxn
|
||||
Tencent
|
||||
toolset
|
||||
Uids
|
||||
UEFI
|
||||
UIDs
|
||||
uiatextrange
|
||||
und
|
||||
vsdevcmd
|
||||
|
||||
6
.github/actions/spelling/expect/expect.txt
vendored
6
.github/actions/spelling/expect/expect.txt
vendored
@@ -256,7 +256,6 @@ conterm
|
||||
contsf
|
||||
contypes
|
||||
conwinuserrefs
|
||||
coordnew
|
||||
COPYCOLOR
|
||||
COPYDATA
|
||||
COPYDATASTRUCT
|
||||
@@ -573,6 +572,7 @@ FGHIJ
|
||||
fgidx
|
||||
FGs
|
||||
FILEDESCRIPTION
|
||||
filehops
|
||||
FILESUBTYPE
|
||||
FILESYSPATH
|
||||
FILEW
|
||||
@@ -622,7 +622,6 @@ fuzzmap
|
||||
fuzzwrapper
|
||||
fwdecl
|
||||
fwe
|
||||
fwlink
|
||||
fzf
|
||||
gci
|
||||
gcx
|
||||
@@ -866,6 +865,7 @@ KILLACTIVE
|
||||
KILLFOCUS
|
||||
kinda
|
||||
KIYEOK
|
||||
KKP
|
||||
KLF
|
||||
KLMNO
|
||||
KOK
|
||||
@@ -885,6 +885,7 @@ LBUTTONDOWN
|
||||
LBUTTONUP
|
||||
lcb
|
||||
lci
|
||||
LCMAP
|
||||
LCONTROL
|
||||
LCTRL
|
||||
lcx
|
||||
@@ -1772,6 +1773,7 @@ uldash
|
||||
uldb
|
||||
ULONGLONG
|
||||
ulwave
|
||||
Unaccess
|
||||
Unadvise
|
||||
unattend
|
||||
UNCPRIORITY
|
||||
|
||||
@@ -56,11 +56,12 @@
|
||||
<ReleaseNotes>
|
||||
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
|
||||
|
||||
- Ą ωћόĺé ņέш ∑×τзńşĩōиŝ ρâģε τђат šнòωş ωħąт нǻś ъеēñ įηšтǻľĺéδ ĭʼnтο ўбμŗ Ţзřmĭňāŀ !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- €όммаήδ Рдĺēтţĕ пŏẅ şĥŏшś üρ ϊñ ỳоũѓ йαťïνє ļäŋģµаġέ άś ŵєŀľ åś Σиĝℓĭŝђ !!! !!! !!! !!! !!! !!! !!!
|
||||
- ∏еẅ VΤ ƒэåŧύґέŝ şűçн ăŝ ѕỳňсĥŗǿйìźėð гēŋďзříⁿğ, ηĕш ćôĺõг şĉћěмєѕ, çóńƒіĝџŗáτїöπ ƒοг qũī¢ķ möűšë ąćŧϊόņŝ ľîķє žøōmίйğ, ǻⁿđ мόřε !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- ₣ïňάĺĺў, ŧне âъΐŀίťŷ ţø şēаґсђ ƒбг ăиÿ şēťτіήġ! !!! !!! !!! !!! !!!
|
||||
- Á ŋеώ ñăŧїνе ěðíτōг ƒοѓ ќэÿ вїñďĭňğş, дčтιθήѕ дñð çθmmãήδ ρàľěţťę ёñтгĩέś. !!! !!! !!! !!! !!! !!! !!! !
|
||||
- Пėώ čоmmμñìтў ŀό¢àłįżåţίòйš ŧō Šэґъιäñ åηδ Ůκŗăįлīăπ !!! !!! !!! !!! !!! !
|
||||
- Ѕυррòŗт ƒòŗ ťĥё "Kitty" ĸ℮ŷъøàŗď ρřŏťô¢õℓ ƒŏґ нįģћ-ƒíđёℓïтÿ îńрüť êńсøďíлğ !!! !!! !!! !!! !!! !!! !!! !
|
||||
|
||||
Ρĺęąŝэ ѕєě õμя ĞĭтΗύв řєĺэдšέŝ рάġě ƒοґ àďđϊтїõлаℓ ðêţǻїłş. !!! !!! !!! !!! !!! !!!
|
||||
Ρŀ℮âѕē şєё όûя ĜîтΗūь ŕεĺĕǻŝёš раġĕ ƒŏґ ãδđϊŧïбπåľ δеτáΐłś. !!! !!! !!! !!! !!! !!!
|
||||
</ReleaseNotes>
|
||||
<ScreenshotCaptions>
|
||||
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
|
||||
|
||||
@@ -56,11 +56,12 @@
|
||||
<ReleaseNotes>
|
||||
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
|
||||
|
||||
- Ą ωћόĺé ņέш ∑×τзńşĩōиŝ ρâģε τђат šнòωş ωħąт нǻś ъеēñ įηšтǻľĺéδ ĭʼnтο ўбμŗ Ţзřmĭňāŀ !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- €όммаήδ Рдĺēтţĕ пŏẅ şĥŏшś üρ ϊñ ỳоũѓ йαťïνє ļäŋģµаġέ άś ŵєŀľ åś Σиĝℓĭŝђ !!! !!! !!! !!! !!! !!! !!!
|
||||
- ∏еẅ VΤ ƒэåŧύґέŝ şűçн ăŝ ѕỳňсĥŗǿйìźėð гēŋďзříⁿğ, ηĕш ćôĺõг şĉћěмєѕ, çóńƒіĝџŗáτїöπ ƒοг qũī¢ķ möűšë ąćŧϊόņŝ ľîķє žøōmίйğ, ǻⁿđ мόřε !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- ₣ïňάĺĺў, ŧне âъΐŀίťŷ ţø şēаґсђ ƒбг ăиÿ şēťτіήġ! !!! !!! !!! !!! !!!
|
||||
- Á ŋеώ ñăŧїνе ěðíτōг ƒοѓ ќэÿ вїñďĭňğş, дčтιθήѕ дñð çθmmãήδ ρàľěţťę ёñтгĩέś. !!! !!! !!! !!! !!! !!! !!! !
|
||||
- Пėώ čоmmμñìтў ŀό¢àłįżåţίòйš ŧō Šэґъιäñ åηδ Ůκŗăįлīăπ !!! !!! !!! !!! !!! !
|
||||
- Ѕυррòŗт ƒòŗ ťĥё "Kitty" ĸ℮ŷъøàŗď ρřŏťô¢õℓ ƒŏґ нįģћ-ƒíđёℓïтÿ îńрüť êńсøďíлğ !!! !!! !!! !!! !!! !!! !!! !
|
||||
|
||||
Ρĺęąŝэ ѕєě õμя ĞĭтΗύв řєĺэдšέŝ рάġě ƒοґ àďđϊтїõлаℓ ðêţǻїłş. !!! !!! !!! !!! !!! !!!
|
||||
Ρŀ℮âѕē şєё όûя ĜîтΗūь ŕεĺĕǻŝёš раġĕ ƒŏґ ãδđϊŧïбπåľ δеτáΐłś. !!! !!! !!! !!! !!! !!!
|
||||
</ReleaseNotes>
|
||||
<ScreenshotCaptions>
|
||||
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
|
||||
|
||||
@@ -56,11 +56,12 @@
|
||||
<ReleaseNotes>
|
||||
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
|
||||
|
||||
- Ą ωћόĺé ņέш ∑×τзńşĩōиŝ ρâģε τђат šнòωş ωħąт нǻś ъеēñ įηšтǻľĺéδ ĭʼnтο ўбμŗ Ţзřmĭňāŀ !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- €όммаήδ Рдĺēтţĕ пŏẅ şĥŏшś üρ ϊñ ỳоũѓ йαťïνє ļäŋģµаġέ άś ŵєŀľ åś Σиĝℓĭŝђ !!! !!! !!! !!! !!! !!! !!!
|
||||
- ∏еẅ VΤ ƒэåŧύґέŝ şűçн ăŝ ѕỳňсĥŗǿйìźėð гēŋďзříⁿğ, ηĕш ćôĺõг şĉћěмєѕ, çóńƒіĝџŗáτїöπ ƒοг qũī¢ķ möűšë ąćŧϊόņŝ ľîķє žøōmίйğ, ǻⁿđ мόřε !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- ₣ïňάĺĺў, ŧне âъΐŀίťŷ ţø şēаґсђ ƒбг ăиÿ şēťτіήġ! !!! !!! !!! !!! !!!
|
||||
- Á ŋеώ ñăŧїνе ěðíτōг ƒοѓ ќэÿ вїñďĭňğş, дčтιθήѕ дñð çθmmãήδ ρàľěţťę ёñтгĩέś. !!! !!! !!! !!! !!! !!! !!! !
|
||||
- Пėώ čоmmμñìтў ŀό¢àłįżåţίòйš ŧō Šэґъιäñ åηδ Ůκŗăįлīăπ !!! !!! !!! !!! !!! !
|
||||
- Ѕυррòŗт ƒòŗ ťĥё "Kitty" ĸ℮ŷъøàŗď ρřŏťô¢õℓ ƒŏґ нįģћ-ƒíđёℓïтÿ îńрüť êńсøďíлğ !!! !!! !!! !!! !!! !!! !!! !
|
||||
|
||||
Ρĺęąŝэ ѕєě õμя ĞĭтΗύв řєĺэдšέŝ рάġě ƒοґ àďđϊтїõлаℓ ðêţǻїłş. !!! !!! !!! !!! !!! !!!
|
||||
Ρŀ℮âѕē şєё όûя ĜîтΗūь ŕεĺĕǻŝёš раġĕ ƒŏґ ãδđϊŧïбπåľ δеτáΐłś. !!! !!! !!! !!! !!! !!!
|
||||
</ReleaseNotes>
|
||||
<ScreenshotCaptions>
|
||||
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
<ReleaseNotes>
|
||||
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
|
||||
|
||||
- Ẁē'νё àðđέď đöžзńş öƒ śėŧťїńģš тб тнè ÛĮ ťħąт ŏņ¢з όⁿℓγ έжіѕŧéð іή тђε ЈŠΩŃ ƒїℓė, ĭňĉŀџđіņģ å ňэẅ φâģé ƒøя ςŭśŧŏmïżϊñģ тħέ ĺαŷöυτ öƒ убµř Йέẁ Ţàъ мęήµ! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- Ẁè ĥаνė řэąřčħΐŧέсτέð щįлďοш мǻňαĝēмêиť ťô ϊmрябνé ŗĕŀĩāвîĺïтγ; ρŀěăѕе ƒíŀё αⁿу вûġš ÿøú εʼnćōùлťēѓ ẃïτħ ŧћё wt.exe ǻļĭâś !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- Рґøƒíŀêŝ ňöẁ šћθẁ ãй ĭčöñ ίƒ ŧħэŷ'νę ъеєл ђіðδэñ őř řєƒěґ ŧσ φяοġгаmŝ ẅђíçĥ ẁ℮гέ џňϊйşťàľĺèð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !
|
||||
- Ą ωћόĺé ņέш ∑×τзńşĩōиŝ ρâģε τђат šнòωş ωħąт нǻś ъеēñ įηšтǻľĺéδ ĭʼnтο ўбμŗ Ţзřmĭňāŀ !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- €όммаήδ Рдĺēтţĕ пŏẅ şĥŏшś üρ ϊñ ỳоũѓ йαťïνє ļäŋģµаġέ άś ŵєŀľ åś Σиĝℓĭŝђ !!! !!! !!! !!! !!! !!! !!!
|
||||
- ∏еẅ VΤ ƒэåŧύґέŝ şűçн ăŝ ѕỳňсĥŗǿйìźėð гēŋďзříⁿğ, ηĕш ćôĺõг şĉћěмєѕ, çóńƒіĝџŗáτїöπ ƒοг qũī¢ķ möűšë ąćŧϊόņŝ ľîķє žøōmίйğ, ǻⁿđ мόřε !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
|
||||
Рļèāŝє ŝèĕ θџŗ ĢίťĤцъ řέĺэªşэš ρąĝę ƒόř áďđїτϊōπαľ đэŧдįļŝ. !!! !!! !!! !!! !!! !!!
|
||||
Ρĺęąŝэ ѕєě õμя ĞĭтΗύв řєĺэдšέŝ рάġě ƒοґ àďđϊтїõлаℓ ðêţǻїłş. !!! !!! !!! !!! !!! !!!
|
||||
</ReleaseNotes>
|
||||
<ScreenshotCaptions>
|
||||
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
<ReleaseNotes>
|
||||
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
|
||||
|
||||
- Ẁē'νё àðđέď đöžзńş öƒ śėŧťїńģš тб тнè ÛĮ ťħąт ŏņ¢з όⁿℓγ έжіѕŧéð іή тђε ЈŠΩŃ ƒїℓė, ĭňĉŀџđіņģ å ňэẅ φâģé ƒøя ςŭśŧŏmïżϊñģ тħέ ĺαŷöυτ öƒ убµř Йέẁ Ţàъ мęήµ! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- Ẁè ĥаνė řэąřčħΐŧέсτέð щįлďοш мǻňαĝēмêиť ťô ϊmрябνé ŗĕŀĩāвîĺïтγ; ρŀěăѕе ƒíŀё αⁿу вûġš ÿøú εʼnćōùлťēѓ ẃïτħ ŧћё wt.exe ǻļĭâś !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- Рґøƒíŀêŝ ňöẁ šћθẁ ãй ĭčöñ ίƒ ŧħэŷ'νę ъеєл ђіðδэñ őř řєƒěґ ŧσ φяοġгаmŝ ẅђíçĥ ẁ℮гέ џňϊйşťàľĺèð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !
|
||||
- Ą ωћόĺé ņέш ∑×τзńşĩōиŝ ρâģε τђат šнòωş ωħąт нǻś ъеēñ įηšтǻľĺéδ ĭʼnтο ўбμŗ Ţзřmĭňāŀ !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- €όммаήδ Рдĺēтţĕ пŏẅ şĥŏшś üρ ϊñ ỳоũѓ йαťïνє ļäŋģµаġέ άś ŵєŀľ åś Σиĝℓĭŝђ !!! !!! !!! !!! !!! !!! !!!
|
||||
- ∏еẅ VΤ ƒэåŧύґέŝ şűçн ăŝ ѕỳňсĥŗǿйìźėð гēŋďзříⁿğ, ηĕш ćôĺõг şĉћěмєѕ, çóńƒіĝџŗáτїöπ ƒοг qũī¢ķ möűšë ąćŧϊόņŝ ľîķє žøōmίйğ, ǻⁿđ мόřε !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
|
||||
Рļèāŝє ŝèĕ θџŗ ĢίťĤцъ řέĺэªşэš ρąĝę ƒόř áďđїτϊōπαľ đэŧдįļŝ. !!! !!! !!! !!! !!! !!!
|
||||
Ρĺęąŝэ ѕєě õμя ĞĭтΗύв řєĺэдšέŝ рάġě ƒοґ àďđϊтїõлаℓ ðêţǻїłş. !!! !!! !!! !!! !!! !!!
|
||||
</ReleaseNotes>
|
||||
<ScreenshotCaptions>
|
||||
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
<ReleaseNotes>
|
||||
Vėѓѕіöй __VERSION_NUMBER__ !!! !!! !
|
||||
|
||||
- Ẁē'νё àðđέď đöžзńş öƒ śėŧťїńģš тб тнè ÛĮ ťħąт ŏņ¢з όⁿℓγ έжіѕŧéð іή тђε ЈŠΩŃ ƒїℓė, ĭňĉŀџđіņģ å ňэẅ φâģé ƒøя ςŭśŧŏmïżϊñģ тħέ ĺαŷöυτ öƒ убµř Йέẁ Ţàъ мęήµ! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- Ẁè ĥаνė řэąřčħΐŧέсτέð щįлďοш мǻňαĝēмêиť ťô ϊmрябνé ŗĕŀĩāвîĺïтγ; ρŀěăѕе ƒíŀё αⁿу вûġš ÿøú εʼnćōùлťēѓ ẃïτħ ŧћё wt.exe ǻļĭâś !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- Рґøƒíŀêŝ ňöẁ šћθẁ ãй ĭčöñ ίƒ ŧħэŷ'νę ъеєл ђіðδэñ őř řєƒěґ ŧσ φяοġгаmŝ ẅђíçĥ ẁ℮гέ џňϊйşťàľĺèð. !!! !!! !!! !!! !!! !!! !!! !!! !!! !
|
||||
- Ą ωћόĺé ņέш ∑×τзńşĩōиŝ ρâģε τђат šнòωş ωħąт нǻś ъеēñ įηšтǻľĺéδ ĭʼnтο ўбμŗ Ţзřmĭňāŀ !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
- €όммаήδ Рдĺēтţĕ пŏẅ şĥŏшś üρ ϊñ ỳоũѓ йαťïνє ļäŋģµаġέ άś ŵєŀľ åś Σиĝℓĭŝђ !!! !!! !!! !!! !!! !!! !!!
|
||||
- ∏еẅ VΤ ƒэåŧύґέŝ şűçн ăŝ ѕỳňсĥŗǿйìźėð гēŋďзříⁿğ, ηĕш ćôĺõг şĉћěмєѕ, çóńƒіĝџŗáτїöπ ƒοг qũī¢ķ möűšë ąćŧϊόņŝ ľîķє žøōmίйğ, ǻⁿđ мόřε !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!
|
||||
|
||||
Рļèāŝє ŝèĕ θџŗ ĢίťĤцъ řέĺэªşэš ρąĝę ƒόř áďđїτϊōπαľ đэŧдįļŝ. !!! !!! !!! !!! !!! !!!
|
||||
Ρĺęąŝэ ѕєě õμя ĞĭтΗύв řєĺэдšέŝ рάġě ƒοґ àďđϊтїõлаℓ ðêţǻїłş. !!! !!! !!! !!! !!! !!!
|
||||
</ReleaseNotes>
|
||||
<ScreenshotCaptions>
|
||||
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Optional, defaults to main. Name of the branch which will be used for calculating branch point. -->
|
||||
<PGOBranch>main</PGOBranch>
|
||||
<PGOBranch>release-1.25</PGOBranch>
|
||||
|
||||
<!-- Mandatory. Name of the NuGet package which will contain PGO databases for consumption by build system. -->
|
||||
<PGOPackageName>Microsoft.Internal.Windows.Terminal.PGODatabase</PGOPackageName>
|
||||
|
||||
@@ -46,6 +46,7 @@ jobs:
|
||||
BuildConfiguration: ${{ config }}
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
variables:
|
||||
BuildPlatform: Any CPU
|
||||
OutputBuildPlatform: AnyCPU
|
||||
Terminal.BinDir: $(Build.SourcesDirectory)/bin/$(OutputBuildPlatform)/$(BuildConfiguration)
|
||||
JobOutputDirectory: $(Build.ArtifactStagingDirectory)\nupkg
|
||||
|
||||
@@ -211,7 +211,7 @@ extends:
|
||||
ob_createvpack_verbose: true
|
||||
ob_createvpack_vpackdirectory: '$(JobOutputDirectory)\vpack'
|
||||
ob_createvpack_versionAs: string
|
||||
ob_createvpack_version: '$(XES_APPXMANIFESTVERSION)'
|
||||
ob_createvpack_version: '$(XES_PACKAGEVERSIONNUMBER)'
|
||||
ob_updateOSManifest_gitcheckinConfigPath: '$(Build.SourcesDirectory)\build\config\GitCheckin.json'
|
||||
# We're skipping the 'fetch' part of the OneBranch rules, but that doesn't mean
|
||||
# that it doesn't expect to have downloaded a manifest directly to some 'destination'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- This file is read by XES, which we use in our Release builds. -->
|
||||
<PropertyGroup Label="Version">
|
||||
<XesUseOneStoreVersioning>true</XesUseOneStoreVersioning>
|
||||
<XesBaseYearForStoreVersion>2025</XesBaseYearForStoreVersion>
|
||||
<XesBaseYearForStoreVersion>2026</XesBaseYearForStoreVersion>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>25</VersionMinor>
|
||||
<VersionInfoProductName>Windows Terminal</VersionInfoProductName>
|
||||
|
||||
@@ -2407,6 +2407,14 @@
|
||||
"console"
|
||||
]
|
||||
},
|
||||
"compatibility.ambiguousWidth": {
|
||||
"default": "narrow",
|
||||
"description": "Controls the cell width of East Asian Ambiguous characters.",
|
||||
"enum": [
|
||||
"narrow",
|
||||
"wide"
|
||||
]
|
||||
},
|
||||
"copyFormatting": {
|
||||
"default": true,
|
||||
"description": "When set to `true`, the color and font formatting of selected text is also copied to your clipboard. When set to `false`, only plain text is copied to your clipboard. An array of specific formats can also be used. Supported array values include `html` and `rtf`. Plain text is always copied.",
|
||||
|
||||
@@ -1143,6 +1143,13 @@ til::CoordType ROW::GetTrailingColumnAtCharOffset(const ptrdiff_t offset) const
|
||||
return _createCharToColumnMapper(offset).GetTrailingColumnAt(offset);
|
||||
}
|
||||
|
||||
uint16_t ROW::GetCharOffset(til::CoordType col) const noexcept
|
||||
{
|
||||
const auto columns = GetReadableColumnCount();
|
||||
const auto colBeg = clamp(col, 0, columns);
|
||||
return _uncheckedCharOffset(gsl::narrow_cast<size_t>(colBeg));
|
||||
}
|
||||
|
||||
DelimiterClass ROW::DelimiterClassAt(til::CoordType column, const std::wstring_view& wordDelimiters) const noexcept
|
||||
{
|
||||
const auto col = _clampedColumn(column);
|
||||
|
||||
@@ -172,6 +172,7 @@ public:
|
||||
std::wstring_view GetText(til::CoordType columnBegin, til::CoordType columnEnd) const noexcept;
|
||||
til::CoordType GetLeadingColumnAtCharOffset(ptrdiff_t offset) const noexcept;
|
||||
til::CoordType GetTrailingColumnAtCharOffset(ptrdiff_t offset) const noexcept;
|
||||
uint16_t GetCharOffset(til::CoordType col) const noexcept;
|
||||
DelimiterClass DelimiterClassAt(til::CoordType column, const std::wstring_view& wordDelimiters) const noexcept;
|
||||
|
||||
auto AttrBegin() const noexcept { return _attr.begin(); }
|
||||
|
||||
@@ -390,6 +390,9 @@ Microsoft::Console::ICU::unique_utext Microsoft::Console::ICU::UTextFromTextBuff
|
||||
utext_setup(&ut, 0, &status);
|
||||
FAIL_FAST_IF(status > U_ZERO_ERROR);
|
||||
|
||||
rowBeg = std::max<til::CoordType>(0, rowBeg);
|
||||
rowEnd = std::min(textBuffer.GetSize().BottomExclusive(), rowEnd);
|
||||
|
||||
ut.providerProperties = (1 << UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE) | (1 << UTEXT_PROVIDER_STABLE_CHUNKS);
|
||||
ut.pFuncs = &utextFuncs;
|
||||
ut.context = &textBuffer;
|
||||
|
||||
@@ -600,90 +600,6 @@ namespace
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
#pragma region TAEF hookup for the test case array above
|
||||
struct ArrayIndexTaefAdapterRow : public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom | Microsoft::WRL::InhibitFtmBase>, IDataRow>
|
||||
{
|
||||
HRESULT RuntimeClassInitialize(const size_t index)
|
||||
{
|
||||
_index = index;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP GetTestData(BSTR /*pszName*/, SAFEARRAY** ppData) override
|
||||
{
|
||||
const auto indexString{ wil::str_printf<std::wstring>(L"%zu", _index) };
|
||||
auto safeArray{ SafeArrayCreateVector(VT_BSTR, 0, 1) };
|
||||
LONG index{ 0 };
|
||||
auto indexBstr{ wil::make_bstr(indexString.c_str()) };
|
||||
(void)SafeArrayPutElement(safeArray, &index, indexBstr.release());
|
||||
*ppData = safeArray;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP GetMetadataNames(SAFEARRAY** ppMetadataNames) override
|
||||
{
|
||||
*ppMetadataNames = nullptr;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
STDMETHODIMP GetMetadata(BSTR /*pszName*/, SAFEARRAY** ppData) override
|
||||
{
|
||||
*ppData = nullptr;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
STDMETHODIMP GetName(BSTR* ppszRowName) override
|
||||
{
|
||||
*ppszRowName = nullptr;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
private:
|
||||
size_t _index;
|
||||
};
|
||||
|
||||
struct ArrayIndexTaefAdapterSource : public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom | Microsoft::WRL::InhibitFtmBase>, IDataSource>
|
||||
{
|
||||
STDMETHODIMP Advance(IDataRow** ppDataRow) override
|
||||
{
|
||||
if (_index < std::extent_v<decltype(testCases)>)
|
||||
{
|
||||
Microsoft::WRL::MakeAndInitialize<ArrayIndexTaefAdapterRow>(ppDataRow, _index++);
|
||||
}
|
||||
else
|
||||
{
|
||||
*ppDataRow = nullptr;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Reset() override
|
||||
{
|
||||
_index = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP GetTestDataNames(SAFEARRAY** names) override
|
||||
{
|
||||
auto safeArray{ SafeArrayCreateVector(VT_BSTR, 0, 1) };
|
||||
LONG index{ 0 };
|
||||
auto dataNameBstr{ wil::make_bstr(L"index") };
|
||||
(void)SafeArrayPutElement(safeArray, &index, dataNameBstr.release());
|
||||
*names = safeArray;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP GetTestDataType(BSTR /*name*/, BSTR* type) override
|
||||
{
|
||||
*type = nullptr;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
size_t _index{ 0 };
|
||||
};
|
||||
#pragma endregion
|
||||
}
|
||||
|
||||
extern "C" HRESULT __declspec(dllexport) __cdecl ReflowTestDataSource(IDataSource** ppDataSource, void*)
|
||||
|
||||
@@ -237,6 +237,7 @@
|
||||
<Capability Name="internetClient" />
|
||||
<rescap:Capability Name="runFullTrust" />
|
||||
<rescap:Capability Name="unvirtualizedResources" />
|
||||
<rescap:Capability Name="appLicensing" />
|
||||
</Capabilities>
|
||||
|
||||
<Extensions>
|
||||
|
||||
@@ -237,6 +237,7 @@
|
||||
<Capability Name="internetClient" />
|
||||
<rescap:Capability Name="runFullTrust" />
|
||||
<rescap:Capability Name="unvirtualizedResources" />
|
||||
<rescap:Capability Name="appLicensing" />
|
||||
</Capabilities>
|
||||
|
||||
<Extensions>
|
||||
|
||||
@@ -928,6 +928,17 @@ namespace winrt::TerminalApp::implementation
|
||||
void CommandPalette::_filterTextChanged(const IInspectable& /*sender*/,
|
||||
const Windows::UI::Xaml::RoutedEventArgs& /*args*/)
|
||||
{
|
||||
// GH#18737: Only respond to this change if we are visible:
|
||||
// _close calls _searchBox().Text(L"") to reset the search text, which lands us
|
||||
// in here after the command palette is dismissed. Since we have a code path here that
|
||||
// could potentially lead to an action being previewed (specifically if there is a
|
||||
// preview-able action as the first entry in the command list), that preview will
|
||||
// appear after the palette is dismissed without this check.
|
||||
if (Visibility() != Visibility::Visible)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// When we are executing the _SelectNextTab in the TabManagement.cpp, this method
|
||||
// is getting triggered because we set up the default value for that CommandPalette
|
||||
// with an empty string. Therefore, to avoid the reset of the index when executing
|
||||
|
||||
@@ -672,9 +672,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Dieser Linktyp wird derzeit nicht unterstützt:</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Abbrechen</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Dieser Link kann zu einem unsicheren Speicherort führen. Links können ihren Computer und Ihre Daten beschädigen. Klicken Sie zum Schutz Des Computers nur auf Links aus vertrauenswürdigen Quellen.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Trotzdem öffnen</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Einstellungen</value>
|
||||
</data>
|
||||
@@ -848,11 +854,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Der aktive Bereich wurde auf die Registerkarte „{0}“ verschoben</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>Registerkarte „{0}“ wurde in das Fenster „{1}“ verschoben</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Registerkarte „{0}“ in neues Fenster verschoben</value>
|
||||
@@ -864,7 +870,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Der aktive Bereich wurde in das Fenster "{0}" verschoben</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Aktiver Bereich in neues Fenster verschoben</value>
|
||||
|
||||
@@ -669,9 +669,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>This link type is currently not supported:</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>This link may lead to an unsafe location. Hyperlinks can be harmful to your computer and data. To protect your computer, only click links from trusted sources.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Open anyway</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
|
||||
@@ -669,9 +669,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Este tipo de vínculo no se admite actualmente:</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Cancelar</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Este vínculo puede dar lugar a una ubicación no segura. Los hipervínculos pueden ser perjudiciales para el equipo y los datos. Para proteger el equipo, haga clic solo en vínculos de orígenes de confianza.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Abrir de todas formas</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Configuración</value>
|
||||
</data>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Panel activo movido a la pestaña "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>La pestaña "{0}" se ha movido a la ventana "{1}"</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>La pestaña "{0}" se ha movido a la nueva ventana</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Panel activo movido a la ventana "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Panel activo movido a nueva ventana</value>
|
||||
|
||||
@@ -669,9 +669,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Ce type de lien n’est actuellement pas pris en charge :</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Annuler</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Ce lien peut entraîner un emplacement non sécurisé. Les liens hypertexte peuvent endommager votre ordinateur et vos données. Pour protéger votre ordinateur, cliquez uniquement sur des liens provenant de sources fiables.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Ouvrir quand même</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Paramètres</value>
|
||||
</data>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Volet actif déplacé vers l’onglet « {0} »</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>Onglet « {0} » déplacé vers la fenêtre « {1} »</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Onglet « {0} » déplacé vers une nouvelle fenêtre</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Volet actif déplacé vers l’onglet « {0} »</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Volet actif déplacé vers une nouvelle fenêtre</value>
|
||||
|
||||
@@ -669,9 +669,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Questo tipo di collegamento non è al momento supportato:</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Annulla</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Questo collegamento potrebbe causare un percorso non sicuro. I collegamenti ipertestuali possono essere dannosi per il computer e i dati. Per proteggere il computer, fare clic solo su collegamenti da origini attendibili.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Apri comunque</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Impostazioni</value>
|
||||
</data>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Riquadro attivo spostato nella scheda "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>Scheda "{0}" spostata nella finestra "{1}"</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Scheda "{0}" spostata in una nuova finestra</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Riquadro attivo spostato nella finestra "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Riquadro attivo spostato in una nuova finestra</value>
|
||||
|
||||
@@ -670,9 +670,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>このリンクの種類は現在サポートされていません:</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>キャンセル</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>このリンクは安全でない可能性があります。ハイパーリンクは、コンピューターやデータに問題を起こす可能性があります。コンピューターを保護するには、信頼できるソースからのリンクのみをクリックしてください。</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>開く</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>設定</value>
|
||||
</data>
|
||||
@@ -846,11 +852,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>アクティブなペインを [{0}] タブに移動しました</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>[{0}] タブを "{1}" ウィンドウに移動しました</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>[{0}] タブを新しいウィンドウに移動しました</value>
|
||||
@@ -862,7 +868,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>アクティブなペインを "{0}" ウィンドウに移動しました</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>アクティブなペインを新しいウィンドウに移動しました</value>
|
||||
|
||||
@@ -669,9 +669,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>이 링크 형식은 현재 지원되지 않습니다.</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>취소</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>이 링크로 인해 안전하지 않은 위치가 발생할 수 있습니다. 하이퍼링크는 컴퓨터와 데이터를 손상시킬 수 있습니다. 컴퓨터를 보호하려면 신뢰할 수 있는 원본의 링크만 클릭하세요.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>열기</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>설정</value>
|
||||
</data>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>활성 창이 "{0}" 탭으로 이동됨</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>"{0}" 탭이 "{1}" 창으로 이동됨</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>"{0}" 탭이 새 창으로 이동됨</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>활성 창이 "{0}" 창으로 이동됨</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>활성 창이 새 창으로 이동됨</value>
|
||||
|
||||
@@ -669,9 +669,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Não há suporte para este tipo de link no momento:</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Cancelar</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Este link pode levar a um local não seguro. Hiperlinks podem ser prejudiciais ao computador e aos dados. Para proteger o computador, clique somente em links de fontes confiáveis.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Abrir mesmo assim</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Configurações</value>
|
||||
</data>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Painel ativo movido para a guia "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>Guia "{0}" movida para janela "{1}"</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Guia "{0}" movida para nova janela</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Painel ativo movido para a janela "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Painel ativo movido para nova janela</value>
|
||||
|
||||
@@ -669,8 +669,14 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Ťђïś łϊηќ ŧурē ιş çũґѓзⁿτľÿ ñστ şΰρρоŕŧĕđ: !!! !!! !!! !!! </value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Сąñс℮ł !</value>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Çдπсёľ !</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Ŧђīś ℓîŋќ мαў ľêãδ τб áń úʼnšàƒé ℓоćάŧίоñ. Ĥўрзŗℓĭŋķѕ çâⁿ ъέ ђąřмƒúļ τό ўôця ċómφύŧèґ аňδ ðáťǻ. Ţб ρгøťėçŧ ўòύг ςömφùţĕŕ, ŏŋľỳ čℓΐςķ łίŋκѕ ƒřöм ťŗμѕŧєđ śόυяčêś. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Őρέй ǻпŷŵãγ !!!</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Śëţťĩпğś !!</value>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>∆çťíνĕ рåⁿэ мôνеð ťб "{0}" ţав !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>"{0}" ťāъ мōνęđ τŏ "{1}" шΐπδŏẅ !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>"{0}" тąь mǿνєđ ŧσ ήèώ ẅĩŋďøẃ !!! !!! !!!</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Λςťìνє рáиė mόνéð ťб "{0}" ŵîńđθω !!! !!! !!! </value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Αĉťįνέ ρªņз mσνёđ τǿ ήёẃ ẃîпďǿω !!! !!! !!!</value>
|
||||
|
||||
@@ -669,8 +669,14 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Ťђïś łϊηќ ŧурē ιş çũґѓзⁿτľÿ ñστ şΰρρоŕŧĕđ: !!! !!! !!! !!! </value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Сąñс℮ł !</value>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Çдπсёľ !</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Ŧђīś ℓîŋќ мαў ľêãδ τб áń úʼnšàƒé ℓоćάŧίоñ. Ĥўрзŗℓĭŋķѕ çâⁿ ъέ ђąřмƒúļ τό ўôця ċómφύŧèґ аňδ ðáťǻ. Ţб ρгøťėçŧ ўòύг ςömφùţĕŕ, ŏŋľỳ čℓΐςķ łίŋκѕ ƒřöм ťŗμѕŧєđ śόυяčêś. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Őρέй ǻпŷŵãγ !!!</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Śëţťĩпğś !!</value>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>∆çťíνĕ рåⁿэ мôνеð ťб "{0}" ţав !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>"{0}" ťāъ мōνęđ τŏ "{1}" шΐπδŏẅ !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>"{0}" тąь mǿνєđ ŧσ ήèώ ẅĩŋďøẃ !!! !!! !!!</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Λςťìνє рáиė mόνéð ťб "{0}" ŵîńđθω !!! !!! !!! </value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Αĉťįνέ ρªņз mσνёđ τǿ ήёẃ ẃîпďǿω !!! !!! !!!</value>
|
||||
|
||||
@@ -669,8 +669,14 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Ťђïś łϊηќ ŧурē ιş çũґѓзⁿτľÿ ñστ şΰρρоŕŧĕđ: !!! !!! !!! !!! </value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>Сąñс℮ł !</value>
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Çдπсёľ !</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Ŧђīś ℓîŋќ мαў ľêãδ τб áń úʼnšàƒé ℓоćάŧίоñ. Ĥўрзŗℓĭŋķѕ çâⁿ ъέ ђąřмƒúļ τό ўôця ċómφύŧèґ аňδ ðáťǻ. Ţб ρгøťėçŧ ўòύг ςömφùţĕŕ, ŏŋľỳ čℓΐςķ łίŋκѕ ƒřöм ťŗμѕŧєđ śόυяčêś. !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Őρέй ǻпŷŵãγ !!!</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Śëţťĩпğś !!</value>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>∆çťíνĕ рåⁿэ мôνеð ťб "{0}" ţав !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>"{0}" ťāъ мōνęđ τŏ "{1}" шΐπδŏẅ !!! !!! !!!</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>"{0}" тąь mǿνєđ ŧσ ήèώ ẅĩŋďøẃ !!! !!! !!!</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Λςťìνє рáиė mόνéð ťб "{0}" ŵîńđθω !!! !!! !!! </value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Αĉťįνέ ρªņз mσνёđ τǿ ήёẃ ẃîпďǿω !!! !!! !!!</value>
|
||||
|
||||
@@ -669,9 +669,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>Этот тип связи в настоящее время не поддерживается:</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>Отмена</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>Эта ссылка может привести к небезопасному расположению. Гиперссылки могут нанести вред компьютеру и данным. Чтобы защитить компьютер, щелкните ссылки только из надежных источников.</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>Все равно открыть</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>Параметры</value>
|
||||
</data>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>Активная область перемещена на вкладку "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>Вкладка "{0}" перемещена в окно "{1}"</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Вкладка "{0}" перемещена в новое окно</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>Активная область перемещена в окно "{0}"</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>Активная область перемещена в новое окно</value>
|
||||
|
||||
@@ -669,9 +669,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>当前不支持此链接类型:</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>取消</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>此链接可能会导致不安全的位置。超链接可能对你的计算机和数据有害。若要保护你的计算机,请仅单击来自受信任源的链接。</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>仍然打开</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>设置</value>
|
||||
</data>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>活动窗格已移动到“{0}”选项卡</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>“{0}”选项卡已移动到“{1}”窗口</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>“{0}”选项卡已移动到新窗口</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>活动窗格已移动到“{0}”选项卡</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>活动窗格已移动到新窗口</value>
|
||||
|
||||
@@ -669,9 +669,15 @@
|
||||
<data name="UnsupportedSchemeText" xml:space="preserve">
|
||||
<value>目前不支援此連結類型:</value>
|
||||
</data>
|
||||
<data name="CouldNotOpenUriDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<data name="UriErrorDialog.CloseButtonText" xml:space="preserve">
|
||||
<value>取消</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmText" xml:space="preserve">
|
||||
<value>此連結可能通往不安全地點。超連結可能對你的電腦和資料造成傷害。為了保護你的電腦,只點擊來自可信來源的連結。</value>
|
||||
</data>
|
||||
<data name="UnsafeUrlConfirmAllowAction" xml:space="preserve">
|
||||
<value>一律開啟</value>
|
||||
</data>
|
||||
<data name="SettingsTab" xml:space="preserve">
|
||||
<value>設定</value>
|
||||
</data>
|
||||
@@ -845,11 +851,11 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingTab" xml:space="preserve">
|
||||
<value>活動窗格已移動至「{0}」索引標籤</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the tab to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_Default" xml:space="preserve">
|
||||
<value>「{0}」索引標籤已移至「{1}」視窗</value>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window the tab was moved to.</comment>
|
||||
<comment>{Locked="{0}"}{Locked="{1}"}This text is read out by screen readers upon a successful tab movement. {0} is the name of the tab. {1} is the name of the window to which the tab was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_TabMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>「{0}」索引標籤已移至新視窗</value>
|
||||
@@ -861,7 +867,7 @@
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_ExistingWindow2" xml:space="preserve">
|
||||
<value>活動窗格已移動至「{0}」視窗</value>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window the pane was moved to.</comment>
|
||||
<comment>{Locked="{0}"}This text is read out by screen readers upon a successful pane movement. {0} is the name of the window to which the pane was moved.</comment>
|
||||
</data>
|
||||
<data name="TerminalPage_PaneMovedAnnouncement_NewWindow" xml:space="preserve">
|
||||
<value>活動窗格已移至新視窗</value>
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="FilteredCommand.h" />
|
||||
<ClInclude Include="Pane.h" />
|
||||
<ClInclude Include="fzf/fzf.h" />
|
||||
<ClInclude Include="../fzf/fzf.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="ShortcutActionDispatch.h">
|
||||
<DependentUpon>ShortcutActionDispatch.idl</DependentUpon>
|
||||
@@ -204,7 +204,7 @@
|
||||
<ClCompile Include="Tab.cpp">
|
||||
<DependentUpon>Tab.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fzf/fzf.cpp" />
|
||||
<ClCompile Include="../fzf/fzf.cpp" />
|
||||
<ClCompile Include="TaskbarState.cpp">
|
||||
<DependentUpon>TaskbarState.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
|
||||
@@ -1482,6 +1482,9 @@ namespace winrt::TerminalApp::implementation
|
||||
return {};
|
||||
}
|
||||
}();
|
||||
static const auto ambiguousIsWide = [&]() -> bool {
|
||||
return _settings.GlobalSettings().AmbiguousWidth() == AmbiguousWidth::Wide;
|
||||
}();
|
||||
|
||||
TerminalConnection::ITerminalConnection connection{ nullptr };
|
||||
|
||||
@@ -1547,6 +1550,10 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
valueSet.Insert(L"textMeasurement", Windows::Foundation::PropertyValue::CreateString(textMeasurement));
|
||||
}
|
||||
if (ambiguousIsWide)
|
||||
{
|
||||
valueSet.Insert(L"ambiguousIsWide", Windows::Foundation::PropertyValue::CreateBoolean(true));
|
||||
}
|
||||
|
||||
if (const auto id = settings.SessionId(); id != winrt::guid{})
|
||||
{
|
||||
@@ -2941,7 +2948,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - Does some of this in a background thread, as to not hang/crash the UI thread.
|
||||
// Arguments:
|
||||
// - eventArgs: the PasteFromClipboard event sent from the TermControl
|
||||
safe_void_coroutine TerminalPage::_PasteFromClipboardHandler(const IInspectable /*sender*/, const PasteFromClipboardEventArgs eventArgs)
|
||||
safe_void_coroutine TerminalPage::_PasteFromClipboardHandler(const IInspectable sender, const PasteFromClipboardEventArgs eventArgs)
|
||||
try
|
||||
{
|
||||
// The old Win32 clipboard API as used below is somewhere in the order of 300-1000x faster than
|
||||
@@ -2950,6 +2957,7 @@ namespace winrt::TerminalApp::implementation
|
||||
const auto dispatcher = Dispatcher();
|
||||
const auto globalSettings = _settings.GlobalSettings();
|
||||
const auto bracketedPaste = eventArgs.BracketedPasteEnabled();
|
||||
const auto sourceId = sender.try_as<ControlInteractivity>().Id();
|
||||
|
||||
// GetClipboardData might block for up to 30s for delay-rendered contents.
|
||||
co_await winrt::resume_background();
|
||||
@@ -2965,7 +2973,11 @@ namespace winrt::TerminalApp::implementation
|
||||
text = winrt::hstring{ Utils::TrimPaste(text) };
|
||||
}
|
||||
|
||||
if (text.empty())
|
||||
// LOAD BEARING: Send an empty bracketed paste even if the clipboard was empty.
|
||||
// Bracketed Paste provides an application a way to know whether the
|
||||
// user pasted, even if there was no applicable content on it. This
|
||||
// behavior is observed in GNOME Terminal, among others.
|
||||
if (!bracketedPaste && text.empty())
|
||||
{
|
||||
co_return;
|
||||
}
|
||||
@@ -3047,22 +3059,69 @@ namespace winrt::TerminalApp::implementation
|
||||
// This will end up calling ConptyConnection::WriteInput which calls WriteFile which may block for
|
||||
// an indefinite amount of time. Avoid freezes and deadlocks by running this on a background thread.
|
||||
assert(!dispatcher.HasThreadAccess());
|
||||
eventArgs.HandleClipboardData(std::move(text));
|
||||
eventArgs.HandleClipboardData(text);
|
||||
|
||||
// GH#18821: If broadcast input is active, paste the same text into all other
|
||||
// panes on the tab. We do this here (rather than re-reading the
|
||||
// clipboard per-pane) so that only one paste warning is shown.
|
||||
co_await wil::resume_foreground(dispatcher);
|
||||
if (const auto strongThis = weakThis.get())
|
||||
{
|
||||
if (const auto& tab{ strongThis->_GetFocusedTabImpl() })
|
||||
{
|
||||
if (tab->TabStatus().IsInputBroadcastActive())
|
||||
{
|
||||
tab->GetRootPane()->WalkTree([&](auto&& pane) {
|
||||
if (const auto control = pane->GetTerminalControl())
|
||||
{
|
||||
if (control.ContentId() != sourceId && !control.ReadOnly())
|
||||
{
|
||||
control.RawWriteString(text);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CATCH_LOG();
|
||||
|
||||
void TerminalPage::_OpenHyperlinkHandler(const IInspectable /*sender*/, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs)
|
||||
safe_void_coroutine TerminalPage::_OpenHyperlinkHandler(const IInspectable /*sender*/, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs)
|
||||
{
|
||||
try
|
||||
{
|
||||
auto parsed = winrt::Windows::Foundation::Uri(eventArgs.Uri());
|
||||
auto uriString{ eventArgs.Uri() };
|
||||
auto parsed = winrt::Windows::Foundation::Uri(uriString);
|
||||
if (_IsUriSupported(parsed))
|
||||
{
|
||||
ShellExecute(nullptr, L"open", eventArgs.Uri().c_str(), nullptr, nullptr, SW_SHOWNORMAL);
|
||||
bool shouldLaunch{ _IsUriConsideredSomewhatSafe(parsed) };
|
||||
|
||||
if (!shouldLaunch)
|
||||
{
|
||||
if (auto presenter{ _dialogPresenter.get() })
|
||||
{
|
||||
// FindName needs to be called first to actually load the xaml object
|
||||
auto unopenedUriDialog = FindName(L"UriErrorDialog").try_as<WUX::Controls::ContentDialog>();
|
||||
|
||||
// Insert the reason and the URI
|
||||
unopenedUriDialog.SecondaryButtonText(RS_(L"UnsafeUrlConfirmAllowAction"));
|
||||
CouldNotOpenUriReason().Text(RS_(L"UnsafeUrlConfirmText"));
|
||||
UnopenedUri().Text(uriString);
|
||||
|
||||
// Show the dialog
|
||||
auto result = co_await presenter.ShowDialog(unopenedUriDialog);
|
||||
shouldLaunch = result == ContentDialogResult::Secondary;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldLaunch)
|
||||
{
|
||||
ShellExecuteW(nullptr, L"open", uriString.c_str(), nullptr, nullptr, SW_SHOWNORMAL);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_ShowCouldNotOpenDialog(RS_(L"UnsupportedSchemeText"), eventArgs.Uri());
|
||||
_ShowCouldNotOpenDialog(RS_(L"UnsupportedSchemeText"), uriString);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
@@ -3082,9 +3141,10 @@ namespace winrt::TerminalApp::implementation
|
||||
if (auto presenter{ _dialogPresenter.get() })
|
||||
{
|
||||
// FindName needs to be called first to actually load the xaml object
|
||||
auto unopenedUriDialog = FindName(L"CouldNotOpenUriDialog").try_as<WUX::Controls::ContentDialog>();
|
||||
auto unopenedUriDialog = FindName(L"UriErrorDialog").try_as<WUX::Controls::ContentDialog>();
|
||||
|
||||
// Insert the reason and the URI
|
||||
unopenedUriDialog.SecondaryButtonText({});
|
||||
CouldNotOpenUriReason().Text(reason);
|
||||
UnopenedUri().Text(uri);
|
||||
|
||||
@@ -3137,6 +3197,30 @@ namespace winrt::TerminalApp::implementation
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TerminalPage::_IsUriConsideredSomewhatSafe(const winrt::Windows::Foundation::Uri& parsedUri)
|
||||
{
|
||||
if (parsedUri.SchemeName() == L"http" || parsedUri.SchemeName() == L"https")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (parsedUri.SchemeName() == L"file")
|
||||
{
|
||||
static const auto pathext{ wil::TryGetEnvironmentVariableW<std::wstring>(L"PATHEXT") };
|
||||
const auto filename = parsedUri.Path();
|
||||
for (const auto& e : til::split_iterator{ std::wstring_view{ pathext }, L';' })
|
||||
{
|
||||
if (til::ends_with_insensitive_ascii(filename, e))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Important! Don't take this eventArgs by reference, we need to extend the
|
||||
// lifetime of it to the other side of the co_await!
|
||||
safe_void_coroutine TerminalPage::_ControlNoticeRaisedHandler(const IInspectable /*sender*/,
|
||||
@@ -3357,24 +3441,6 @@ namespace winrt::TerminalApp::implementation
|
||||
// - Paste text from the Windows Clipboard to the focused terminal
|
||||
void TerminalPage::_PasteText()
|
||||
{
|
||||
// First, check if we're in broadcast input mode. If so, let's tell all
|
||||
// the controls to paste.
|
||||
if (const auto& tab{ _GetFocusedTabImpl() })
|
||||
{
|
||||
if (tab->TabStatus().IsInputBroadcastActive())
|
||||
{
|
||||
tab->GetRootPane()->WalkTree([](auto&& pane) {
|
||||
if (auto control = pane->GetTerminalControl())
|
||||
{
|
||||
control.PasteTextFromClipboard();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// The focused tab wasn't in broadcast mode. No matter. Just ask the
|
||||
// current one to paste.
|
||||
if (const auto& control{ _GetActiveControl() })
|
||||
{
|
||||
control.PasteTextFromClipboard();
|
||||
@@ -3729,7 +3795,13 @@ namespace winrt::TerminalApp::implementation
|
||||
// for nulls
|
||||
if (const auto& connection{ _duplicateConnectionForRestart(paneContent) })
|
||||
{
|
||||
paneContent.GetTermControl().Connection(connection);
|
||||
// Reset the terminal's VT state before attaching the new connection.
|
||||
// The previous client may have left dirty modes (e.g., bracketed
|
||||
// paste, mouse tracking, alternate buffer, kitty keyboard) that
|
||||
// would corrupt input/output for the new shell process.
|
||||
const auto& termControl = paneContent.GetTermControl();
|
||||
termControl.HardResetWithoutErase();
|
||||
termControl.Connection(connection);
|
||||
connection.Start();
|
||||
}
|
||||
}
|
||||
@@ -4915,7 +4987,7 @@ namespace winrt::TerminalApp::implementation
|
||||
theme.TabRow().UnfocusedBackground()) :
|
||||
ThemeColor{ nullptr } };
|
||||
|
||||
if (_settings.GlobalSettings().UseAcrylicInTabRow())
|
||||
if (_settings.GlobalSettings().UseAcrylicInTabRow() && (_activated || _settings.GlobalSettings().EnableUnfocusedAcrylic()))
|
||||
{
|
||||
if (tabRowBg)
|
||||
{
|
||||
|
||||
@@ -422,8 +422,9 @@ namespace winrt::TerminalApp::implementation
|
||||
safe_void_coroutine _PasteFromClipboardHandler(const IInspectable sender,
|
||||
const Microsoft::Terminal::Control::PasteFromClipboardEventArgs eventArgs);
|
||||
|
||||
void _OpenHyperlinkHandler(const IInspectable sender, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs);
|
||||
bool _IsUriSupported(const winrt::Windows::Foundation::Uri& parsedUri);
|
||||
safe_void_coroutine _OpenHyperlinkHandler(const IInspectable sender, const Microsoft::Terminal::Control::OpenHyperlinkEventArgs eventArgs);
|
||||
static bool _IsUriSupported(const winrt::Windows::Foundation::Uri& parsedUri);
|
||||
static bool _IsUriConsideredSomewhatSafe(const winrt::Windows::Foundation::Uri& parsedUri);
|
||||
|
||||
void _ShowCouldNotOpenDialog(winrt::hstring reason, winrt::hstring uri);
|
||||
bool _CopyText(bool dismissSelection, bool singleLine, bool withControlSequences, Microsoft::Terminal::Control::CopyFormat formats);
|
||||
|
||||
@@ -144,17 +144,17 @@
|
||||
</TextBlock>
|
||||
</ContentDialog>
|
||||
|
||||
<ContentDialog x:Name="CouldNotOpenUriDialog"
|
||||
x:Uid="CouldNotOpenUriDialog"
|
||||
<ContentDialog x:Name="UriErrorDialog"
|
||||
x:Uid="UriErrorDialog"
|
||||
Grid.Row="2"
|
||||
x:Load="False"
|
||||
DefaultButton="Primary">
|
||||
DefaultButton="Close">
|
||||
<TextBlock IsTextSelectionEnabled="True"
|
||||
TextWrapping="WrapWholeWords">
|
||||
<TextBlock.ContextFlyout>
|
||||
<mtu:TextMenuFlyout />
|
||||
</TextBlock.ContextFlyout>
|
||||
<Run x:Name="CouldNotOpenUriReason" /> <LineBreak />
|
||||
<Run x:Name="CouldNotOpenUriReason" /> <LineBreak /> <LineBreak />
|
||||
<Run x:Name="UnopenedUri"
|
||||
FontFamily="Cascadia Mono" />
|
||||
</TextBlock>
|
||||
|
||||
@@ -289,6 +289,11 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
|
||||
}
|
||||
}
|
||||
|
||||
if (unbox_prop_or<bool>(settings, L"ambiguousIsWide", false))
|
||||
{
|
||||
_flags |= PSEUDOCONSOLE_AMBIGUOUS_IS_WIDE;
|
||||
}
|
||||
|
||||
const auto& initialEnvironment{ unbox_prop_or<winrt::hstring>(settings, L"initialEnvironment", L"") };
|
||||
const bool reloadEnvironmentVariables = unbox_prop_or<bool>(settings, L"reloadEnvironmentVariables", false);
|
||||
|
||||
|
||||
@@ -85,6 +85,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
break;
|
||||
}
|
||||
CodepointWidthDetector::Singleton().Reset(mode);
|
||||
|
||||
if (settings.AmbiguousWidth() == AmbiguousWidth::Wide)
|
||||
{
|
||||
CodepointWidthDetector::Singleton().SetAmbiguousWidth(2);
|
||||
}
|
||||
|
||||
return true;
|
||||
}();
|
||||
|
||||
@@ -349,6 +355,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
}
|
||||
|
||||
void ControlCore::HardResetWithoutErase()
|
||||
{
|
||||
const auto lock = _terminal->LockForWriting();
|
||||
_terminal->HardResetWithoutErase();
|
||||
}
|
||||
|
||||
bool ControlCore::Initialize(const float actualWidth,
|
||||
const float actualHeight,
|
||||
const float compositionScale)
|
||||
@@ -2069,7 +2081,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// the selection (we need to reset selection on double-click or
|
||||
// triple-click, so it captures the word or the line, rather than
|
||||
// extending the selection)
|
||||
if (_terminal->IsSelectionActive() && (!shiftEnabled || isOnOriginalPosition))
|
||||
// - GH#9608: VT mouse mode is enabled. In this mode, Shift is used
|
||||
// to override mouse input, so Shift+Click should start a fresh
|
||||
// selection rather than extending the previous one.
|
||||
if (_terminal->IsSelectionActive() && (!shiftEnabled || isOnOriginalPosition || _terminal->IsTrackingMouseInput()))
|
||||
{
|
||||
// Reset the selection
|
||||
_terminal->ClearSelection();
|
||||
|
||||
@@ -257,6 +257,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
TerminalConnection::ITerminalConnection Connection();
|
||||
void Connection(const TerminalConnection::ITerminalConnection& connection);
|
||||
void HardResetWithoutErase();
|
||||
|
||||
void AnchorContextMenu(til::point viewportRelativeCharacterPosition);
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace Microsoft.Terminal.Control
|
||||
void ApplyAppearance(Boolean focused);
|
||||
|
||||
Microsoft.Terminal.TerminalConnection.ITerminalConnection Connection;
|
||||
void HardResetWithoutErase();
|
||||
|
||||
IControlSettings Settings { get; };
|
||||
IControlAppearance FocusedAppearance { get; };
|
||||
|
||||
@@ -54,6 +54,20 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
self->Attached.raise(*self, nullptr);
|
||||
}
|
||||
});
|
||||
|
||||
// GH#14464: Mark mode and quick-edit (shift+arrow) selections update
|
||||
// the selection through ControlCore, bypassing SetEndSelectionPoint.
|
||||
// Listen for selection changes so _selectionNeedsToBeCopied is set
|
||||
// for ALL selection types, not just mouse drag.
|
||||
_core->UpdateSelectionMarkers([weakThis = get_weak()](auto&&, auto&&) {
|
||||
if (auto self{ weakThis.get() })
|
||||
{
|
||||
if (self->_core->HasSelection())
|
||||
{
|
||||
self->_selectionNeedsToBeCopied = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
uint64_t ControlInteractivity::Id()
|
||||
@@ -285,8 +299,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
const auto isOnOriginalPosition = _lastMouseClickPosNoSelection == pixelPosition;
|
||||
|
||||
// Rounded coordinates for text selection
|
||||
_core->LeftClickOnTerminal(_getTerminalPosition(til::point{ pixelPosition }, true),
|
||||
// Rounded coordinates for text selection.
|
||||
// Don't round in VT mouse mode; cell-level precision matters more.
|
||||
// Only round for single-click: for double/triple-click, rounding
|
||||
// can push the position to the next cell, selecting the wrong word.
|
||||
const auto round = multiClickMapper == 1 && !_core->IsVtMouseModeEnabled();
|
||||
_core->LeftClickOnTerminal(_getTerminalPosition(til::point{ pixelPosition }, round),
|
||||
multiClickMapper,
|
||||
altEnabled,
|
||||
shiftEnabled,
|
||||
@@ -296,8 +314,15 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
if (_core->HasSelection())
|
||||
{
|
||||
// GH#9787: if selection is active we don't want to track the touchdown position
|
||||
// so that dragging the mouse will extend the selection rather than starting the new one
|
||||
_singleClickTouchdownPos = std::nullopt;
|
||||
// so that dragging the mouse will extend the selection rather than starting the new one.
|
||||
// In VT mouse mode, keep tracking the touchdown point so that PointerMoved
|
||||
// can re-anchor the selection based on drag direction (the dx < 0 adjustment).
|
||||
// Without this, dragging left wouldn't include the initially clicked cell
|
||||
// because floored coordinates place the anchor on the cell's left edge.
|
||||
if (!_core->IsVtMouseModeEnabled())
|
||||
{
|
||||
_singleClickTouchdownPos = std::nullopt;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (WI_IsFlagSet(buttonState, MouseButtonState::IsRightButtonDown))
|
||||
@@ -314,13 +339,18 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
else
|
||||
{
|
||||
// Try to copy the text and clear the selection
|
||||
const auto successfulCopy = CopySelectionToClipboard(shiftEnabled, false, _core->Settings().CopyFormatting());
|
||||
// GH#19942, GH#14464: Don't re-copy a selection that was
|
||||
// already copied via copyOnSelect on mouse-up. But DO copy
|
||||
// if the selection was made via mark mode or modified with
|
||||
// quick-edit keys (shift+arrow), since those paths never
|
||||
// triggered an automatic copy.
|
||||
const auto copied = (_selectionNeedsToBeCopied || !_core->CopyOnSelect()) &&
|
||||
CopySelectionToClipboard(shiftEnabled, false, _core->Settings().CopyFormatting());
|
||||
_core->ClearSelection();
|
||||
if (_core->CopyOnSelect() || !successfulCopy)
|
||||
if (_core->CopyOnSelect() || !copied)
|
||||
{
|
||||
// CopyOnSelect: right click always pastes!
|
||||
// Otherwise: no selection --> paste
|
||||
// CopyOnSelect: right-click always pastes.
|
||||
// Otherwise: no selection → paste.
|
||||
RequestPasteTextFromClipboard();
|
||||
}
|
||||
}
|
||||
@@ -682,7 +712,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// - cursorPosition: in pixels, relative to the origin of the control
|
||||
void ControlInteractivity::SetEndSelectionPoint(const Core::Point pixelPosition)
|
||||
{
|
||||
_core->SetEndSelectionPoint(_getTerminalPosition(til::point{ pixelPosition }, true));
|
||||
// Don't round in VT mouse mode; cell-level precision matters more
|
||||
const auto round = !_core->IsVtMouseModeEnabled();
|
||||
_core->SetEndSelectionPoint(_getTerminalPosition(til::point{ pixelPosition }, round));
|
||||
_selectionNeedsToBeCopied = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,12 @@ namespace Microsoft.Terminal.Control
|
||||
Console,
|
||||
};
|
||||
|
||||
enum AmbiguousWidth
|
||||
{
|
||||
Narrow,
|
||||
Wide,
|
||||
};
|
||||
|
||||
enum DefaultInputScope
|
||||
{
|
||||
Default,
|
||||
|
||||
@@ -68,6 +68,7 @@ namespace Microsoft.Terminal.Control
|
||||
Boolean DisablePartialInvalidation { get; };
|
||||
Boolean SoftwareRendering { get; };
|
||||
Microsoft.Terminal.Control.TextMeasurement TextMeasurement { get; };
|
||||
Microsoft.Terminal.Control.AmbiguousWidth AmbiguousWidth { get; };
|
||||
Microsoft.Terminal.Control.DefaultInputScope DefaultInputScope { get; };
|
||||
Boolean ShowMarks { get; };
|
||||
Boolean UseBackgroundImageForWindow { get; };
|
||||
|
||||
@@ -49,7 +49,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
void InteractivityAutomationPeer::ParentProvider(AutomationPeer parentProvider)
|
||||
{
|
||||
_parentProvider = parentProvider;
|
||||
// LOAD-BEARING: use _parentProvider->ProviderFromPeer(_parentProvider) instead of this->ProviderFromPeer(*this).
|
||||
// Since we split the automation peer into TermControlAutomationPeer and InteractivityAutomationPeer,
|
||||
// using "this" returns null. This can cause issues with some UIA Client scenarios like any navigation in Narrator.
|
||||
_parentProvider = parentProvider ? parentProvider.as<IAutomationPeerProtected>().ProviderFromPeer(parentProvider) : nullptr;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -181,15 +184,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
XamlAutomation::ITextRangeProvider InteractivityAutomationPeer::_CreateXamlUiaTextRange(UIA::ITextRangeProvider* returnVal) const
|
||||
{
|
||||
// LOAD-BEARING: use _parentProvider->ProviderFromPeer(_parentProvider) instead of this->ProviderFromPeer(*this).
|
||||
// Since we split the automation peer into TermControlAutomationPeer and InteractivityAutomationPeer,
|
||||
// using "this" returns null. This can cause issues with some UIA Client scenarios like any navigation in Narrator.
|
||||
const auto parent{ _parentProvider.get() };
|
||||
if (!parent)
|
||||
if (!_parentProvider)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
const auto xutr = winrt::make_self<XamlUiaTextRange>(returnVal, parent.as<IAutomationPeerProtected>().ProviderFromPeer(parent));
|
||||
const auto xutr = winrt::make_self<XamlUiaTextRange>(returnVal, _parentProvider);
|
||||
return xutr.as<XamlAutomation::ITextRangeProvider>();
|
||||
};
|
||||
|
||||
@@ -201,22 +200,24 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// - com_array of Xaml Wrapped UiaTextRange (ITextRangeProviders)
|
||||
com_array<XamlAutomation::ITextRangeProvider> InteractivityAutomationPeer::WrapArrayOfTextRangeProviders(SAFEARRAY* textRanges)
|
||||
{
|
||||
if (!_parentProvider)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
// transfer ownership of UiaTextRanges to this new vector
|
||||
auto providers = SafeArrayToOwningVector<::Microsoft::Terminal::TermControlUiaTextRange>(textRanges);
|
||||
auto count = gsl::narrow<int>(providers.size());
|
||||
const auto len = gsl::narrow<uint32_t>(providers.size());
|
||||
com_array<XamlAutomation::ITextRangeProvider> result{ len };
|
||||
|
||||
std::vector<XamlAutomation::ITextRangeProvider> vec;
|
||||
vec.reserve(count);
|
||||
for (auto i = 0; i < count; i++)
|
||||
for (uint32_t i = 0; i < len; ++i)
|
||||
{
|
||||
if (auto xutr = _CreateXamlUiaTextRange(providers[i].detach()))
|
||||
{
|
||||
vec.emplace_back(std::move(xutr));
|
||||
result[i] = std::move(xutr);
|
||||
}
|
||||
}
|
||||
|
||||
com_array<XamlAutomation::ITextRangeProvider> result{ vec };
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
::Microsoft::WRL::ComPtr<::Microsoft::Terminal::TermControlUiaProvider> _uiaProvider;
|
||||
winrt::Microsoft::Terminal::Control::implementation::ControlInteractivity* _interactivity;
|
||||
weak_ref<Windows::UI::Xaml::Automation::Peers::AutomationPeer> _parentProvider;
|
||||
winrt::Windows::UI::Xaml::Automation::Provider::IRawElementProviderSimple _parentProvider{ nullptr };
|
||||
|
||||
til::rect _controlBounds{};
|
||||
til::rect _controlPadding{};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Microsoft.Terminal.Control
|
||||
{
|
||||
[default_interface] runtimeclass InteractivityAutomationPeer :
|
||||
Windows.UI.Xaml.Automation.Peers.AutomationPeer,
|
||||
Windows.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer,
|
||||
Windows.UI.Xaml.Automation.Provider.ITextProvider
|
||||
{
|
||||
|
||||
|
||||
@@ -532,6 +532,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
_core.Connection(newConnection);
|
||||
}
|
||||
|
||||
void TermControl::HardResetWithoutErase()
|
||||
{
|
||||
_core.HardResetWithoutErase();
|
||||
}
|
||||
|
||||
void TermControl::_throttledUpdateScrollbar(const ScrollBarUpdate& update)
|
||||
{
|
||||
if (!_initializedTerminal)
|
||||
@@ -1790,6 +1795,16 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
return true;
|
||||
}
|
||||
|
||||
// While TSF has an active composition, key events must not be forwarded
|
||||
// to the PTY directly. The IME re-injects navigation/confirmation keys
|
||||
// after composition ends, at which point HasActiveComposition() == false
|
||||
// and they are forwarded normally. This mirrors conhost v1 behavior in
|
||||
// src/interactivity/win32/windowio.cpp.
|
||||
if (GetTSFHandle().HasActiveComposition())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_TrySendKeyEvent(vkey, scanCode, modifiers, keyDown))
|
||||
{
|
||||
return true;
|
||||
@@ -1920,8 +1935,6 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// - args: event data
|
||||
void TermControl::_TappedHandler(const IInspectable& /*sender*/, const TappedRoutedEventArgs& e)
|
||||
{
|
||||
Focus(FocusState::Pointer);
|
||||
|
||||
if (e.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Touch)
|
||||
{
|
||||
// Normally TSF would be responsible for showing the touch keyboard, but it's buggy for us:
|
||||
@@ -1955,7 +1968,13 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
const auto point = args.GetCurrentPoint(*this);
|
||||
const auto type = ptr.PointerDeviceType();
|
||||
|
||||
if (!_focused)
|
||||
// GH#19908: _focused can be true even when the search box has
|
||||
// keyboard focus, because GotFocus bubbles from the search box
|
||||
// child and _GotFocusHandler sets _focused=true. If the user
|
||||
// click-drags in the terminal while the search box is focused,
|
||||
// we need to explicitly call Focus() to move keyboard focus back
|
||||
// to the terminal so that Ctrl+C copies the selection.
|
||||
if (!_focused || (_searchBox && _searchBox->ContainsFocus()))
|
||||
{
|
||||
Focus(FocusState::Pointer);
|
||||
}
|
||||
@@ -2501,9 +2520,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
_updateScrollBar->Run(update);
|
||||
|
||||
// if a selection marker is already visible,
|
||||
// update the position of those markers
|
||||
if (SelectionStartMarker().Visibility() == Visibility::Visible || SelectionEndMarker().Visibility() == Visibility::Visible)
|
||||
// If we have a selection with markers (exposed via selection mode),
|
||||
// update the position of the markers
|
||||
if (_core.HasSelection() && _core.SelectionMode() >= SelectionInteractionMode::Keyboard)
|
||||
{
|
||||
_updateSelectionMarkers(nullptr, winrt::make<UpdateSelectionMarkersEventArgs>(false));
|
||||
}
|
||||
@@ -3067,6 +3086,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
co_return;
|
||||
}
|
||||
|
||||
if (const auto hwnd = reinterpret_cast<HWND>(OwningHwnd()))
|
||||
{
|
||||
SetForegroundWindow(hwnd);
|
||||
}
|
||||
|
||||
const auto weak = get_weak();
|
||||
|
||||
if (e.DataView().Contains(StandardDataFormats::ApplicationLink()))
|
||||
|
||||
@@ -192,6 +192,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
|
||||
TerminalConnection::ITerminalConnection Connection();
|
||||
void Connection(const TerminalConnection::ITerminalConnection& connection);
|
||||
void HardResetWithoutErase();
|
||||
|
||||
Control::CursorDisplayState CursorVisibility() const noexcept;
|
||||
void CursorVisibility(Control::CursorDisplayState cursorVisibility);
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace Microsoft.Terminal.Control
|
||||
void SetOverrideColorScheme(Microsoft.Terminal.Core.ICoreScheme scheme);
|
||||
|
||||
Microsoft.Terminal.TerminalConnection.ITerminalConnection Connection;
|
||||
void HardResetWithoutErase();
|
||||
|
||||
UInt64 ContentId{ get; };
|
||||
|
||||
|
||||
@@ -121,6 +121,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// GH#13978: If the TermControl has already been removed from the UI tree, XAML might run into weird bugs.
|
||||
// This will prevent the `dispatcher.RunAsync` calls below from raising UIA events on the main thread.
|
||||
_termControl = {};
|
||||
|
||||
// Solve the circular reference between us and the content automation peer.
|
||||
_contentAutomationPeer.ParentProvider(nullptr);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
|
||||
@@ -121,6 +121,7 @@ namespace Microsoft.Terminal.Core
|
||||
String WordDelimiters { get; };
|
||||
|
||||
Boolean ForceVTInput { get; };
|
||||
Boolean AllowKittyKeyboardMode { get; };
|
||||
Boolean AllowVtChecksumReport { get; };
|
||||
Boolean AllowVtClipboardWrite { get; };
|
||||
Boolean TrimBlockSelection { get; };
|
||||
|
||||
@@ -55,6 +55,18 @@ void Terminal::Create(til::size viewportSize, til::CoordType scrollbackLines, Re
|
||||
_stateMachine = std::make_unique<StateMachine>(std::move(engine));
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Resets all VT state to defaults without clearing the buffer content.
|
||||
// Called when a connection is restarted so that any dirty modes left
|
||||
// behind by a crashed application don't affect the new connection.
|
||||
void Terminal::HardResetWithoutErase()
|
||||
{
|
||||
_assertLocked();
|
||||
_stateMachine->ResetState();
|
||||
auto& engine = reinterpret_cast<OutputStateMachineEngine&>(_stateMachine->Engine());
|
||||
engine.Dispatch().HardReset(false);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Initializes the Terminal from the given set of settings.
|
||||
// Arguments:
|
||||
@@ -98,6 +110,7 @@ void Terminal::UpdateSettings(ICoreSettings settings)
|
||||
}
|
||||
|
||||
_getTerminalInput().ForceDisableWin32InputMode(settings.ForceVTInput());
|
||||
_getTerminalInput().ForceDisableKittyKeyboardProtocol(!settings.AllowKittyKeyboardMode());
|
||||
|
||||
if (settings.TabColor() == nullptr)
|
||||
{
|
||||
@@ -512,52 +525,27 @@ std::wstring Terminal::GetHyperlinkAtViewportPosition(const til::point viewportP
|
||||
|
||||
std::wstring Terminal::GetHyperlinkAtBufferPosition(const til::point bufferPos)
|
||||
{
|
||||
const auto& buffer = _activeBuffer();
|
||||
|
||||
// Case 1: buffer position has a hyperlink stored in the buffer
|
||||
const auto attr = _activeBuffer().GetCellDataAt(bufferPos)->TextAttr();
|
||||
const auto attr = buffer.GetCellDataAt(bufferPos)->TextAttr();
|
||||
if (attr.IsHyperlink())
|
||||
{
|
||||
return _activeBuffer().GetHyperlinkUriFromId(attr.GetHyperlinkId());
|
||||
return buffer.GetHyperlinkUriFromId(attr.GetHyperlinkId());
|
||||
}
|
||||
|
||||
// Case 2: buffer position may point to an auto-detected hyperlink
|
||||
// Case 2 - Step 1: get the auto-detected hyperlink
|
||||
std::optional<interval_tree::Interval<til::point, size_t>> result;
|
||||
const auto visibleViewport = _GetVisibleViewport();
|
||||
if (visibleViewport.IsInBounds(bufferPos))
|
||||
// Check cached interval tree (covers visible viewport +/- viewport height)
|
||||
if (const auto results = _patternIntervalTree.findOverlapping({ bufferPos.x + 1, bufferPos.y }, bufferPos); !results.empty())
|
||||
{
|
||||
// Hyperlink is in the current view, so let's just get it
|
||||
auto viewportPos = bufferPos;
|
||||
visibleViewport.ConvertToOrigin(&viewportPos);
|
||||
result = GetHyperlinkIntervalFromViewportPosition(viewportPos);
|
||||
if (result.has_value())
|
||||
for (const auto& result : results)
|
||||
{
|
||||
result->start = _ConvertToBufferCell(result->start, false);
|
||||
result->stop = _ConvertToBufferCell(result->stop, true);
|
||||
if (result.value == _hyperlinkPatternId)
|
||||
{
|
||||
return buffer.GetPlainText(result.start, result.stop);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Hyperlink is outside of the current view.
|
||||
// We need to find if there's a pattern at that location.
|
||||
const auto patterns = _getPatterns(bufferPos.y, bufferPos.y);
|
||||
|
||||
// NOTE: patterns is stored with top y-position being 0,
|
||||
// so we need to cleverly set the y-pos to 0.
|
||||
const til::point viewportPos{ bufferPos.x, 0 };
|
||||
const auto results = patterns.findOverlapping(viewportPos, viewportPos);
|
||||
if (!results.empty())
|
||||
{
|
||||
result = results.front();
|
||||
result->start.y += bufferPos.y;
|
||||
result->stop.y += bufferPos.y;
|
||||
}
|
||||
}
|
||||
|
||||
// Case 2 - Step 2: get the auto-detected hyperlink
|
||||
if (result.has_value() && result->value == _hyperlinkPatternId)
|
||||
{
|
||||
return _activeBuffer().GetPlainText(result->start, result->stop);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -577,17 +565,25 @@ uint16_t Terminal::GetHyperlinkIdAtViewportPosition(const til::point viewportPos
|
||||
// Arguments:
|
||||
// - The position relative to the viewport
|
||||
// Return value:
|
||||
// - The interval representing the start and end coordinates
|
||||
// - The interval representing the start and end coordinates (viewport-relative)
|
||||
std::optional<PointTree::interval> Terminal::GetHyperlinkIntervalFromViewportPosition(const til::point viewportPos)
|
||||
{
|
||||
const auto results = _patternIntervalTree.findOverlapping({ viewportPos.x + 1, viewportPos.y }, viewportPos);
|
||||
// GH#18177: The tree stores buffer-absolute coordinates
|
||||
// Convert viewport-relative (y=0 at visible start) to buffer-absolute
|
||||
const auto visStart = _VisibleStartIndex();
|
||||
const til::point bufferPos{ viewportPos.x, viewportPos.y + visStart };
|
||||
const auto results = _patternIntervalTree.findOverlapping({ bufferPos.x + 1, bufferPos.y }, bufferPos);
|
||||
if (results.size() > 0)
|
||||
{
|
||||
for (const auto& result : results)
|
||||
{
|
||||
if (result.value == _hyperlinkPatternId)
|
||||
{
|
||||
return result;
|
||||
// Convert back to viewport-relative coordinates
|
||||
auto interval = result;
|
||||
interval.start.y -= visStart;
|
||||
interval.stop.y -= visStart;
|
||||
return interval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -806,11 +802,8 @@ TerminalInput::OutputType Terminal::FocusChanged(const bool focused)
|
||||
// - The interval tree containing regions that need to be invalidated
|
||||
void Terminal::_InvalidatePatternTree()
|
||||
{
|
||||
const auto vis = _VisibleStartIndex();
|
||||
_patternIntervalTree.visit_all([&](const PointTree::interval& interval) {
|
||||
const til::point startCoord{ interval.start.x, interval.start.y + vis };
|
||||
const til::point endCoord{ interval.stop.x, interval.stop.y + vis };
|
||||
_InvalidateFromCoords(startCoord, endCoord);
|
||||
_InvalidateFromCoords(interval.start, interval.stop);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1208,7 +1201,16 @@ void Terminal::SetPlayMidiNoteCallback(std::function<void(const int, const int,
|
||||
void Terminal::UpdatePatternsUnderLock()
|
||||
{
|
||||
_InvalidatePatternTree();
|
||||
_patternIntervalTree = _getPatterns(_VisibleStartIndex(), _VisibleEndIndex());
|
||||
const auto visStart = _VisibleStartIndex();
|
||||
const auto visEnd = _VisibleEndIndex();
|
||||
const auto viewportHeight = visEnd - visStart;
|
||||
|
||||
// GH#18177: Scan extra rows beyond the viewport so that URLs
|
||||
// wrapping across the viewport boundary are matched in full
|
||||
const auto bufferSize = _activeBuffer().GetSize();
|
||||
const auto beg = std::max<til::CoordType>(0, visStart - viewportHeight);
|
||||
const auto end = std::min(bufferSize.BottomInclusive(), visEnd + viewportHeight);
|
||||
_patternIntervalTree = _getPatterns(beg, end);
|
||||
_InvalidatePatternTree();
|
||||
}
|
||||
|
||||
@@ -1423,10 +1425,8 @@ PointTree Terminal::_getPatterns(til::CoordType beg, til::CoordType end) const
|
||||
{
|
||||
do
|
||||
{
|
||||
auto range = ICU::BufferRangeFromMatch(&text, re.get());
|
||||
// PointTree uses half-open ranges and viewport-relative coordinates.
|
||||
range.start.y -= beg;
|
||||
range.end.y -= beg;
|
||||
// PointTree uses half-open ranges and buffer-absolute coordinates.
|
||||
const auto range = ICU::BufferRangeFromMatch(&text, re.get());
|
||||
intervals.push_back(PointTree::interval(range.start, range.end, 0));
|
||||
} while (uregex_findNext(re.get(), &status));
|
||||
}
|
||||
@@ -1534,6 +1534,10 @@ void Terminal::SerializeMainBuffer(HANDLE handle) const
|
||||
_mainBuffer->SerializeTo(handle);
|
||||
}
|
||||
|
||||
void Terminal::UnknownSequence() noexcept
|
||||
{
|
||||
}
|
||||
|
||||
void Terminal::ColorSelection(const TextAttribute& attr, winrt::Microsoft::Terminal::Core::MatchMode matchMode)
|
||||
{
|
||||
const auto colorSelection = [this](const til::point coordStartInclusive, const til::point coordEndExclusive, const TextAttribute& attr) {
|
||||
|
||||
@@ -85,6 +85,7 @@ public:
|
||||
void Create(til::size viewportSize,
|
||||
til::CoordType scrollbackLines,
|
||||
Microsoft::Console::Render::Renderer& renderer);
|
||||
void HardResetWithoutErase();
|
||||
|
||||
void CreateFromSettings(winrt::Microsoft::Terminal::Core::ICoreSettings settings,
|
||||
Microsoft::Console::Render::Renderer& renderer);
|
||||
@@ -131,7 +132,9 @@ public:
|
||||
|
||||
#pragma region ITerminalApi
|
||||
// These methods are defined in TerminalApi.cpp
|
||||
void UnknownSequence() noexcept override;
|
||||
void ReturnResponse(const std::wstring_view response) override;
|
||||
bool IsConPTY() const noexcept override;
|
||||
Microsoft::Console::VirtualTerminal::StateMachine& GetStateMachine() noexcept override;
|
||||
BufferState GetBufferAndViewport() noexcept override;
|
||||
void SetViewportPosition(const til::point position) noexcept override;
|
||||
@@ -204,7 +207,7 @@ public:
|
||||
bool IsGridLineDrawingAllowed() noexcept override;
|
||||
std::wstring GetHyperlinkUri(uint16_t id) const override;
|
||||
std::wstring GetHyperlinkCustomId(uint16_t id) const override;
|
||||
std::vector<size_t> GetPatternId(const til::point location) const override;
|
||||
std::vector<size_t> GetPatternId(const til::point viewportPos) const override;
|
||||
|
||||
std::pair<COLORREF, COLORREF> GetAttributeColors(const TextAttribute& attr) const noexcept override;
|
||||
std::span<const til::point_span> GetSelectionSpans() const noexcept override;
|
||||
@@ -397,7 +400,6 @@ private:
|
||||
std::wstring _wordDelimiters;
|
||||
SelectionExpansion _multiClickSelectionMode = SelectionExpansion::Char;
|
||||
SelectionInteractionMode _selectionMode = SelectionInteractionMode::None;
|
||||
bool _selectionIsTargetingUrl = false;
|
||||
SelectionEndpoint _selectionEndpoint = SelectionEndpoint::None;
|
||||
bool _anchorInactiveSelectionEndpoint = false;
|
||||
#pragma endregion
|
||||
|
||||
@@ -28,6 +28,11 @@ void Terminal::ReturnResponse(const std::wstring_view response)
|
||||
}
|
||||
}
|
||||
|
||||
bool Terminal::IsConPTY() const noexcept
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Microsoft::Console::VirtualTerminal::StateMachine& Terminal::GetStateMachine() noexcept
|
||||
{
|
||||
return *_stateMachine;
|
||||
@@ -140,7 +145,7 @@ unsigned int Terminal::GetInputCodePage() const noexcept
|
||||
|
||||
void Terminal::CopyToClipboard(wil::zwstring_view content)
|
||||
{
|
||||
if (_clipboardOperationsAllowed)
|
||||
if (_clipboardOperationsAllowed && _focused)
|
||||
{
|
||||
_pfnCopyToClipboard(content);
|
||||
}
|
||||
|
||||
@@ -254,7 +254,6 @@ void Terminal::_SetSelectionEnd(SelectionInfo* selection, const til::point viewp
|
||||
std::tie(selection->start, selection->end) = expandedAnchors;
|
||||
}
|
||||
_selectionMode = SelectionInteractionMode::Mouse;
|
||||
_selectionIsTargetingUrl = false;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -399,7 +398,6 @@ void Terminal::ToggleMarkMode()
|
||||
}
|
||||
_ScrollToPoint(_selection->start);
|
||||
_selectionMode = SelectionInteractionMode::Mark;
|
||||
_selectionIsTargetingUrl = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +458,6 @@ void Terminal::SelectHyperlink(const SearchDirection dir)
|
||||
if (_selectionMode != SelectionInteractionMode::Mark)
|
||||
{
|
||||
// This feature only works in mark mode
|
||||
_selectionIsTargetingUrl = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -469,19 +466,10 @@ void Terminal::SelectHyperlink(const SearchDirection dir)
|
||||
const auto bufferSize = buffer.GetSize();
|
||||
const auto viewportHeight = _GetMutableViewport().Height();
|
||||
|
||||
// The patterns are stored relative to the "search area". Initially, this search area will be the viewport,
|
||||
// but as we progressively search through more of the buffer, this will change.
|
||||
// Keep track of the search area here, and use the lambda below to convert points to the search area coordinate space.
|
||||
auto searchArea = _GetVisibleViewport();
|
||||
auto convertToSearchArea = [&searchArea](const til::point pt) noexcept {
|
||||
auto copy = pt;
|
||||
searchArea.ConvertToOrigin(©);
|
||||
return copy;
|
||||
};
|
||||
|
||||
// extracts the next/previous hyperlink from the list of hyperlink ranges provided
|
||||
auto extractResultFromList = [&](std::vector<interval_tree::Interval<til::point, size_t>>& list) noexcept {
|
||||
const auto selectionStartInSearchArea = convertToSearchArea(_selection->start);
|
||||
const auto selectionStart = _selection->start;
|
||||
const auto selectionEnd = _selection->end;
|
||||
|
||||
std::optional<std::pair<til::point, til::point>> resultFromList;
|
||||
if (!list.empty())
|
||||
@@ -491,12 +479,11 @@ void Terminal::SelectHyperlink(const SearchDirection dir)
|
||||
// pattern tree includes the currently selected range when going forward,
|
||||
// so we need to check if we're pointing to that one before returning it.
|
||||
auto range = list.front();
|
||||
if (_selectionIsTargetingUrl && range.start == selectionStartInSearchArea)
|
||||
if (range.start == selectionStart && range.stop == selectionEnd)
|
||||
{
|
||||
if (list.size() > 1)
|
||||
{
|
||||
// if we're pointing to the currently selected URL,
|
||||
// pick the next one.
|
||||
// Selection matches the current URL, pick the next one
|
||||
range = til::at(list, 1);
|
||||
resultFromList = { range.start, range.stop };
|
||||
}
|
||||
@@ -521,14 +508,6 @@ void Terminal::SelectHyperlink(const SearchDirection dir)
|
||||
resultFromList = { range.start, range.stop };
|
||||
}
|
||||
}
|
||||
|
||||
// pattern tree stores everything as viewport coords,
|
||||
// so we need to convert them on the way out
|
||||
if (resultFromList)
|
||||
{
|
||||
searchArea.ConvertFromOrigin(&resultFromList->first);
|
||||
searchArea.ConvertFromOrigin(&resultFromList->second);
|
||||
}
|
||||
return resultFromList;
|
||||
};
|
||||
|
||||
@@ -546,8 +525,8 @@ void Terminal::SelectHyperlink(const SearchDirection dir)
|
||||
searchEnd = _selection->start;
|
||||
}
|
||||
|
||||
// 1.A) Try searching the current viewport (no scrolling required)
|
||||
auto resultList = _patternIntervalTree.findContained(convertToSearchArea(searchStart), convertToSearchArea(searchEnd));
|
||||
// 1.A) Try searching the cached pattern tree (no scanning required)
|
||||
auto resultList = _patternIntervalTree.findContained(searchStart, searchEnd);
|
||||
std::optional<std::pair<til::point, til::point>> result = extractResultFromList(resultList);
|
||||
if (!result)
|
||||
{
|
||||
@@ -562,14 +541,12 @@ void Terminal::SelectHyperlink(const SearchDirection dir)
|
||||
searchEnd = { bufferSize.RightInclusive(), searchStart.y - 1 };
|
||||
searchStart = { bufferSize.Left(), std::max(searchStart.y - viewportHeight, bufferSize.Top()) };
|
||||
}
|
||||
searchArea = Viewport::FromDimensions(searchStart, { searchEnd.x + 1, searchEnd.y + 1 });
|
||||
|
||||
const til::point bufferStart{ bufferSize.Origin() };
|
||||
const til::point bufferEnd{ bufferSize.RightInclusive(), ViewEndIndex() };
|
||||
while (!result && bufferSize.IsInBounds(searchStart) && bufferSize.IsInBounds(searchEnd) && searchStart <= searchEnd && bufferStart <= searchStart && searchEnd <= bufferEnd)
|
||||
{
|
||||
auto patterns = _getPatterns(searchStart.y, searchEnd.y);
|
||||
resultList = patterns.findContained(convertToSearchArea(searchStart), convertToSearchArea(searchEnd));
|
||||
resultList = patterns.findContained(searchStart, searchEnd);
|
||||
result = extractResultFromList(resultList);
|
||||
if (!result)
|
||||
{
|
||||
@@ -583,7 +560,6 @@ void Terminal::SelectHyperlink(const SearchDirection dir)
|
||||
searchEnd.y -= 1;
|
||||
searchStart.y = std::max(searchEnd.y - viewportHeight, bufferSize.Top());
|
||||
}
|
||||
searchArea = Viewport::FromDimensions(searchStart, { searchEnd.x + 1, searchEnd.y + 1 });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -656,11 +632,10 @@ void Terminal::SelectHyperlink(const SearchDirection dir)
|
||||
selection->start = result->first;
|
||||
selection->pivot = result->first;
|
||||
selection->end = result->second;
|
||||
_selectionIsTargetingUrl = true;
|
||||
_selectionEndpoint = SelectionEndpoint::End;
|
||||
|
||||
// 4. Scroll to the selected area (if necessary)
|
||||
_ScrollToPoint(selection->end);
|
||||
_ScrollToPoint(dir == SearchDirection::Forward ? selection->end : selection->start);
|
||||
}
|
||||
|
||||
Terminal::UpdateSelectionParams Terminal::ConvertKeyEventToUpdateSelectionParams(const ControlKeyStates mods, const WORD vkey) const noexcept
|
||||
@@ -768,7 +743,6 @@ void Terminal::UpdateSelection(SelectionDirection direction, SelectionExpansion
|
||||
}
|
||||
|
||||
// 3. Actually modify the selection state
|
||||
_selectionIsTargetingUrl = false;
|
||||
_selectionMode = std::max(_selectionMode, SelectionInteractionMode::Keyboard);
|
||||
|
||||
auto selection{ _selection.write() };
|
||||
@@ -811,7 +785,6 @@ void Terminal::SelectAll()
|
||||
};
|
||||
|
||||
_selectionMode = SelectionInteractionMode::Keyboard;
|
||||
_selectionIsTargetingUrl = false;
|
||||
_ScrollToPoint(_selection->start);
|
||||
}
|
||||
|
||||
@@ -943,7 +916,6 @@ void Terminal::ClearSelection()
|
||||
_assertLocked();
|
||||
_selection.write()->active = false;
|
||||
_selectionMode = SelectionInteractionMode::None;
|
||||
_selectionIsTargetingUrl = false;
|
||||
_selectionEndpoint = static_cast<SelectionEndpoint>(0);
|
||||
_anchorInactiveSelectionEndpoint = false;
|
||||
}
|
||||
@@ -1045,5 +1017,9 @@ void Terminal::_ScrollToPoint(const til::point pos)
|
||||
}
|
||||
_NotifyScrollEvent();
|
||||
_activeBuffer().TriggerScroll();
|
||||
|
||||
// Rebuild the pattern tree for the new viewport position
|
||||
// so that callers always find a fresh cache after scrolling
|
||||
_updateUrlDetection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,15 +74,16 @@ std::wstring Microsoft::Terminal::Core::Terminal::GetHyperlinkCustomId(uint16_t
|
||||
// Method Description:
|
||||
// - Gets the regex pattern ids of a location
|
||||
// Arguments:
|
||||
// - The location
|
||||
// - The viewport-relative location
|
||||
// Return value:
|
||||
// - The pattern IDs of the location
|
||||
std::vector<size_t> Terminal::GetPatternId(const til::point location) const
|
||||
std::vector<size_t> Terminal::GetPatternId(const til::point viewportPos) const
|
||||
{
|
||||
_assertLocked();
|
||||
|
||||
// Look through our interval tree for this location
|
||||
const auto intervals = _patternIntervalTree.findOverlapping({ location.x + 1, location.y }, location);
|
||||
// Convert viewport-relative (y=0 at visible start) to buffer-absolute
|
||||
const til::point bufferPos{ viewportPos.x, viewportPos.y + _VisibleStartIndex() };
|
||||
const auto intervals = _patternIntervalTree.findOverlapping({ bufferPos.x + 1, bufferPos.y }, bufferPos);
|
||||
if (intervals.size() == 0)
|
||||
{
|
||||
return {};
|
||||
|
||||
@@ -349,6 +349,7 @@ namespace winrt::Microsoft::Terminal::Settings
|
||||
_ReloadEnvironmentVariables = profile.ReloadEnvironmentVariables();
|
||||
_RainbowSuggestions = profile.RainbowSuggestions();
|
||||
_ForceVTInput = profile.ForceVTInput();
|
||||
_AllowKittyKeyboardMode = profile.AllowKittyKeyboardMode();
|
||||
_AllowVtChecksumReport = profile.AllowVtChecksumReport();
|
||||
_AllowVtClipboardWrite = profile.AllowVtClipboardWrite();
|
||||
_PathTranslationStyle = profile.PathTranslationStyle();
|
||||
@@ -375,6 +376,7 @@ namespace winrt::Microsoft::Terminal::Settings
|
||||
_DisablePartialInvalidation = globalSettings.DisablePartialInvalidation();
|
||||
_SoftwareRendering = globalSettings.SoftwareRendering();
|
||||
_TextMeasurement = globalSettings.TextMeasurement();
|
||||
_AmbiguousWidth = globalSettings.AmbiguousWidth();
|
||||
_DefaultInputScope = globalSettings.DefaultInputScope();
|
||||
_UseBackgroundImageForWindow = globalSettings.UseBackgroundImageForWindow();
|
||||
_TrimBlockSelection = globalSettings.TrimBlockSelection();
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "pch.h"
|
||||
#include "Actions.h"
|
||||
#include "Actions.g.cpp"
|
||||
#include "LibraryResources.h"
|
||||
#include "../TerminalSettingsModel/AllShortcutActions.h"
|
||||
|
||||
using namespace winrt::Windows::UI::Xaml;
|
||||
@@ -22,7 +23,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_ViewModel = args.ViewModel().as<Editor::ActionsViewModel>();
|
||||
_ViewModel.CurrentPage(ActionsSubPage::Base);
|
||||
_ViewModel.ReSortCommandList();
|
||||
auto vmImpl = get_self<ActionsViewModel>(_ViewModel);
|
||||
vmImpl->MarkAsVisited();
|
||||
_layoutUpdatedRevoker = LayoutUpdated(winrt::auto_revoke, [this](auto /*s*/, auto /*e*/) {
|
||||
@@ -31,6 +32,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
AddNewButton().Focus(FocusState::Programmatic);
|
||||
});
|
||||
BringIntoViewWhenLoaded(args.ElementToFocus());
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hTerminalSettingsEditorProvider,
|
||||
|
||||
@@ -164,17 +164,33 @@
|
||||
Style="{StaticResource KeyBindingNameTextBlockStyle}"
|
||||
Text="{x:Bind DisplayName, Mode=OneWay}" />
|
||||
<!-- Key Chord Text -->
|
||||
<Border Grid.Column="1"
|
||||
Padding="8,4,8,4"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Style="{ThemeResource KeyChordBorderStyle}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(FirstKeyChordText)}">
|
||||
<TextBlock FontSize="14"
|
||||
Style="{ThemeResource KeyChordTextBlockStyle}"
|
||||
Text="{x:Bind FirstKeyChordText, Mode=OneWay}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
</Border>
|
||||
<Grid Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
ColumnSpacing="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Column="0"
|
||||
Padding="8,4,8,4"
|
||||
Style="{ThemeResource KeyChordBorderStyle}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(FirstKeyChordText)}">
|
||||
<TextBlock FontSize="14"
|
||||
Style="{ThemeResource KeyChordTextBlockStyle}"
|
||||
Text="{x:Bind FirstKeyChordText, Mode=OneWay}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
</Border>
|
||||
<Border Grid.Column="1"
|
||||
Padding="8,4,8,4"
|
||||
Style="{ThemeResource KeyChordBorderStyle}"
|
||||
ToolTipService.ToolTip="{x:Bind AdditionalKeyChordTooltipText, Mode=OneWay}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(AdditionalKeyChordCountText)}">
|
||||
<TextBlock FontSize="14"
|
||||
Style="{ThemeResource KeyChordTextBlockStyle}"
|
||||
Text="{x:Bind AdditionalKeyChordCountText, Mode=OneWay}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ListViewItem>
|
||||
</DataTemplate>
|
||||
@@ -182,8 +198,7 @@
|
||||
</Page.Resources>
|
||||
|
||||
<Border MaxWidth="{StaticResource StandardControlMaxWidth}">
|
||||
<StackPanel MaxWidth="600"
|
||||
HorizontalAlignment="Left"
|
||||
<StackPanel HorizontalAlignment="Stretch"
|
||||
Spacing="8"
|
||||
Style="{StaticResource SettingsStackStyle}">
|
||||
<HyperlinkButton x:Uid="Actions_Disclaimer"
|
||||
|
||||
@@ -126,18 +126,23 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
void CommandViewModel::Name(const winrt::hstring& newName)
|
||||
{
|
||||
_command.Name(newName);
|
||||
if (newName.empty())
|
||||
if (_command.Name() != newName)
|
||||
{
|
||||
// if the name was cleared, refresh the DisplayName
|
||||
_command.Name(newName);
|
||||
_NotifyChanges(L"DisplayName", L"DisplayNameAndKeyChordAutomationPropName");
|
||||
_cachedDisplayName.clear();
|
||||
}
|
||||
_cachedDisplayName.clear();
|
||||
}
|
||||
|
||||
winrt::hstring CommandViewModel::DisplayNameAndKeyChordAutomationPropName()
|
||||
{
|
||||
return DisplayName() + L", " + FirstKeyChordText();
|
||||
auto result = DisplayName() + L", " + FirstKeyChordText();
|
||||
const auto size = _KeyChordList.Size();
|
||||
if (size > 1)
|
||||
{
|
||||
result = result + L" " + hstring{ RS_fmt(L"Actions_AdditionalKeyChords", winrt::to_hstring(size - 1)) };
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
winrt::hstring CommandViewModel::FirstKeyChordText()
|
||||
@@ -149,6 +154,35 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
return L"";
|
||||
}
|
||||
|
||||
winrt::hstring CommandViewModel::AdditionalKeyChordCountText()
|
||||
{
|
||||
const auto size = _KeyChordList.Size();
|
||||
if (size > 1)
|
||||
{
|
||||
return winrt::hstring{ L"+" + winrt::to_hstring(size - 1) };
|
||||
}
|
||||
return L"";
|
||||
}
|
||||
|
||||
winrt::hstring CommandViewModel::AdditionalKeyChordTooltipText()
|
||||
{
|
||||
const auto size = _KeyChordList.Size();
|
||||
if (size <= 1)
|
||||
{
|
||||
return L"";
|
||||
}
|
||||
std::wstring result;
|
||||
for (uint32_t i = 1; i < size; ++i)
|
||||
{
|
||||
if (!result.empty())
|
||||
{
|
||||
result += L"\n";
|
||||
}
|
||||
result += std::wstring_view{ _KeyChordList.GetAt(i).KeyChordText() };
|
||||
}
|
||||
return winrt::hstring{ result };
|
||||
}
|
||||
|
||||
winrt::hstring CommandViewModel::ID()
|
||||
{
|
||||
return _command.ID();
|
||||
@@ -287,7 +321,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
weak->_ReplaceCommandWithUserCopy(false);
|
||||
}
|
||||
weak->_NotifyChanges(L"DisplayName");
|
||||
if (!weak->_command.HasName())
|
||||
{
|
||||
weak->_NotifyChanges(L"DisplayName");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -324,7 +361,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
_RegisterActionArgsVMEvents(*actionArgsVM);
|
||||
actionArgsVM->Initialize();
|
||||
ActionArgsVM(*actionArgsVM);
|
||||
_NotifyChanges(L"DisplayName");
|
||||
if (!_command.HasName())
|
||||
{
|
||||
_NotifyChanges(L"DisplayName");
|
||||
}
|
||||
}
|
||||
|
||||
ArgWrapper::ArgWrapper(const Model::ArgDescriptor& descriptor, const Windows::Foundation::IInspectable& value) :
|
||||
@@ -1206,6 +1246,25 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
CurrentPage(ActionsSubPage::Edit);
|
||||
}
|
||||
|
||||
void ActionsViewModel::ReSortCommandList()
|
||||
{
|
||||
if (_CommandListDirty)
|
||||
{
|
||||
std::vector<Editor::CommandViewModel> commandList;
|
||||
commandList.reserve(_CommandList.Size());
|
||||
for (const auto& cmd : _CommandList)
|
||||
{
|
||||
commandList.push_back(cmd);
|
||||
}
|
||||
std::sort(commandList.begin(), commandList.end(), [](const Editor::CommandViewModel& lhs, const Editor::CommandViewModel& rhs) {
|
||||
return lhs.DisplayName() < rhs.DisplayName();
|
||||
});
|
||||
_CommandList = single_threaded_observable_vector(std::move(commandList));
|
||||
_NotifyChanges(L"CommandList");
|
||||
_CommandListDirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void ActionsViewModel::CurrentCommand(const Editor::CommandViewModel& newCommand)
|
||||
{
|
||||
_CurrentCommand = newCommand;
|
||||
@@ -1376,5 +1435,17 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
cmdVM->DeleteRequested({ this, &ActionsViewModel::_CmdVMDeleteRequestedHandler });
|
||||
cmdVM->PropagateColorSchemeRequested({ this, &ActionsViewModel::_CmdVMPropagateColorSchemeRequestedHandler });
|
||||
cmdVM->PropagateColorSchemeNamesRequested({ this, &ActionsViewModel::_CmdVMPropagateColorSchemeNamesRequestedHandler });
|
||||
cmdVM->PropertyChanged([weakThis{ get_weak() }](const IInspectable& sender, const Windows::UI::Xaml::Data::PropertyChangedEventArgs& args) {
|
||||
if (const auto self{ weakThis.get() })
|
||||
{
|
||||
const auto senderVM{ sender.as<Editor::CommandViewModel>() };
|
||||
const auto propertyName{ args.PropertyName() };
|
||||
if (propertyName == L"DisplayName")
|
||||
{
|
||||
// when a command's name changes, note that we need to re-sort the command list when we navigate back to the actions page
|
||||
self->_CommandListDirty = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
winrt::hstring DisplayNameAndKeyChordAutomationPropName();
|
||||
|
||||
winrt::hstring FirstKeyChordText();
|
||||
winrt::hstring AdditionalKeyChordCountText();
|
||||
winrt::hstring AdditionalKeyChordTooltipText();
|
||||
|
||||
winrt::hstring ID();
|
||||
bool IsUserAction();
|
||||
@@ -256,6 +258,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
bool DisplayBadge() const noexcept;
|
||||
|
||||
void AddNewCommand();
|
||||
void ReSortCommandList();
|
||||
|
||||
void CurrentCommand(const Editor::CommandViewModel& newCommand);
|
||||
Editor::CommandViewModel CurrentCommand();
|
||||
@@ -277,6 +280,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
Model::CascadiaSettings _Settings;
|
||||
Windows::Foundation::Collections::IMap<Model::ShortcutAction, winrt::hstring> _AvailableActionsAndNamesMap;
|
||||
Windows::Foundation::Collections::IMap<winrt::hstring, Model::ShortcutAction> _NameToActionMap;
|
||||
bool _CommandListDirty{ false };
|
||||
|
||||
void _MakeCommandVMsHelper();
|
||||
void _RegisterCmdVMEvents(com_ptr<implementation::CommandViewModel>& cmdVM);
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
// View-model specific
|
||||
String DisplayName { get; };
|
||||
String FirstKeyChordText { get; };
|
||||
String AdditionalKeyChordCountText { get; };
|
||||
String AdditionalKeyChordTooltipText { get; };
|
||||
String DisplayNameAndKeyChordAutomationPropName { get; };
|
||||
|
||||
// UI side (command list page)
|
||||
@@ -164,6 +166,7 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
void UpdateSettings(Microsoft.Terminal.Settings.Model.CascadiaSettings settings);
|
||||
|
||||
void AddNewCommand();
|
||||
void ReSortCommandList();
|
||||
|
||||
ActionsSubPage CurrentPage;
|
||||
Boolean DisplayBadge { get; };
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_State = args.ViewModel().as<Editor::AddProfilePageNavigationState>();
|
||||
BringIntoViewWhenLoaded(args.ElementToFocus());
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hTerminalSettingsEditorProvider,
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
</Button>
|
||||
</Border>
|
||||
<StackPanel Margin="{StaticResource StandardControlMargin}">
|
||||
<local:SettingContainer x:Uid="AddProfile_Duplicate">
|
||||
<local:SettingContainer x:Name="DuplicateProfile"
|
||||
x:Uid="AddProfile_Duplicate">
|
||||
<ComboBox x:Name="Profiles"
|
||||
AutomationProperties.AccessibilityView="Content"
|
||||
ItemsSource="{x:Bind State.Settings.AllProfiles, Mode=OneWay}"
|
||||
|
||||
@@ -1138,6 +1138,27 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
INITIALIZE_BINDABLE_ENUM_SETTING(IntenseTextStyle, IntenseTextStyle, winrt::Microsoft::Terminal::Settings::Model::IntenseStyle, L"Appearance_IntenseTextStyle", L"Content");
|
||||
}
|
||||
|
||||
// Appearances doesn't implement HasScrollViewer<T> which normally adds this function.
|
||||
void Appearances::BringIntoViewWhenLoaded(hstring elementToFocus)
|
||||
{
|
||||
if (elementToFocus.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_loadedRevoker = this->Loaded(winrt::auto_revoke, [weakThis{ get_weak() }, elementToFocus](auto&&, auto&&) {
|
||||
if (const auto strongThis = weakThis.get())
|
||||
{
|
||||
if (const auto& controlToFocus{ strongThis->FindName(elementToFocus).try_as<Controls::Control>() })
|
||||
{
|
||||
controlToFocus.as<FrameworkElement>().StartBringIntoView();
|
||||
controlToFocus.Focus(FocusState::Programmatic);
|
||||
}
|
||||
strongThis->_loadedRevoker.revoke();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
IObservableVector<Editor::Font> Appearances::FilteredFontList()
|
||||
{
|
||||
if (!_filteredFonts)
|
||||
|
||||
@@ -188,6 +188,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
struct Appearances : AppearancesT<Appearances>
|
||||
{
|
||||
Appearances();
|
||||
void BringIntoViewWhenLoaded(hstring elementToFocus);
|
||||
|
||||
// CursorShape visibility logic
|
||||
bool IsVintageCursor() const;
|
||||
@@ -213,6 +214,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
bool IsCustomFontWeight();
|
||||
|
||||
til::property_changed_event PropertyChanged;
|
||||
winrt::Windows::UI::Xaml::FrameworkElement::Loaded_revoker _loadedRevoker;
|
||||
|
||||
WINRT_PROPERTY(Windows::Foundation::Collections::IObservableVector<Microsoft::Terminal::Settings::Editor::EnumEntry>, FontWeightList);
|
||||
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
Style="{StaticResource TextBlockSubHeaderStyle}" />
|
||||
<!-- Color Scheme -->
|
||||
<!-- This currently only display the Dark color scheme, even if the user has a pair of schemes set. -->
|
||||
<local:SettingContainer x:Uid="Profile_ColorScheme"
|
||||
<local:SettingContainer x:Name="ColorScheme"
|
||||
x:Uid="Profile_ColorScheme"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearColorScheme}"
|
||||
CurrentValueAccessibleName="{x:Bind Appearance.CurrentColorScheme.Name, Mode=OneWay}"
|
||||
HasSettingValue="{x:Bind Appearance.HasDarkColorSchemeName, Mode=OneWay}"
|
||||
@@ -284,17 +285,20 @@
|
||||
IsChecked="{x:Bind ShowAllFonts, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
</local:SettingContainer>
|
||||
<local:SettingContainer x:Uid="Profile_MissingFontFaces"
|
||||
<local:SettingContainer x:Name="MissingFontFaces"
|
||||
x:Uid="Profile_MissingFontFaces"
|
||||
HelpText="{x:Bind Appearance.MissingFontFaces, Mode=OneWay}"
|
||||
Style="{StaticResource SettingContainerErrorStyle}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(Appearance.MissingFontFaces), Mode=OneWay}" />
|
||||
<local:SettingContainer x:Uid="Profile_ProportionalFontFaces"
|
||||
<local:SettingContainer x:Name="ProportionalFontFaces"
|
||||
x:Uid="Profile_ProportionalFontFaces"
|
||||
HelpText="{x:Bind Appearance.ProportionalFontFaces, Mode=OneWay}"
|
||||
Style="{StaticResource SettingContainerWarningStyle}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(Appearance.ProportionalFontFaces), Mode=OneWay}" />
|
||||
|
||||
<!-- Font Size -->
|
||||
<local:SettingContainer x:Uid="Profile_FontSize"
|
||||
<local:SettingContainer x:Name="FontSize"
|
||||
x:Uid="Profile_FontSize"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearFontSize}"
|
||||
HasSettingValue="{x:Bind Appearance.HasFontSize, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.FontSizeOverrideSource, Mode=OneWay}"
|
||||
@@ -310,7 +314,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Line Height -->
|
||||
<local:SettingContainer x:Uid="Profile_LineHeight"
|
||||
<local:SettingContainer x:Name="LineHeight"
|
||||
x:Uid="Profile_LineHeight"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearLineHeight}"
|
||||
HasSettingValue="{x:Bind Appearance.HasLineHeight, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.LineHeightOverrideSource, Mode=OneWay}"
|
||||
@@ -326,7 +331,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Cell Width -->
|
||||
<local:SettingContainer x:Uid="Profile_CellWidth"
|
||||
<local:SettingContainer x:Name="CellWidth"
|
||||
x:Uid="Profile_CellWidth"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearCellWidth}"
|
||||
HasSettingValue="{x:Bind Appearance.HasCellWidth, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.CellWidthOverrideSource, Mode=OneWay}"
|
||||
@@ -342,7 +348,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Font Weight -->
|
||||
<local:SettingContainer x:Uid="Profile_FontWeight"
|
||||
<local:SettingContainer x:Name="FontWeight"
|
||||
x:Uid="Profile_FontWeight"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearFontWeight}"
|
||||
HasSettingValue="{x:Bind Appearance.HasFontWeight, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.FontWeightOverrideSource, Mode=OneWay}"
|
||||
@@ -378,7 +385,8 @@
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:SettingContainer>
|
||||
<local:SettingContainer x:Uid="Profile_FontAxes"
|
||||
<local:SettingContainer x:Name="FontAxes"
|
||||
x:Uid="Profile_FontAxes"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearFontAxes}"
|
||||
HasSettingValue="{x:Bind Appearance.HasFontAxes, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.FontAxesOverrideSource, Mode=OneWay}"
|
||||
@@ -405,7 +413,8 @@
|
||||
</muxc:DropDownButton>
|
||||
</StackPanel>
|
||||
</local:SettingContainer>
|
||||
<local:SettingContainer x:Uid="Profile_FontFeatures"
|
||||
<local:SettingContainer x:Name="FontFeatures"
|
||||
x:Uid="Profile_FontFeatures"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearFontFeatures}"
|
||||
HasSettingValue="{x:Bind Appearance.HasFontFeatures, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.FontFeaturesOverrideSource, Mode=OneWay}"
|
||||
@@ -434,7 +443,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Builtin Glyphs -->
|
||||
<local:SettingContainer x:Uid="Profile_EnableBuiltinGlyphs"
|
||||
<local:SettingContainer x:Name="EnableBuiltinGlyphs"
|
||||
x:Uid="Profile_EnableBuiltinGlyphs"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearEnableBuiltinGlyphs}"
|
||||
HasSettingValue="{x:Bind Appearance.HasEnableBuiltinGlyphs, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.EnableBuiltinGlyphsOverrideSource, Mode=OneWay}">
|
||||
@@ -443,7 +453,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Color Glyphs -->
|
||||
<local:SettingContainer x:Uid="Profile_EnableColorGlyphs"
|
||||
<local:SettingContainer x:Name="EnableColorGlyphs"
|
||||
x:Uid="Profile_EnableColorGlyphs"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearEnableColorGlyphs}"
|
||||
HasSettingValue="{x:Bind Appearance.HasEnableColorGlyphs, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.EnableColorGlyphsOverrideSource, Mode=OneWay}">
|
||||
@@ -452,7 +463,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Retro Terminal Effect -->
|
||||
<local:SettingContainer x:Uid="Profile_RetroTerminalEffect"
|
||||
<local:SettingContainer x:Name="RetroTerminalEffect"
|
||||
x:Uid="Profile_RetroTerminalEffect"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearRetroTerminalEffect}"
|
||||
HasSettingValue="{x:Bind Appearance.HasRetroTerminalEffect, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.RetroTerminalEffectOverrideSource, Mode=OneWay}">
|
||||
@@ -461,7 +473,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Adjust Indistinguishable Colors -->
|
||||
<local:SettingContainer x:Uid="Profile_AdjustIndistinguishableColors"
|
||||
<local:SettingContainer x:Name="AdjustIndistinguishableColors"
|
||||
x:Uid="Profile_AdjustIndistinguishableColors"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearAdjustIndistinguishableColors}"
|
||||
HasSettingValue="{x:Bind Appearance.HasAdjustIndistinguishableColors, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.AdjustIndistinguishableColorsOverrideSource, Mode=OneWay}">
|
||||
@@ -479,7 +492,8 @@
|
||||
Style="{StaticResource TextBlockSubHeaderStyle}" />
|
||||
|
||||
<!-- Cursor Shape -->
|
||||
<local:SettingContainer x:Uid="Profile_CursorShape"
|
||||
<local:SettingContainer x:Name="CursorShape"
|
||||
x:Uid="Profile_CursorShape"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearCursorShape}"
|
||||
HasSettingValue="{x:Bind Appearance.HasCursorShape, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.CursorShapeOverrideSource, Mode=OneWay}">
|
||||
@@ -491,7 +505,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Cursor Height -->
|
||||
<local:SettingContainer x:Uid="Profile_CursorHeight"
|
||||
<local:SettingContainer x:Name="CursorHeight"
|
||||
x:Uid="Profile_CursorHeight"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearCursorHeight}"
|
||||
HasSettingValue="{x:Bind Appearance.HasCursorHeight, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.CursorHeightOverrideSource, Mode=OneWay}"
|
||||
@@ -563,7 +578,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Background Image Stretch Mode -->
|
||||
<local:SettingContainer x:Uid="Profile_BackgroundImageStretchMode"
|
||||
<local:SettingContainer x:Name="BackgroundImageStretchMode"
|
||||
x:Uid="Profile_BackgroundImageStretchMode"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearBackgroundImageStretchMode}"
|
||||
HasSettingValue="{x:Bind Appearance.HasBackgroundImageStretchMode, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.BackgroundImageStretchModeOverrideSource, Mode=OneWay}"
|
||||
@@ -576,7 +592,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Background Image Alignment -->
|
||||
<local:SettingContainer x:Uid="Profile_BackgroundImageAlignment"
|
||||
<local:SettingContainer x:Name="BackgroundImageAlignment"
|
||||
x:Uid="Profile_BackgroundImageAlignment"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearBackgroundImageAlignment}"
|
||||
CurrentValue="{x:Bind Appearance.BackgroundImageAlignmentCurrentValue, Mode=OneWay}"
|
||||
HasSettingValue="{x:Bind Appearance.HasBackgroundImageAlignment, Mode=OneWay}"
|
||||
@@ -764,7 +781,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Background Image Opacity -->
|
||||
<local:SettingContainer x:Uid="Profile_BackgroundImageOpacity"
|
||||
<local:SettingContainer x:Name="BackgroundImageOpacity"
|
||||
x:Uid="Profile_BackgroundImageOpacity"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearBackgroundImageOpacity}"
|
||||
HasSettingValue="{x:Bind Appearance.HasBackgroundImageOpacity, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.BackgroundImageOpacityOverrideSource, Mode=OneWay}"
|
||||
@@ -790,7 +808,8 @@
|
||||
Style="{StaticResource TextBlockSubHeaderStyle}" />
|
||||
|
||||
<!-- Intense is bold, bright -->
|
||||
<local:SettingContainer x:Uid="Appearance_IntenseTextStyle"
|
||||
<local:SettingContainer x:Name="IntenseTextStyle"
|
||||
x:Uid="Appearance_IntenseTextStyle"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearIntenseTextStyle}"
|
||||
HasSettingValue="{x:Bind Appearance.HasIntenseTextStyle, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.IntenseTextStyleOverrideSource, Mode=OneWay}">
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_ViewModel = args.ViewModel().as<Editor::ColorSchemesPageViewModel>();
|
||||
_ViewModel.CurrentPage(ColorSchemesSubPage::Base);
|
||||
BringIntoViewWhenLoaded(args.ElementToFocus());
|
||||
|
||||
_layoutUpdatedRevoker = LayoutUpdated(winrt::auto_revoke, [this](auto /*s*/, auto /*e*/) {
|
||||
// Only let this succeed once.
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
_settings{ settings }
|
||||
{
|
||||
INITIALIZE_BINDABLE_ENUM_SETTING(TextMeasurement, TextMeasurement, winrt::Microsoft::Terminal::Control::TextMeasurement, L"Globals_TextMeasurement_", L"Text");
|
||||
INITIALIZE_BINDABLE_ENUM_SETTING(AmbiguousWidth, AmbiguousWidth, winrt::Microsoft::Terminal::Control::AmbiguousWidth, L"Globals_AmbiguousWidth_", L"Text");
|
||||
}
|
||||
|
||||
bool CompatibilityViewModel::DebugFeaturesAvailable() const noexcept
|
||||
@@ -56,6 +57,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_ViewModel = args.ViewModel().as<Editor::CompatibilityViewModel>();
|
||||
BringIntoViewWhenLoaded(args.ElementToFocus());
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hTerminalSettingsEditorProvider,
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_settings.GlobalSettings(), AllowHeadless);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_settings.GlobalSettings(), DebugFeaturesEnabled);
|
||||
GETSET_BINDABLE_ENUM_SETTING(TextMeasurement, winrt::Microsoft::Terminal::Control::TextMeasurement, _settings.GlobalSettings().TextMeasurement);
|
||||
GETSET_BINDABLE_ENUM_SETTING(AmbiguousWidth, winrt::Microsoft::Terminal::Control::AmbiguousWidth, _settings.GlobalSettings().AmbiguousWidth);
|
||||
|
||||
private:
|
||||
Model::CascadiaSettings _settings;
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
|
||||
IInspectable CurrentTextMeasurement;
|
||||
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> TextMeasurementList { get; };
|
||||
|
||||
IInspectable CurrentAmbiguousWidth;
|
||||
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> AmbiguousWidthList { get; };
|
||||
}
|
||||
|
||||
[default_interface] runtimeclass Compatibility : Windows.UI.Xaml.Controls.Page
|
||||
|
||||
@@ -26,13 +26,15 @@
|
||||
|
||||
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
||||
<!-- Allow Headless -->
|
||||
<local:SettingContainer x:Uid="Globals_AllowHeadless">
|
||||
<local:SettingContainer x:Name="AllowHeadless"
|
||||
x:Uid="Globals_AllowHeadless">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AllowHeadless, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Text Measurement -->
|
||||
<local:SettingContainer x:Uid="Globals_TextMeasurement">
|
||||
<local:SettingContainer x:Name="TextMeasurement"
|
||||
x:Uid="Globals_TextMeasurement">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.TextMeasurementList}"
|
||||
@@ -40,15 +42,27 @@
|
||||
Style="{StaticResource ComboBoxSettingStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Ambiguous Width -->
|
||||
<local:SettingContainer x:Name="AmbiguousWidth"
|
||||
x:Uid="Globals_AmbiguousWidth">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.AmbiguousWidthList}"
|
||||
SelectedItem="{x:Bind ViewModel.CurrentAmbiguousWidth, Mode=TwoWay}"
|
||||
Style="{StaticResource ComboBoxSettingStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Debug Features -->
|
||||
<local:SettingContainer x:Uid="Globals_DebugFeaturesEnabled"
|
||||
<local:SettingContainer x:Name="DebugFeaturesEnabled"
|
||||
x:Uid="Globals_DebugFeaturesEnabled"
|
||||
Visibility="{x:Bind ViewModel.DebugFeaturesAvailable}">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.DebugFeaturesEnabled, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Reset Application State -->
|
||||
<local:SettingContainer x:Uid="Settings_ResetApplicationState">
|
||||
<local:SettingContainer x:Name="ResetApplicationState"
|
||||
x:Uid="Settings_ResetApplicationState">
|
||||
<Button x:Uid="Settings_ResetApplicationStateButton"
|
||||
Style="{StaticResource DeleteButtonStyle}">
|
||||
<Button.Flyout>
|
||||
@@ -69,7 +83,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Reset to Default Settings -->
|
||||
<local:SettingContainer x:Uid="Settings_ResetToDefaultSettings">
|
||||
<local:SettingContainer x:Name="ResetToDefaultSettings"
|
||||
x:Uid="Settings_ResetToDefaultSettings">
|
||||
<Button x:Uid="Settings_ResetToDefaultSettingsButton"
|
||||
Style="{StaticResource DeleteButtonStyle}">
|
||||
<Button.Flyout>
|
||||
|
||||
@@ -105,14 +105,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
}
|
||||
}
|
||||
|
||||
void EditAction::ShortcutActionBox_SuggestionChosen(const AutoSuggestBox& sender, const AutoSuggestBoxSuggestionChosenEventArgs& args)
|
||||
{
|
||||
if (const auto selectedAction = args.SelectedItem().try_as<winrt::hstring>())
|
||||
{
|
||||
sender.Text(*selectedAction);
|
||||
}
|
||||
}
|
||||
|
||||
void EditAction::ShortcutActionBox_QuerySubmitted(const AutoSuggestBox& sender, const AutoSuggestBoxQuerySubmittedEventArgs& args)
|
||||
{
|
||||
const auto submittedText = args.QueryText();
|
||||
|
||||
@@ -22,7 +22,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
void ShortcutActionBox_GotFocus(const winrt::Windows::Foundation::IInspectable& sender, const winrt::Windows::UI::Xaml::RoutedEventArgs& args);
|
||||
void ShortcutActionBox_TextChanged(const winrt::Windows::UI::Xaml::Controls::AutoSuggestBox& sender, const winrt::Windows::UI::Xaml::Controls::AutoSuggestBoxTextChangedEventArgs& args);
|
||||
void ShortcutActionBox_SuggestionChosen(const winrt::Windows::UI::Xaml::Controls::AutoSuggestBox& sender, const winrt::Windows::UI::Xaml::Controls::AutoSuggestBoxSuggestionChosenEventArgs& args);
|
||||
void ShortcutActionBox_QuerySubmitted(const winrt::Windows::UI::Xaml::Controls::AutoSuggestBox& sender, const winrt::Windows::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs& args);
|
||||
void ShortcutActionBox_LostFocus(const winrt::Windows::Foundation::IInspectable& sender, const winrt::Windows::UI::Xaml::RoutedEventArgs& args);
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
</Style>
|
||||
<Style x:Key="KeyChordEditorStyle"
|
||||
TargetType="local:KeyChordListener">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<x:Int32 x:Key="EditButtonSize">32</x:Int32>
|
||||
@@ -157,63 +157,64 @@
|
||||
<Setter Property="Height" Value="{StaticResource EditButtonSize}" />
|
||||
<Setter Property="Width" Value="{StaticResource EditButtonSize}" />
|
||||
</Style>
|
||||
<Style x:Key="TextBlockGroupingStyle"
|
||||
BasedOn="{StaticResource BodyStrongTextBlockStyle}"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="MaxWidth" Value="{StaticResource StandardControlMaxWidth}" />
|
||||
<Setter Property="Margin" Value="0,0,0,4" />
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
</Style>
|
||||
|
||||
<!-- Templates -->
|
||||
<DataTemplate x:Key="KeyChordTemplate"
|
||||
x:DataType="local:KeyChordViewModel">
|
||||
<ListViewItem IsTabStop="False"
|
||||
Style="{StaticResource KeyBindingContainerStyle}">
|
||||
<Grid Padding="2,0,2,0"
|
||||
<Grid Padding="-4,0,0,0"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0"
|
||||
Background="{ThemeResource AppBarItemBackgroundThemeBrush}"
|
||||
Click="{x:Bind ToggleEditMode}"
|
||||
Style="{ThemeResource KeyChordBorderStyle}"
|
||||
Visibility="{x:Bind mtu:Converters.InvertedBooleanToVisibility(IsInEditMode), Mode=OneWay}">
|
||||
<TextBlock FontSize="14"
|
||||
Style="{ThemeResource KeyChordTextBlockStyle}"
|
||||
Text="{x:Bind KeyChordText, Mode=OneWay}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
</Button>
|
||||
<Grid Grid.Column="0"
|
||||
ColumnSpacing="8"
|
||||
Visibility="{x:Bind IsInEditMode, Mode=OneWay}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Edit Mode: Key Chord Listener -->
|
||||
<local:KeyChordListener Grid.Column="0"
|
||||
Keys="{x:Bind ProposedKeys, Mode=TwoWay}"
|
||||
Style="{StaticResource KeyChordEditorStyle}" />
|
||||
|
||||
<!-- Cancel editing the action -->
|
||||
<Button x:Uid="Actions_CancelButton"
|
||||
Grid.Column="1"
|
||||
AutomationProperties.Name="{x:Bind CancelButtonName}"
|
||||
Click="{x:Bind CancelChanges}"
|
||||
Style="{StaticResource EditButtonStyle}">
|
||||
<FontIcon FontSize="{StaticResource EditButtonIconSize}"
|
||||
Glyph="" />
|
||||
</Button>
|
||||
|
||||
<!-- Accept changes -->
|
||||
<Button x:Uid="Actions_AcceptButton"
|
||||
Grid.Column="2"
|
||||
AutomationProperties.Name="{x:Bind AcceptButtonName}"
|
||||
Click="{x:Bind AcceptChanges}"
|
||||
Flyout="{x:Bind AcceptChangesFlyout, Mode=OneWay}"
|
||||
Style="{StaticResource AccentEditButtonStyle}">
|
||||
<FontIcon FontSize="{StaticResource EditButtonIconSize}"
|
||||
Glyph="" />
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Grid.Column="1"
|
||||
<local:KeyChordListener Grid.Column="0"
|
||||
Keys="{x:Bind ProposedKeys, Mode=TwoWay}"
|
||||
Style="{StaticResource KeyChordEditorStyle}"
|
||||
Visibility="{x:Bind IsInEditMode, Mode=OneWay}" />
|
||||
<Button x:Uid="Actions_CancelButton"
|
||||
Grid.Column="1"
|
||||
Margin="8,0,0,0"
|
||||
AutomationProperties.Name="{x:Bind CancelButtonName}"
|
||||
Click="{x:Bind CancelChanges}"
|
||||
Style="{StaticResource EditButtonStyle}"
|
||||
Visibility="{x:Bind IsInEditMode, Mode=OneWay}">
|
||||
<FontIcon FontSize="{StaticResource EditButtonIconSize}"
|
||||
Glyph="" />
|
||||
</Button>
|
||||
|
||||
<Button x:Uid="Actions_AcceptButton"
|
||||
Grid.Column="2"
|
||||
Margin="8,0,8,0"
|
||||
AutomationProperties.Name="{x:Bind AcceptButtonName}"
|
||||
Click="{x:Bind AcceptChanges}"
|
||||
Flyout="{x:Bind AcceptChangesFlyout, Mode=OneWay}"
|
||||
Style="{StaticResource AccentEditButtonStyle}"
|
||||
Visibility="{x:Bind IsInEditMode, Mode=OneWay}">
|
||||
<FontIcon FontSize="{StaticResource EditButtonIconSize}"
|
||||
Glyph="" />
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="3"
|
||||
HorizontalAlignment="Left"
|
||||
AutomationProperties.Name="{x:Bind DeleteButtonName}"
|
||||
Style="{StaticResource DeleteSmallButtonStyle}">
|
||||
<Button.Content>
|
||||
@@ -243,13 +244,14 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Name}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<muxc:NumberBox Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Bind Name}"
|
||||
LargeChange="1"
|
||||
Maximum="100"
|
||||
@@ -267,13 +269,14 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Name}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<muxc:NumberBox Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Bind Name}"
|
||||
LargeChange="1"
|
||||
Maximum="999"
|
||||
@@ -291,13 +294,14 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Name}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<muxc:NumberBox Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Bind Name}"
|
||||
LargeChange="1"
|
||||
Maximum="999"
|
||||
@@ -315,13 +319,14 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Name}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<muxc:NumberBox Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Bind Name}"
|
||||
LargeChange="1"
|
||||
Maximum="999"
|
||||
@@ -339,13 +344,14 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Name}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<muxc:NumberBox Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Bind Name}"
|
||||
LargeChange="1"
|
||||
Maximum="999"
|
||||
@@ -363,13 +369,14 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Name}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<muxc:NumberBox Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Bind Name}"
|
||||
LargeChange="0.2"
|
||||
Maximum="1"
|
||||
@@ -387,7 +394,7 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto"
|
||||
<ColumnDefinition Width="*"
|
||||
MinWidth="196" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
@@ -408,13 +415,14 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Name}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<ComboBox Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Bind Name}"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind EnumList, Mode=OneWay}"
|
||||
@@ -482,13 +490,14 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Name}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<ToggleSwitch Grid.Column="1"
|
||||
HorizontalAlignment="Left"
|
||||
AutomationProperties.Name="{x:Bind Name}"
|
||||
IsOn="{x:Bind UnboxBool(Value), Mode=TwoWay, BindBack=BoolOptionalBindBack}" />
|
||||
</Grid>
|
||||
@@ -501,13 +510,14 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Name}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<CheckBox Grid.Column="1"
|
||||
HorizontalAlignment="Left"
|
||||
AutomationProperties.Name="{x:Bind Name}"
|
||||
IsChecked="{x:Bind UnboxBoolOptional(Value), Mode=TwoWay, BindBack=BoolOptionalBindBack}"
|
||||
IsThreeState="True" />
|
||||
@@ -526,13 +536,14 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Name}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<ComboBox Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Bind Name}"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind EnumList, Mode=OneWay}"
|
||||
@@ -586,7 +597,7 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
@@ -608,7 +619,7 @@
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
@@ -646,77 +657,98 @@
|
||||
|
||||
<Border MaxWidth="{StaticResource StandardControlMaxWidth}"
|
||||
Margin="{StaticResource SettingStackMargin}">
|
||||
<Grid MaxWidth="600"
|
||||
Margin="{StaticResource SettingStackMargin}"
|
||||
HorizontalAlignment="Left"
|
||||
ColumnSpacing="16"
|
||||
RowSpacing="8">
|
||||
<Grid Margin="{StaticResource SettingStackMargin}"
|
||||
HorizontalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="{StaticResource ArgumentNameWidth}" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:Uid="Actions_Name"
|
||||
<TextBlock x:Uid="Actions_CommandDetails"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,0,0,12"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource TextBlockGroupingStyle}" />
|
||||
<TextBlock x:Uid="Actions_Name"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,8"
|
||||
VerticalAlignment="Center" />
|
||||
<TextBox x:Name="CommandNameTextBox"
|
||||
Grid.Row="0"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Width="300"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="0,0,0,8"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Bind ViewModel.ActionNameTextBoxAutomationPropName}"
|
||||
PlaceholderText="{x:Bind ViewModel.DisplayName, Mode=OneWay}"
|
||||
Text="{x:Bind ViewModel.Name, Mode=TwoWay}" />
|
||||
<TextBlock x:Uid="Actions_ShortcutAction"
|
||||
Grid.Row="1"
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,12"
|
||||
VerticalAlignment="Center" />
|
||||
<AutoSuggestBox x:Name="ShortcutActionBox"
|
||||
Grid.Row="1"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,0,12"
|
||||
VerticalAlignment="Center"
|
||||
AutomationProperties.Name="{x:Bind ViewModel.ShortcutActionComboBoxAutomationPropName}"
|
||||
GotFocus="ShortcutActionBox_GotFocus"
|
||||
LostFocus="ShortcutActionBox_LostFocus"
|
||||
QuerySubmitted="ShortcutActionBox_QuerySubmitted"
|
||||
SuggestionChosen="ShortcutActionBox_SuggestionChosen"
|
||||
TextChanged="ShortcutActionBox_TextChanged" />
|
||||
<TextBlock x:Uid="Actions_Arguments"
|
||||
Grid.Row="2"
|
||||
<TextBlock x:Uid="Actions_Keybindings"
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,0,0,12"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource TextBlockGroupingStyle}" />
|
||||
<ListView x:Name="KeyChordListView"
|
||||
x:Uid="Actions_KeyBindingsListView"
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,0,0,12"
|
||||
ItemTemplate="{StaticResource KeyChordTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.KeyChordList, Mode=OneWay}"
|
||||
SelectionMode="None">
|
||||
<ListView.Footer>
|
||||
<Button Margin="0,4,0,0"
|
||||
Click="{x:Bind ViewModel.AddKeybinding_Click}">
|
||||
<TextBlock x:Uid="Actions_AddKeyChord" />
|
||||
</Button>
|
||||
</ListView.Footer>
|
||||
</ListView>
|
||||
<TextBlock x:Uid="Actions_Arguments"
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,0,0,12"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource TextBlockGroupingStyle}"
|
||||
Visibility="{x:Bind ViewModel.ActionArgsVM.HasArgs, Mode=OneWay}" />
|
||||
<ItemsControl Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
<ItemsControl Grid.Row="6"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,0,0,12"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Bind ViewModel.AdditionalArgumentsControlAutomationPropName}"
|
||||
IsTabStop="False"
|
||||
ItemTemplateSelector="{StaticResource ArgsTemplateSelector}"
|
||||
ItemsSource="{x:Bind ViewModel.ActionArgsVM.ArgValues, Mode=OneWay}" />
|
||||
<TextBlock x:Uid="Actions_Keybindings"
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center" />
|
||||
<ListView x:Name="KeyChordListView"
|
||||
x:Uid="Actions_KeyBindingsListView"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
ItemTemplate="{StaticResource KeyChordTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.KeyChordList, Mode=OneWay}"
|
||||
SelectionMode="None">
|
||||
<ListView.Header>
|
||||
<Button Click="{x:Bind ViewModel.AddKeybinding_Click}">
|
||||
<TextBlock x:Uid="Actions_AddKeyChord" />
|
||||
</Button>
|
||||
</ListView.Header>
|
||||
</ListView>
|
||||
<Button Grid.Row="4"
|
||||
<Button Grid.Row="7"
|
||||
Grid.Column="0"
|
||||
IsEnabled="{x:Bind ViewModel.IsUserAction, Mode=OneWay}"
|
||||
Style="{StaticResource DeleteButtonStyle}">
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_ViewModel = args.ViewModel().as<Editor::ColorSchemeViewModel>();
|
||||
BringIntoViewWhenLoaded(args.ElementToFocus());
|
||||
|
||||
const auto schemeName = _ViewModel.Name();
|
||||
NameBox().Text(schemeName);
|
||||
|
||||
@@ -200,7 +200,8 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<local:SettingContainer x:Uid="ColorScheme_InboxSchemeDuplicate"
|
||||
<local:SettingContainer x:Name="InboxSchemeDuplicate"
|
||||
x:Uid="ColorScheme_InboxSchemeDuplicate"
|
||||
Visibility="{x:Bind mtu:Converters.InvertedBooleanToVisibility(ViewModel.IsEditable), Mode=OneWay}">
|
||||
<Button x:Name="DuplicateSchemeButton"
|
||||
x:Uid="ColorScheme_DuplicateButton"
|
||||
@@ -208,7 +209,8 @@
|
||||
Style="{StaticResource BrowseButtonStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<local:SettingContainer x:Uid="ColorScheme_ColorsHeader"
|
||||
<local:SettingContainer x:Name="ColorsHeader"
|
||||
x:Uid="ColorScheme_ColorsHeader"
|
||||
StartExpanded="True"
|
||||
Style="{StaticResource ExpanderSettingContainerStyle}"
|
||||
Visibility="{x:Bind ViewModel.IsEditable, Mode=OneWay}">
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "ExtensionsViewModel.g.cpp"
|
||||
#include "FragmentProfileViewModel.g.cpp"
|
||||
#include "ExtensionPackageTemplateSelector.g.cpp"
|
||||
#include "NavConstants.h"
|
||||
|
||||
#include "..\WinRTUtils\inc\Utils.h"
|
||||
|
||||
@@ -35,9 +36,15 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_ViewModel = args.ViewModel().as<Editor::ExtensionsViewModel>();
|
||||
|
||||
// The extensions are loaded asynchronously as a part of the VM ctor.
|
||||
// However, there's a chance that they aren't done loading yet.
|
||||
// Calling LoadExtensions() ensures they're loaded by the time we try to display them, and it won't do anything if they're already loaded.
|
||||
auto vmImpl = get_self<ExtensionsViewModel>(_ViewModel);
|
||||
vmImpl->LoadExtensions();
|
||||
vmImpl->ExtensionPackageIdentifierTemplateSelector(_extensionPackageIdentifierTemplateSelector);
|
||||
vmImpl->LazyLoadExtensions();
|
||||
|
||||
BringIntoViewWhenLoaded(args.ElementToFocus());
|
||||
|
||||
if (vmImpl->IsExtensionView())
|
||||
{
|
||||
@@ -90,10 +97,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
ExtensionsViewModel::ExtensionsViewModel(const Model::CascadiaSettings& settings, const Editor::ColorSchemesPageViewModel& colorSchemesPageVM) :
|
||||
_settings{ settings },
|
||||
_colorSchemesPageVM{ colorSchemesPageVM },
|
||||
_extensionsLoaded{ false }
|
||||
_colorSchemesPageVM{ colorSchemesPageVM }
|
||||
{
|
||||
UpdateSettings(settings, colorSchemesPageVM);
|
||||
_LoadExtensionsAsync();
|
||||
|
||||
PropertyChanged([this](auto&&, const PropertyChangedEventArgs& args) {
|
||||
const auto viewModelProperty{ args.PropertyName() };
|
||||
@@ -213,7 +220,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
_CurrentExtensionPackage = nullptr;
|
||||
|
||||
// The extension packages may not be loaded yet because we want to wait until we actually navigate to the page to do so.
|
||||
// In that case, omit "updating" them. They'll get the proper references when we lazy load them.
|
||||
// In that case, omit "updating" them. They'll get the proper references when we load them.
|
||||
if (_extensionPackages)
|
||||
{
|
||||
for (const auto& extPkg : _extensionPackages)
|
||||
@@ -223,139 +230,146 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
}
|
||||
}
|
||||
|
||||
void ExtensionsViewModel::LazyLoadExtensions()
|
||||
safe_void_coroutine ExtensionsViewModel::_LoadExtensionsAsync()
|
||||
{
|
||||
if (_extensionsLoaded)
|
||||
auto weakThis = get_weak();
|
||||
co_await winrt::resume_background();
|
||||
if (auto strongThis = weakThis.get())
|
||||
{
|
||||
return;
|
||||
strongThis->LoadExtensions();
|
||||
}
|
||||
std::vector<Model::ExtensionPackage> extensions = wil::to_vector(_settings.Extensions());
|
||||
}
|
||||
|
||||
// these vectors track components all extensions successfully added
|
||||
std::vector<Editor::ExtensionPackageViewModel> extensionPackages;
|
||||
std::vector<Editor::FragmentProfileViewModel> profilesModifiedTotal;
|
||||
std::vector<Editor::FragmentProfileViewModel> profilesAddedTotal;
|
||||
std::vector<Editor::FragmentColorSchemeViewModel> colorSchemesAddedTotal;
|
||||
for (const auto& extPkg : extensions)
|
||||
{
|
||||
auto extPkgVM = winrt::make_self<ExtensionPackageViewModel>(extPkg, _settings);
|
||||
for (const auto& fragExt : extPkg.FragmentsView())
|
||||
void ExtensionsViewModel::LoadExtensions()
|
||||
{
|
||||
std::call_once(_extensionsLoaded, [this]() {
|
||||
std::vector<Model::ExtensionPackage> extensions = wil::to_vector(_settings.Extensions());
|
||||
|
||||
// these vectors track components all extensions successfully added
|
||||
std::vector<Editor::ExtensionPackageViewModel> extensionPackages;
|
||||
std::vector<Editor::FragmentProfileViewModel> profilesModifiedTotal;
|
||||
std::vector<Editor::FragmentProfileViewModel> profilesAddedTotal;
|
||||
std::vector<Editor::FragmentColorSchemeViewModel> colorSchemesAddedTotal;
|
||||
for (const auto& extPkg : extensions)
|
||||
{
|
||||
const auto extensionEnabled = GetExtensionState(fragExt.Source(), _settings);
|
||||
|
||||
// these vectors track everything the current extension attempted to bring in
|
||||
std::vector<Editor::FragmentProfileViewModel> currentProfilesModified;
|
||||
std::vector<Editor::FragmentProfileViewModel> currentProfilesAdded;
|
||||
std::vector<Editor::FragmentColorSchemeViewModel> currentColorSchemesAdded;
|
||||
|
||||
if (fragExt.ModifiedProfilesView())
|
||||
auto extPkgVM = winrt::make_self<ExtensionPackageViewModel>(extPkg, _settings);
|
||||
for (const auto& fragExt : extPkg.FragmentsView())
|
||||
{
|
||||
for (const auto&& entry : fragExt.ModifiedProfilesView())
|
||||
{
|
||||
// Ensure entry successfully modifies a profile before creating and registering the object
|
||||
if (const auto& deducedProfile = _settings.FindProfile(entry.ProfileGuid()))
|
||||
{
|
||||
auto vm = winrt::make<FragmentProfileViewModel>(entry, fragExt, deducedProfile);
|
||||
currentProfilesModified.push_back(vm);
|
||||
if (extensionEnabled)
|
||||
{
|
||||
profilesModifiedTotal.push_back(vm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const auto extensionEnabled = GetExtensionState(fragExt.Source(), _settings);
|
||||
|
||||
if (fragExt.NewProfilesView())
|
||||
{
|
||||
for (const auto&& entry : fragExt.NewProfilesView())
|
||||
{
|
||||
// Ensure entry successfully points to a profile before creating and registering the object.
|
||||
// The profile may have been removed by the user.
|
||||
if (const auto& deducedProfile = _settings.FindProfile(entry.ProfileGuid()))
|
||||
{
|
||||
auto vm = winrt::make<FragmentProfileViewModel>(entry, fragExt, deducedProfile);
|
||||
currentProfilesAdded.push_back(vm);
|
||||
if (extensionEnabled)
|
||||
{
|
||||
profilesAddedTotal.push_back(vm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// these vectors track everything the current extension attempted to bring in
|
||||
std::vector<Editor::FragmentProfileViewModel> currentProfilesModified;
|
||||
std::vector<Editor::FragmentProfileViewModel> currentProfilesAdded;
|
||||
std::vector<Editor::FragmentColorSchemeViewModel> currentColorSchemesAdded;
|
||||
|
||||
if (fragExt.ColorSchemesView())
|
||||
{
|
||||
for (const auto&& entry : fragExt.ColorSchemesView())
|
||||
if (fragExt.ModifiedProfilesView())
|
||||
{
|
||||
for (const auto& schemeVM : _colorSchemesPageVM.AllColorSchemes())
|
||||
for (const auto&& entry : fragExt.ModifiedProfilesView())
|
||||
{
|
||||
if (schemeVM.Name() == entry.ColorSchemeName())
|
||||
// Ensure entry successfully modifies a profile before creating and registering the object
|
||||
if (const auto& deducedProfile = _settings.FindProfile(entry.ProfileGuid()))
|
||||
{
|
||||
auto vm = winrt::make<FragmentColorSchemeViewModel>(entry, fragExt, schemeVM);
|
||||
currentColorSchemesAdded.push_back(vm);
|
||||
auto vm = winrt::make<FragmentProfileViewModel>(entry, fragExt, deducedProfile);
|
||||
currentProfilesModified.push_back(vm);
|
||||
if (extensionEnabled)
|
||||
{
|
||||
colorSchemesAddedTotal.push_back(vm);
|
||||
profilesModifiedTotal.push_back(vm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// sort the lists linguistically for nicer presentation
|
||||
std::sort(currentProfilesModified.begin(), currentProfilesModified.end(), FragmentProfileViewModel::SortAscending);
|
||||
std::sort(currentProfilesAdded.begin(), currentProfilesAdded.end(), FragmentProfileViewModel::SortAscending);
|
||||
std::sort(currentColorSchemesAdded.begin(), currentColorSchemesAdded.end(), FragmentColorSchemeViewModel::SortAscending);
|
||||
|
||||
extPkgVM->FragmentExtensions().Append(winrt::make<FragmentExtensionViewModel>(fragExt, currentProfilesModified, currentProfilesAdded, currentColorSchemesAdded));
|
||||
extPkgVM->PropertyChanged([&](const IInspectable& sender, const PropertyChangedEventArgs& args) {
|
||||
const auto viewModelProperty{ args.PropertyName() };
|
||||
if (viewModelProperty == L"Enabled")
|
||||
if (fragExt.NewProfilesView())
|
||||
{
|
||||
// If the extension was enabled/disabled,
|
||||
// check if any of its fragments modified profiles, added profiles, or added color schemes.
|
||||
// Only notify what was affected!
|
||||
bool hasModifiedProfiles = false;
|
||||
bool hasAddedProfiles = false;
|
||||
bool hasAddedColorSchemes = false;
|
||||
for (const auto& fragExtVM : sender.as<ExtensionPackageViewModel>()->FragmentExtensions())
|
||||
for (const auto&& entry : fragExt.NewProfilesView())
|
||||
{
|
||||
const auto profilesModified = fragExtVM.ProfilesModified();
|
||||
const auto profilesAdded = fragExtVM.ProfilesAdded();
|
||||
const auto colorSchemesAdded = fragExtVM.ColorSchemesAdded();
|
||||
hasModifiedProfiles |= profilesModified && profilesModified.Size() > 0;
|
||||
hasAddedProfiles |= profilesAdded && profilesAdded.Size() > 0;
|
||||
hasAddedColorSchemes |= colorSchemesAdded && colorSchemesAdded.Size() > 0;
|
||||
}
|
||||
if (hasModifiedProfiles)
|
||||
{
|
||||
_NotifyChanges(L"ProfilesModified");
|
||||
}
|
||||
if (hasAddedProfiles)
|
||||
{
|
||||
_NotifyChanges(L"ProfilesAdded");
|
||||
}
|
||||
if (hasAddedColorSchemes)
|
||||
{
|
||||
_NotifyChanges(L"ColorSchemesAdded");
|
||||
// Ensure entry successfully points to a profile before creating and registering the object.
|
||||
// The profile may have been removed by the user.
|
||||
if (const auto& deducedProfile = _settings.FindProfile(entry.ProfileGuid()))
|
||||
{
|
||||
auto vm = winrt::make<FragmentProfileViewModel>(entry, fragExt, deducedProfile);
|
||||
currentProfilesAdded.push_back(vm);
|
||||
if (extensionEnabled)
|
||||
{
|
||||
profilesAddedTotal.push_back(vm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (fragExt.ColorSchemesView())
|
||||
{
|
||||
for (const auto&& entry : fragExt.ColorSchemesView())
|
||||
{
|
||||
for (const auto& schemeVM : _colorSchemesPageVM.AllColorSchemes())
|
||||
{
|
||||
if (schemeVM.Name() == entry.ColorSchemeName())
|
||||
{
|
||||
auto vm = winrt::make<FragmentColorSchemeViewModel>(entry, fragExt, schemeVM);
|
||||
currentColorSchemesAdded.push_back(vm);
|
||||
if (extensionEnabled)
|
||||
{
|
||||
colorSchemesAddedTotal.push_back(vm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// sort the lists linguistically for nicer presentation
|
||||
std::sort(currentProfilesModified.begin(), currentProfilesModified.end(), FragmentProfileViewModel::SortAscending);
|
||||
std::sort(currentProfilesAdded.begin(), currentProfilesAdded.end(), FragmentProfileViewModel::SortAscending);
|
||||
std::sort(currentColorSchemesAdded.begin(), currentColorSchemesAdded.end(), FragmentColorSchemeViewModel::SortAscending);
|
||||
|
||||
extPkgVM->FragmentExtensions().Append(winrt::make<FragmentExtensionViewModel>(fragExt, currentProfilesModified, currentProfilesAdded, currentColorSchemesAdded));
|
||||
extPkgVM->PropertyChanged([&](const IInspectable& sender, const PropertyChangedEventArgs& args) {
|
||||
const auto viewModelProperty{ args.PropertyName() };
|
||||
if (viewModelProperty == L"Enabled")
|
||||
{
|
||||
// If the extension was enabled/disabled,
|
||||
// check if any of its fragments modified profiles, added profiles, or added color schemes.
|
||||
// Only notify what was affected!
|
||||
bool hasModifiedProfiles = false;
|
||||
bool hasAddedProfiles = false;
|
||||
bool hasAddedColorSchemes = false;
|
||||
for (const auto& fragExtVM : sender.as<ExtensionPackageViewModel>()->FragmentExtensions())
|
||||
{
|
||||
const auto profilesModified = fragExtVM.ProfilesModified();
|
||||
const auto profilesAdded = fragExtVM.ProfilesAdded();
|
||||
const auto colorSchemesAdded = fragExtVM.ColorSchemesAdded();
|
||||
hasModifiedProfiles |= profilesModified && profilesModified.Size() > 0;
|
||||
hasAddedProfiles |= profilesAdded && profilesAdded.Size() > 0;
|
||||
hasAddedColorSchemes |= colorSchemesAdded && colorSchemesAdded.Size() > 0;
|
||||
}
|
||||
if (hasModifiedProfiles)
|
||||
{
|
||||
_NotifyChanges(L"ProfilesModified");
|
||||
}
|
||||
if (hasAddedProfiles)
|
||||
{
|
||||
_NotifyChanges(L"ProfilesAdded");
|
||||
}
|
||||
if (hasAddedColorSchemes)
|
||||
{
|
||||
_NotifyChanges(L"ColorSchemesAdded");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
extensionPackages.push_back(*extPkgVM);
|
||||
}
|
||||
extensionPackages.push_back(*extPkgVM);
|
||||
}
|
||||
|
||||
// sort the lists linguistically for nicer presentation
|
||||
std::sort(extensionPackages.begin(), extensionPackages.end(), ExtensionPackageViewModel::SortAscending);
|
||||
std::sort(profilesModifiedTotal.begin(), profilesModifiedTotal.end(), FragmentProfileViewModel::SortAscending);
|
||||
std::sort(profilesAddedTotal.begin(), profilesAddedTotal.end(), FragmentProfileViewModel::SortAscending);
|
||||
std::sort(colorSchemesAddedTotal.begin(), colorSchemesAddedTotal.end(), FragmentColorSchemeViewModel::SortAscending);
|
||||
// sort the lists linguistically for nicer presentation
|
||||
std::sort(extensionPackages.begin(), extensionPackages.end(), ExtensionPackageViewModel::SortAscending);
|
||||
std::sort(profilesModifiedTotal.begin(), profilesModifiedTotal.end(), FragmentProfileViewModel::SortAscending);
|
||||
std::sort(profilesAddedTotal.begin(), profilesAddedTotal.end(), FragmentProfileViewModel::SortAscending);
|
||||
std::sort(colorSchemesAddedTotal.begin(), colorSchemesAddedTotal.end(), FragmentColorSchemeViewModel::SortAscending);
|
||||
|
||||
_extensionPackages = single_threaded_observable_vector<Editor::ExtensionPackageViewModel>(std::move(extensionPackages));
|
||||
_profilesModifiedView = single_threaded_observable_vector<Editor::FragmentProfileViewModel>(std::move(profilesModifiedTotal));
|
||||
_profilesAddedView = single_threaded_observable_vector<Editor::FragmentProfileViewModel>(std::move(profilesAddedTotal));
|
||||
_colorSchemesAddedView = single_threaded_observable_vector<Editor::FragmentColorSchemeViewModel>(std::move(colorSchemesAddedTotal));
|
||||
_extensionsLoaded = true;
|
||||
_extensionPackages = single_threaded_observable_vector<Editor::ExtensionPackageViewModel>(std::move(extensionPackages));
|
||||
_profilesModifiedView = single_threaded_observable_vector<Editor::FragmentProfileViewModel>(std::move(profilesModifiedTotal));
|
||||
_profilesAddedView = single_threaded_observable_vector<Editor::FragmentProfileViewModel>(std::move(profilesAddedTotal));
|
||||
_colorSchemesAddedView = single_threaded_observable_vector<Editor::FragmentColorSchemeViewModel>(std::move(colorSchemesAddedTotal));
|
||||
});
|
||||
}
|
||||
|
||||
Windows::UI::Xaml::DataTemplate ExtensionsViewModel::CurrentExtensionPackageIdentifierTemplate() const
|
||||
@@ -453,6 +467,20 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
}
|
||||
}
|
||||
|
||||
hstring ExtensionPackageViewModel::DisplayName() const noexcept
|
||||
{
|
||||
// Fragment extensions may not have a DisplayName, so fall back to Source
|
||||
const auto displayName = _package.DisplayName();
|
||||
return displayName.empty() ? _package.Source() : displayName;
|
||||
}
|
||||
|
||||
hstring ExtensionPackageViewModel::Icon() const noexcept
|
||||
{
|
||||
// Fragment extensions may not have an Icon, so fall back to the extensions nav icon glyph
|
||||
const auto icon = _package.Icon();
|
||||
return icon.empty() ? NavTagIconMap[extensionsTag] : icon;
|
||||
}
|
||||
|
||||
hstring ExtensionPackageViewModel::Scope() const noexcept
|
||||
{
|
||||
return _package.Scope() == Model::FragmentScope::User ? RS_(L"Extensions_ScopeUser") : RS_(L"Extensions_ScopeSystem");
|
||||
|
||||
@@ -48,13 +48,14 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
bool NoSchemesAdded() const noexcept { return _colorSchemesAddedView.Size() == 0; }
|
||||
|
||||
// Views
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::ExtensionPackageViewModel> ExtensionPackages() const noexcept { return _extensionPackages; }
|
||||
// NOTE: the extensions are being loaded asynchronously in the ctor. _extensionPackages may be null in that brief window of time.
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::ExtensionPackageViewModel> ExtensionPackages() const noexcept { return _extensionPackages ? _extensionPackages : single_threaded_observable_vector<Editor::ExtensionPackageViewModel>(); }
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::FragmentProfileViewModel> ProfilesModified() const noexcept { return _profilesModifiedView; }
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::FragmentProfileViewModel> ProfilesAdded() const noexcept { return _profilesAddedView; }
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::FragmentColorSchemeViewModel> ColorSchemesAdded() const noexcept { return _colorSchemesAddedView; }
|
||||
|
||||
// Methods
|
||||
void LazyLoadExtensions();
|
||||
void LoadExtensions();
|
||||
void UpdateSettings(const Model::CascadiaSettings& settings, const Editor::ColorSchemesPageViewModel& colorSchemesPageVM);
|
||||
void NavigateToProfile(const guid profileGuid);
|
||||
void NavigateToColorScheme(const Editor::ColorSchemeViewModel& schemeVM);
|
||||
@@ -75,8 +76,9 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::FragmentProfileViewModel> _profilesModifiedView;
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::FragmentProfileViewModel> _profilesAddedView;
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::FragmentColorSchemeViewModel> _colorSchemesAddedView;
|
||||
bool _extensionsLoaded;
|
||||
std::once_flag _extensionsLoaded;
|
||||
|
||||
safe_void_coroutine _LoadExtensionsAsync();
|
||||
void _UpdateListViews(bool updateProfilesModified, bool updateProfilesAdded, bool updateColorSchemesAdded);
|
||||
};
|
||||
|
||||
@@ -93,6 +95,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
void UpdateSettings(const Model::CascadiaSettings& settings);
|
||||
|
||||
Model::ExtensionPackage Package() const noexcept { return _package; }
|
||||
hstring DisplayName() const noexcept;
|
||||
hstring Icon() const noexcept;
|
||||
hstring Scope() const noexcept;
|
||||
bool Enabled() const;
|
||||
void Enabled(bool val);
|
||||
|
||||
@@ -40,6 +40,8 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
[default_interface] runtimeclass ExtensionPackageViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged
|
||||
{
|
||||
Microsoft.Terminal.Settings.Model.ExtensionPackage Package { get; };
|
||||
String DisplayName { get; };
|
||||
String Icon { get; };
|
||||
Boolean Enabled;
|
||||
String Scope { get; };
|
||||
String AccessibleName { get; };
|
||||
|
||||
@@ -500,7 +500,8 @@
|
||||
<muxc:Expander.Content>
|
||||
<StackPanel>
|
||||
<!-- Scope -->
|
||||
<local:SettingContainer x:Uid="Extensions_Scope"
|
||||
<local:SettingContainer x:Name="Scope"
|
||||
x:Uid="Extensions_Scope"
|
||||
Content="{x:Bind ViewModel.CurrentExtensionPackage.Scope, Mode=OneWay}"
|
||||
IsTabStop="False"
|
||||
Style="{StaticResource SettingContainerWithTextContent}" />
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_ViewModel = args.ViewModel().as<Editor::GlobalAppearanceViewModel>();
|
||||
BringIntoViewWhenLoaded(args.ElementToFocus());
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hTerminalSettingsEditorProvider,
|
||||
|
||||
@@ -5,7 +5,7 @@ import "GlobalAppearanceViewModel.idl";
|
||||
|
||||
namespace Microsoft.Terminal.Settings.Editor
|
||||
{
|
||||
[default_interface] runtimeclass GlobalAppearance : Windows.UI.Xaml.Controls.Page
|
||||
runtimeclass GlobalAppearance : Windows.UI.Xaml.Controls.Page
|
||||
{
|
||||
GlobalAppearance();
|
||||
GlobalAppearanceViewModel ViewModel { get; };
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
|
||||
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
||||
<!-- Theme -->
|
||||
<local:SettingContainer x:Uid="Globals_Theme">
|
||||
<local:SettingContainer x:Name="Theme"
|
||||
x:Uid="Globals_Theme">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemsSource="{x:Bind ViewModel.ThemeList, Mode=OneWay}"
|
||||
SelectedItem="{x:Bind ViewModel.CurrentTheme, Mode=TwoWay}"
|
||||
@@ -42,7 +43,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Position of new tab -->
|
||||
<local:SettingContainer x:Uid="Globals_NewTabPosition">
|
||||
<local:SettingContainer x:Name="NewTabPosition"
|
||||
x:Uid="Globals_NewTabPosition">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.NewTabPositionList, Mode=OneWay}"
|
||||
@@ -51,45 +53,52 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Show Titlebar -->
|
||||
<local:SettingContainer x:Uid="Globals_ShowTitlebar">
|
||||
<local:SettingContainer x:Name="ShowTitlebar"
|
||||
x:Uid="Globals_ShowTitlebar">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.ShowTabsInTitlebar, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}"
|
||||
Toggled="{x:Bind ViewModel.ShowTitlebarToggled}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Always show tabs -->
|
||||
<local:SettingContainer x:Uid="Globals_AlwaysShowTabs">
|
||||
<local:SettingContainer x:Name="AlwaysShowTabs"
|
||||
x:Uid="Globals_AlwaysShowTabs">
|
||||
<ToggleSwitch IsEnabled="{x:Bind mtu:Converters.InvertBoolean(ViewModel.ShowTabsInTitlebar), Mode=OneWay}"
|
||||
IsOn="{x:Bind ViewModel.AlwaysShowTabs, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Show tabs in full screen -->
|
||||
<local:SettingContainer x:Uid="Globals_ShowTabsFullscreen">
|
||||
<local:SettingContainer x:Name="ShowTabsFullscreen"
|
||||
x:Uid="Globals_ShowTabsFullscreen">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.ShowTabsFullscreen, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Show Acrylic in Tab Row -->
|
||||
<local:SettingContainer x:Uid="Globals_AcrylicTabRow">
|
||||
<local:SettingContainer x:Name="AcrylicTabRow"
|
||||
x:Uid="Globals_AcrylicTabRow">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.UseAcrylicInTabRow, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Show Title in Titlebar -->
|
||||
<local:SettingContainer x:Uid="Globals_ShowTitleInTitlebar">
|
||||
<local:SettingContainer x:Name="ShowTitleInTitlebar"
|
||||
x:Uid="Globals_ShowTitleInTitlebar">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.ShowTitleInTitlebar, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Always on Top -->
|
||||
<local:SettingContainer x:Uid="Globals_AlwaysOnTop">
|
||||
<local:SettingContainer x:Name="AlwaysOnTop"
|
||||
x:Uid="Globals_AlwaysOnTop">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AlwaysOnTop, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Tab Width Mode -->
|
||||
<local:SettingContainer x:Uid="Globals_TabWidthMode">
|
||||
<local:SettingContainer x:Name="TabWidthMode"
|
||||
x:Uid="Globals_TabWidthMode">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.TabWidthModeList, Mode=OneWay}"
|
||||
@@ -99,37 +108,43 @@
|
||||
|
||||
<!-- Disable Animations -->
|
||||
<!-- NOTE: the UID is "DisablePaneAnimationsReversed" not "DisablePaneAnimations". See GH#9124 for more details. -->
|
||||
<local:SettingContainer x:Uid="Globals_DisableAnimationsReversed">
|
||||
<local:SettingContainer x:Name="DisableAnimations"
|
||||
x:Uid="Globals_DisableAnimationsReversed">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.InvertedDisableAnimations, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Always Show Notification Icon -->
|
||||
<local:SettingContainer x:Uid="Globals_AlwaysShowNotificationIcon">
|
||||
<local:SettingContainer x:Name="AlwaysShowNotificationIcon"
|
||||
x:Uid="Globals_AlwaysShowNotificationIcon">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AlwaysShowNotificationIcon, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Minimize To Notification Area -->
|
||||
<local:SettingContainer x:Uid="Globals_MinimizeToNotificationArea">
|
||||
<local:SettingContainer x:Name="MinimizeToNotificationArea"
|
||||
x:Uid="Globals_MinimizeToNotificationArea">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.MinimizeToNotificationArea, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Automatically hide window -->
|
||||
<local:SettingContainer x:Uid="Globals_AutoHideWindow">
|
||||
<local:SettingContainer x:Name="AutoHideWindow"
|
||||
x:Uid="Globals_AutoHideWindow">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.AutoHideWindow, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Show Admin Shield -->
|
||||
<local:SettingContainer x:Uid="Globals_ShowAdminShield">
|
||||
<local:SettingContainer x:Name="ShowAdminShield"
|
||||
x:Uid="Globals_ShowAdminShield">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.ShowAdminShield, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Enable Unfocused Acrylic -->
|
||||
<local:SettingContainer x:Uid="Globals_EnableUnfocusedAcrylic">
|
||||
<local:SettingContainer x:Name="EnableUnfocusedAcrylic"
|
||||
x:Uid="Globals_EnableUnfocusedAcrylic">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.EnableUnfocusedAcrylic, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_ViewModel = args.ViewModel().as<Editor::InteractionViewModel>();
|
||||
BringIntoViewWhenLoaded(args.ElementToFocus());
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hTerminalSettingsEditorProvider,
|
||||
|
||||
@@ -27,13 +27,15 @@
|
||||
<StackPanel>
|
||||
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
||||
<!-- Copy On Select -->
|
||||
<local:SettingContainer x:Uid="Globals_CopyOnSelect">
|
||||
<local:SettingContainer x:Name="CopyOnSelect"
|
||||
x:Uid="Globals_CopyOnSelect">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.CopyOnSelect, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Copy Format -->
|
||||
<local:SettingContainer x:Uid="Globals_CopyFormat">
|
||||
<local:SettingContainer x:Name="CopyFormat"
|
||||
x:Uid="Globals_CopyFormat">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.CopyFormatList, Mode=OneWay}"
|
||||
@@ -42,19 +44,22 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Trim Block Selection -->
|
||||
<local:SettingContainer x:Uid="Globals_TrimBlockSelection">
|
||||
<local:SettingContainer x:Name="TrimBlockSelection"
|
||||
x:Uid="Globals_TrimBlockSelection">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.TrimBlockSelection, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Trim Paste -->
|
||||
<local:SettingContainer x:Uid="Globals_TrimPaste">
|
||||
<local:SettingContainer x:Name="TrimPaste"
|
||||
x:Uid="Globals_TrimPaste">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.TrimPaste, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Word Delimiters -->
|
||||
<local:SettingContainer x:Uid="Globals_WordDelimiters"
|
||||
<local:SettingContainer x:Name="WordDelimiters"
|
||||
x:Uid="Globals_WordDelimiters"
|
||||
CurrentValue="{x:Bind ViewModel.WordDelimiters, Mode=OneWay}"
|
||||
Style="{StaticResource ExpanderSettingContainerStyle}">
|
||||
<TextBox IsSpellCheckEnabled="False"
|
||||
@@ -63,13 +68,15 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Snap On Resize -->
|
||||
<local:SettingContainer x:Uid="Globals_SnapToGridOnResize">
|
||||
<local:SettingContainer x:Name="SnapToGridOnResize"
|
||||
x:Uid="Globals_SnapToGridOnResize">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.SnapToGridOnResize, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Tab Switcher Mode -->
|
||||
<local:SettingContainer x:Uid="Globals_TabSwitcherMode">
|
||||
<local:SettingContainer x:Name="TabSwitcherMode"
|
||||
x:Uid="Globals_TabSwitcherMode">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.TabSwitcherModeList}"
|
||||
@@ -78,31 +85,36 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Focus Follow Mouse Mode -->
|
||||
<local:SettingContainer x:Uid="Globals_FocusFollowMouse">
|
||||
<local:SettingContainer x:Name="FocusFollowMouse"
|
||||
x:Uid="Globals_FocusFollowMouse">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.FocusFollowMouse, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Enable Font Size Changes with Scrolling -->
|
||||
<local:SettingContainer x:Uid="Globals_ScrollToZoom">
|
||||
<local:SettingContainer x:Name="ScrollToZoom"
|
||||
x:Uid="Globals_ScrollToZoom">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.ScrollToZoom, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Enable Window Opacity Changes with Scrolling -->
|
||||
<local:SettingContainer x:Uid="Globals_ScrollToChangeOpacity">
|
||||
<local:SettingContainer x:Name="ScrollToChangeOpacity"
|
||||
x:Uid="Globals_ScrollToChangeOpacity">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.ScrollToChangeOpacity, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Detect URLs -->
|
||||
<local:SettingContainer x:Uid="Globals_DetectURLs">
|
||||
<local:SettingContainer x:Name="DetectURLs"
|
||||
x:Uid="Globals_DetectURLs">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.DetectURLs, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Search Web Default Query URL -->
|
||||
<local:SettingContainer x:Uid="Globals_SearchWebDefaultQueryUrl"
|
||||
<local:SettingContainer x:Name="SearchWebDefaultQueryUrl"
|
||||
x:Uid="Globals_SearchWebDefaultQueryUrl"
|
||||
CurrentValue="{x:Bind ViewModel.SearchWebDefaultQueryUrl, Mode=OneWay}"
|
||||
Style="{StaticResource ExpanderSettingContainerStyle}">
|
||||
<TextBox IsSpellCheckEnabled="False"
|
||||
@@ -111,7 +123,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Enable Color Selection -->
|
||||
<local:SettingContainer x:Uid="Globals_EnableColorSelection">
|
||||
<local:SettingContainer x:Name="EnableColorSelection"
|
||||
x:Uid="Globals_EnableColorSelection">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.EnableColorSelection, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
@@ -123,25 +136,29 @@
|
||||
Style="{StaticResource TextBlockSubHeaderStyle}" />
|
||||
|
||||
<!-- Close All Tabs Warning -->
|
||||
<local:SettingContainer x:Uid="Globals_ConfirmCloseAllTabs">
|
||||
<local:SettingContainer x:Name="ConfirmCloseAllTabs"
|
||||
x:Uid="Globals_ConfirmCloseAllTabs">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.ConfirmCloseAllTabs, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Input Service Warning -->
|
||||
<local:SettingContainer x:Uid="Globals_InputServiceWarning">
|
||||
<local:SettingContainer x:Name="InputServiceWarning"
|
||||
x:Uid="Globals_InputServiceWarning">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.InputServiceWarning, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Large Paste Warning -->
|
||||
<local:SettingContainer x:Uid="Globals_WarnAboutLargePaste">
|
||||
<local:SettingContainer x:Name="WarnAboutLargePaste"
|
||||
x:Uid="Globals_WarnAboutLargePaste">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.WarnAboutLargePaste, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Multi Line Paste Warning -->
|
||||
<local:SettingContainer x:Uid="Globals_WarnAboutMultiLinePaste">
|
||||
<local:SettingContainer x:Name="WarnAboutMultiLinePaste"
|
||||
x:Uid="Globals_WarnAboutMultiLinePaste">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind WarnAboutMultiLinePasteList}"
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_ViewModel = args.ViewModel().as<Editor::LaunchViewModel>();
|
||||
BringIntoViewWhenLoaded(args.ElementToFocus());
|
||||
auto innerViewModel{ winrt::get_self<Editor::implementation::LaunchViewModel>(_ViewModel) };
|
||||
/* coroutine dispatch */ innerViewModel->PrepareStartOnUserLoginSettings();
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
<StackPanel>
|
||||
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
||||
<!-- Default Profile -->
|
||||
<local:SettingContainer x:Uid="Globals_DefaultProfile">
|
||||
<ComboBox x:Name="DefaultProfile"
|
||||
ItemsSource="{x:Bind ViewModel.DefaultProfiles}"
|
||||
<local:SettingContainer x:Name="DefaultProfile"
|
||||
x:Uid="Globals_DefaultProfile">
|
||||
<ComboBox ItemsSource="{x:Bind ViewModel.DefaultProfiles}"
|
||||
SelectedItem="{x:Bind ViewModel.CurrentDefaultProfile, Mode=TwoWay}"
|
||||
Style="{StaticResource ComboBoxSettingStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -141,7 +141,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Language -->
|
||||
<local:SettingContainer x:Uid="Globals_Language">
|
||||
<local:SettingContainer x:Name="Language"
|
||||
x:Uid="Globals_Language">
|
||||
<ComboBox ItemsSource="{x:Bind ViewModel.LanguageList}"
|
||||
SelectedItem="{x:Bind ViewModel.CurrentLanguage, Mode=TwoWay}"
|
||||
Style="{StaticResource ComboBoxSettingStyle}">
|
||||
@@ -154,7 +155,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Language -->
|
||||
<local:SettingContainer x:Uid="Globals_DefaultInputScope">
|
||||
<local:SettingContainer x:Name="DefaultInputScope"
|
||||
x:Uid="Globals_DefaultInputScope">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.DefaultInputScopeList}"
|
||||
@@ -163,7 +165,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Start on User Login -->
|
||||
<local:SettingContainer x:Uid="Globals_StartOnUserLogin"
|
||||
<local:SettingContainer x:Name="StartOnUserLogin"
|
||||
x:Uid="Globals_StartOnUserLogin"
|
||||
HelpText="{x:Bind ViewModel.StartOnUserLoginStatefulHelpText, Mode=OneWay}"
|
||||
Visibility="{x:Bind ViewModel.StartOnUserLoginAvailable, Mode=OneTime}">
|
||||
<ToggleSwitch IsEnabled="{x:Bind ViewModel.StartOnUserLoginConfigurable, Mode=OneWay}"
|
||||
@@ -172,7 +175,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- First Window Behavior -->
|
||||
<local:SettingContainer x:Uid="Globals_FirstWindowPreference">
|
||||
<local:SettingContainer x:Name="FirstWindowPreference"
|
||||
x:Uid="Globals_FirstWindowPreference">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.FirstWindowPreferenceList}"
|
||||
@@ -181,7 +185,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Windowing Behavior -->
|
||||
<local:SettingContainer x:Uid="Globals_WindowingBehavior">
|
||||
<local:SettingContainer x:Name="WindowingBehavior"
|
||||
x:Uid="Globals_WindowingBehavior">
|
||||
<ComboBox AutomationProperties.AccessibilityView="Content"
|
||||
ItemTemplate="{StaticResource EnumComboBoxTemplate}"
|
||||
ItemsSource="{x:Bind ViewModel.WindowingBehaviorList}"
|
||||
@@ -190,7 +195,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Launch Size -->
|
||||
<local:SettingContainer x:Uid="Globals_LaunchSize"
|
||||
<local:SettingContainer x:Name="LaunchSize"
|
||||
x:Uid="Globals_LaunchSize"
|
||||
CurrentValue="{x:Bind ViewModel.LaunchSizeCurrentValue, Mode=OneWay}"
|
||||
Style="{StaticResource ExpanderSettingContainerStyle}">
|
||||
<Grid ColumnSpacing="12"
|
||||
@@ -233,7 +239,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Launch Parameters -->
|
||||
<local:SettingContainer x:Uid="Globals_LaunchParameters"
|
||||
<local:SettingContainer x:Name="LaunchParameters"
|
||||
x:Uid="Globals_LaunchParameters"
|
||||
CurrentValue="{x:Bind ViewModel.LaunchParametersCurrentValue, Mode=OneWay}"
|
||||
Style="{StaticResource ExpanderSettingContainerStyle}">
|
||||
<Grid RowSpacing="8">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@
|
||||
#include "Breadcrumb.g.h"
|
||||
#include "NavigateToPageArgs.g.h"
|
||||
#include "Utils.h"
|
||||
#include "SearchIndex.h"
|
||||
|
||||
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
@@ -27,16 +28,19 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
struct NavigateToPageArgs : NavigateToPageArgsT<NavigateToPageArgs>
|
||||
{
|
||||
public:
|
||||
NavigateToPageArgs(Windows::Foundation::IInspectable viewModel, Editor::IHostedInWindow windowRoot) :
|
||||
NavigateToPageArgs(Windows::Foundation::IInspectable viewModel, Editor::IHostedInWindow windowRoot, const hstring& elementToFocus = {}) :
|
||||
_ViewModel(viewModel),
|
||||
_WeakWindowRoot(windowRoot) {}
|
||||
_WeakWindowRoot(windowRoot),
|
||||
_ElementToFocus(elementToFocus) {}
|
||||
|
||||
Editor::IHostedInWindow WindowRoot() const noexcept { return _WeakWindowRoot.get(); }
|
||||
Windows::Foundation::IInspectable ViewModel() const noexcept { return _ViewModel; }
|
||||
hstring ElementToFocus() const noexcept { return _ElementToFocus; }
|
||||
|
||||
private:
|
||||
winrt::weak_ref<Editor::IHostedInWindow> _WeakWindowRoot{ nullptr };
|
||||
winrt::weak_ref<Editor::IHostedInWindow> _WeakWindowRoot;
|
||||
Windows::Foundation::IInspectable _ViewModel{ nullptr };
|
||||
hstring _ElementToFocus{};
|
||||
};
|
||||
|
||||
struct MainPage : MainPageT<MainPage>
|
||||
@@ -46,6 +50,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
void UpdateSettings(const Model::CascadiaSettings& settings);
|
||||
|
||||
safe_void_coroutine SettingsSearchBox_TextChanged(const Windows::UI::Xaml::Controls::AutoSuggestBox& sender, const Windows::UI::Xaml::Controls::AutoSuggestBoxTextChangedEventArgs& args);
|
||||
void SettingsSearchBox_QuerySubmitted(const Windows::UI::Xaml::Controls::AutoSuggestBox& sender, const Windows::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs& args);
|
||||
void SettingsSearchBox_SuggestionChosen(const Windows::UI::Xaml::Controls::AutoSuggestBox& sender, const Windows::UI::Xaml::Controls::AutoSuggestBoxSuggestionChosenEventArgs& args);
|
||||
|
||||
void SettingsNav_Loaded(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& args);
|
||||
void SettingsNav_ItemInvoked(const Microsoft::UI::Xaml::Controls::NavigationView& sender, const Microsoft::UI::Xaml::Controls::NavigationViewItemInvokedEventArgs& args);
|
||||
void SaveButton_Click(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& args);
|
||||
@@ -82,23 +90,30 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
void _AddProfileHandler(const winrt::guid profileGuid);
|
||||
|
||||
void _SetupProfileEventHandling(const winrt::Microsoft::Terminal::Settings::Editor::ProfileViewModel profile);
|
||||
void _SetupColorSchemesEventHandling();
|
||||
void _SetupActionsEventHandling();
|
||||
void _NavigateToProfileSubPage(const Editor::ProfileViewModel& profile, ProfileSubPage page, const IInspectable& breadcrumbTag, const hstring& elementToFocus);
|
||||
|
||||
void _PreNavigateHelper();
|
||||
void _Navigate(hstring clickedItemTag, BreadcrumbSubPage subPage);
|
||||
void _Navigate(const Editor::ProfileViewModel& profile, BreadcrumbSubPage subPage);
|
||||
void _Navigate(const Editor::NewTabMenuEntryViewModel& ntmEntryVM, BreadcrumbSubPage subPage);
|
||||
void _Navigate(const Editor::ExtensionPackageViewModel& extPkgVM, BreadcrumbSubPage subPage);
|
||||
void _Navigate(const IInspectable& vm, BreadcrumbSubPage subPage, hstring elementToFocus = {});
|
||||
void _NavigateToProfileHandler(const IInspectable& sender, winrt::guid profileGuid);
|
||||
void _NavigateToColorSchemeHandler(const IInspectable& sender, const IInspectable& args);
|
||||
Microsoft::UI::Xaml::Controls::NavigationViewItem _FindProfileNavItem(winrt::guid profileGuid) const;
|
||||
|
||||
void _UpdateBackgroundForMica();
|
||||
void _MoveXamlParsedNavItemsIntoItemSource();
|
||||
|
||||
safe_void_coroutine _UpdateSearchIndex();
|
||||
|
||||
winrt::Microsoft::Terminal::Settings::Editor::ProfileViewModel _profileDefaultsVM{ nullptr };
|
||||
Windows::Foundation::Collections::IVector<winrt::Microsoft::Terminal::Settings::Editor::ProfileViewModel> _profileVMs{ nullptr };
|
||||
winrt::Microsoft::Terminal::Settings::Editor::ColorSchemesPageViewModel _colorSchemesPageVM{ nullptr };
|
||||
winrt::Microsoft::Terminal::Settings::Editor::ActionsViewModel _actionsVM{ nullptr };
|
||||
winrt::Microsoft::Terminal::Settings::Editor::NewTabMenuViewModel _newTabMenuPageVM{ nullptr };
|
||||
winrt::Microsoft::Terminal::Settings::Editor::ExtensionsViewModel _extensionsVM{ nullptr };
|
||||
|
||||
Windows::Foundation::IAsyncOperation<Windows::Foundation::Collections::IObservableVector<Windows::Foundation::IInspectable>> _currentSearch{ nullptr };
|
||||
|
||||
Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker _profileViewModelChangedRevoker;
|
||||
Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker _colorSchemesPageViewModelChangedRevoker;
|
||||
Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker _actionsViewModelChangedRevoker;
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
{
|
||||
IHostedInWindow WindowRoot { get; };
|
||||
IInspectable ViewModel { get; };
|
||||
String ElementToFocus { get; };
|
||||
}
|
||||
|
||||
enum BreadcrumbSubPage
|
||||
|
||||
@@ -99,62 +99,85 @@
|
||||
</Grid>
|
||||
</muxc:NavigationView.Header>
|
||||
|
||||
<muxc:NavigationView.MenuItems>
|
||||
<muxc:NavigationView.AutoSuggestBox>
|
||||
<AutoSuggestBox x:Name="SettingsSearchBox"
|
||||
x:Uid="Nav_SearchBox"
|
||||
QueryIcon="Find"
|
||||
QuerySubmitted="SettingsSearchBox_QuerySubmitted"
|
||||
SuggestionChosen="SettingsSearchBox_SuggestionChosen"
|
||||
TextChanged="SettingsSearchBox_TextChanged">
|
||||
<AutoSuggestBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="local:FilteredSearchResult">
|
||||
<Grid HorizontalAlignment="Stretch"
|
||||
ColumnSpacing="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ContentPresenter Grid.Column="0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Content="{x:Bind Icon}" />
|
||||
<StackPanel Grid.Column="1"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock FontSize="{ThemeResource BodyTextBlockFontSize}"
|
||||
Foreground="{ThemeResource TextFillColorPrimary}"
|
||||
Text="{x:Bind Label}"
|
||||
TextTrimming="CharacterEllipsis" />
|
||||
<TextBlock FontSize="{ThemeResource CaptionTextBlockFontSize}"
|
||||
Foreground="{ThemeResource TextFillColorSecondary}"
|
||||
Text="{x:Bind SecondaryLabel}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(SecondaryLabel)}" />
|
||||
</StackPanel>
|
||||
|
||||
<ToolTipService.ToolTip>
|
||||
<StackPanel>
|
||||
<TextBlock FontSize="{ThemeResource CaptionTextBlockFontSize}"
|
||||
Foreground="{ThemeResource TextFillColorPrimary}"
|
||||
Text="{x:Bind Label}" />
|
||||
<TextBlock FontSize="{ThemeResource CaptionTextBlockFontSize}"
|
||||
Foreground="{ThemeResource TextFillColorSecondary}"
|
||||
Text="{x:Bind SecondaryLabel}"
|
||||
Visibility="{x:Bind mtu:Converters.StringNotEmptyToVisibility(SecondaryLabel)}" />
|
||||
</StackPanel>
|
||||
</ToolTipService.ToolTip>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</AutoSuggestBox.ItemTemplate>
|
||||
</AutoSuggestBox>
|
||||
</muxc:NavigationView.AutoSuggestBox>
|
||||
|
||||
<muxc:NavigationView.MenuItems>
|
||||
<muxc:NavigationViewItem x:Name="LaunchNavItem"
|
||||
x:Uid="Nav_Launch"
|
||||
Tag="Launch_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
</muxc:NavigationViewItem>
|
||||
Tag="Launch_Nav" />
|
||||
|
||||
<muxc:NavigationViewItem x:Name="InteractionNavItem"
|
||||
x:Uid="Nav_Interaction"
|
||||
Tag="Interaction_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
</muxc:NavigationViewItem>
|
||||
Tag="Interaction_Nav" />
|
||||
|
||||
<muxc:NavigationViewItem x:Name="AppearanceNavItem"
|
||||
x:Uid="Nav_Appearance"
|
||||
Tag="GlobalAppearance_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
</muxc:NavigationViewItem>
|
||||
Tag="GlobalAppearance_Nav" />
|
||||
|
||||
<muxc:NavigationViewItem x:Name="ColorSchemesNavItem"
|
||||
x:Uid="Nav_ColorSchemes"
|
||||
Tag="ColorSchemes_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
</muxc:NavigationViewItem>
|
||||
Tag="ColorSchemes_Nav" />
|
||||
|
||||
|
||||
<muxc:NavigationViewItem x:Name="RenderingNavItem"
|
||||
x:Uid="Nav_Rendering"
|
||||
Tag="Rendering_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
</muxc:NavigationViewItem>
|
||||
Tag="Rendering_Nav" />
|
||||
|
||||
<muxc:NavigationViewItem x:Name="CompatibilityNavItem"
|
||||
x:Uid="Nav_Compatibility"
|
||||
Tag="Compatibility_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
</muxc:NavigationViewItem>
|
||||
Tag="Compatibility_Nav" />
|
||||
|
||||
<muxc:NavigationViewItem x:Name="ActionsNavItem"
|
||||
x:Uid="Nav_Actions"
|
||||
Tag="Actions_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
<muxc:NavigationViewItem.InfoBadge>
|
||||
<muxc:InfoBadge Style="{StaticResource NewInfoBadge}"
|
||||
Visibility="{x:Bind ActionsVM.DisplayBadge, Mode=OneWay}" />
|
||||
@@ -163,42 +186,24 @@
|
||||
|
||||
<muxc:NavigationViewItem x:Name="NewTabMenuNavItem"
|
||||
x:Uid="Nav_NewTabMenu"
|
||||
Tag="NewTabMenu_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
</muxc:NavigationViewItem>
|
||||
Tag="NewTabMenu_Nav" />
|
||||
|
||||
<muxc:NavigationViewItem x:Name="ExtensionsNavItem"
|
||||
x:Uid="Nav_Extensions"
|
||||
Tag="Extensions_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
</muxc:NavigationViewItem>
|
||||
Tag="Extensions_Nav" />
|
||||
|
||||
<muxc:NavigationViewItemHeader x:Uid="Nav_Profiles" />
|
||||
|
||||
<muxc:NavigationViewItem x:Name="BaseLayerMenuItem"
|
||||
x:Uid="Nav_ProfileDefaults"
|
||||
Tag="GlobalProfile_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
</muxc:NavigationViewItem>
|
||||
|
||||
Tag="GlobalProfile_Nav" />
|
||||
</muxc:NavigationView.MenuItems>
|
||||
|
||||
<muxc:NavigationView.FooterMenuItems>
|
||||
<!-- The OpenJson item needs both Tapped and KeyDown handler -->
|
||||
<muxc:NavigationViewItem x:Name="OpenJsonNavItem"
|
||||
x:Uid="Nav_OpenJSON"
|
||||
SelectsOnInvoked="False"
|
||||
Tag="OpenJson_Nav">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon Glyph="" />
|
||||
</muxc:NavigationViewItem.Icon>
|
||||
</muxc:NavigationViewItem>
|
||||
Tag="OpenJson_Nav" />
|
||||
</muxc:NavigationView.FooterMenuItems>
|
||||
|
||||
<Grid>
|
||||
|
||||
@@ -93,6 +93,8 @@
|
||||
<DependentUpon>NewTabMenu.xaml</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="SearchIndex.h" />
|
||||
<ClInclude Include="NavConstants.h" />
|
||||
<ClInclude Include="MainPage.h">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</ClInclude>
|
||||
@@ -173,6 +175,8 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="Utils.h" />
|
||||
<ClInclude Include="PreviewConnection.h" />
|
||||
<ClInclude Include="$(GeneratedFilesDir)GeneratedSettingsIndex.g.h" />
|
||||
<ClInclude Include="../fzf/fzf.h" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= XAML files ======================== -->
|
||||
<ItemGroup>
|
||||
@@ -302,6 +306,7 @@
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SearchIndex.cpp" />
|
||||
<ClCompile Include="MainPage.cpp">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</ClCompile>
|
||||
@@ -384,6 +389,8 @@
|
||||
<ClCompile Include="PreviewConnection.cpp">
|
||||
<DependentUpon>PreviewConnection.h</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(GeneratedFilesDir)GeneratedSettingsIndex.g.cpp" />
|
||||
<ClCompile Include="../fzf/fzf.cpp" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= idl Files ======================== -->
|
||||
<ItemGroup>
|
||||
@@ -440,6 +447,7 @@
|
||||
<DependentUpon>Rendering.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Midl>
|
||||
<Midl Include="SearchIndex.idl" />
|
||||
<Midl Include="MainPage.idl">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</Midl>
|
||||
@@ -556,4 +564,10 @@
|
||||
<!-- This -must- go after cppwinrt.build.post.props because that includes many VS-provided props including appcontainer.common.props, which stomps on what cppwinrt.targets did. -->
|
||||
<Import Project="$(OpenConsoleDir)src\common.nugetversions.targets" />
|
||||
<Import Project="$(SolutionDir)build\rules\CollectWildcardResources.targets" />
|
||||
<Target Name="GenerateSettingsIndex"
|
||||
Inputs="@(Page);$(OpenConsoleDir)tools\GenerateSettingsIndex.ps1"
|
||||
Outputs="$(GeneratedFilesDir)GeneratedSettingsIndex.g.h;$(GeneratedFilesDir)GeneratedSettingsIndex.g.cpp"
|
||||
BeforeTargets="ClCompile">
|
||||
<Exec Command="pwsh.exe -NoProfile -ExecutionPolicy Unrestricted "$(OpenConsoleDir)tools\GenerateSettingsIndex.ps1" -SourceDir "$(MSBuildThisFileDirectory)." -OutputDir "$(MSBuildThisFileDirectory)$(GeneratedFilesDir)."" />
|
||||
</Target>
|
||||
</Project>
|
||||
40
src/cascadia/TerminalSettingsEditor/NavConstants.h
Normal file
40
src/cascadia/TerminalSettingsEditor/NavConstants.h
Normal file
@@ -0,0 +1,40 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <til/static_map.h>
|
||||
|
||||
// Navigation tags used to identify pages in the Settings UI NavigationView.
|
||||
// These tags are stored as the Tag property on NavigationViewItems.
|
||||
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
inline constexpr std::wstring_view openJsonTag{ L"OpenJson_Nav" };
|
||||
inline constexpr std::wstring_view launchTag{ L"Launch_Nav" };
|
||||
inline constexpr std::wstring_view interactionTag{ L"Interaction_Nav" };
|
||||
inline constexpr std::wstring_view renderingTag{ L"Rendering_Nav" };
|
||||
inline constexpr std::wstring_view compatibilityTag{ L"Compatibility_Nav" };
|
||||
inline constexpr std::wstring_view actionsTag{ L"Actions_Nav" };
|
||||
inline constexpr std::wstring_view newTabMenuTag{ L"NewTabMenu_Nav" };
|
||||
inline constexpr std::wstring_view extensionsTag{ L"Extensions_Nav" };
|
||||
inline constexpr std::wstring_view globalProfileTag{ L"GlobalProfile_Nav" };
|
||||
inline constexpr std::wstring_view addProfileTag{ L"AddProfile" };
|
||||
inline constexpr std::wstring_view colorSchemesTag{ L"ColorSchemes_Nav" };
|
||||
inline constexpr std::wstring_view globalAppearanceTag{ L"GlobalAppearance_Nav" };
|
||||
|
||||
// Map from navigation tags to Segoe MDL2 Assets icon glyphs
|
||||
inline constexpr til::static_map NavTagIconMap{
|
||||
std::pair{ launchTag, L"\xE7B5" }, /* Set Lock Screen */
|
||||
std::pair{ interactionTag, L"\xE7C9" }, /* Touch Pointer */
|
||||
std::pair{ globalAppearanceTag, L"\xE771" }, /* Personalize */
|
||||
std::pair{ colorSchemesTag, L"\xE790" }, /* Color */
|
||||
std::pair{ renderingTag, L"\xE7F8" }, /* Device Laptop No Pic */
|
||||
std::pair{ compatibilityTag, L"\xEC7A" }, /* Developer Tools */
|
||||
std::pair{ actionsTag, L"\xE765" }, /* Keyboard Classic */
|
||||
std::pair{ newTabMenuTag, L"\xE71D" }, /* All Apps */
|
||||
std::pair{ extensionsTag, L"\xEA86" }, /* Puzzle */
|
||||
std::pair{ globalProfileTag, L"\xE81E" }, /* Map Layers */
|
||||
std::pair{ addProfileTag, L"\xE710" }, /* Add */
|
||||
std::pair{ openJsonTag, L"\xE713" }, /* Settings */
|
||||
};
|
||||
}
|
||||
@@ -43,6 +43,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
const auto args = e.Parameter().as<Editor::NavigateToPageArgs>();
|
||||
_ViewModel = args.ViewModel().as<Editor::NewTabMenuViewModel>();
|
||||
_weakWindowRoot = args.WindowRoot();
|
||||
BringIntoViewWhenLoaded(args.ElementToFocus());
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hTerminalSettingsEditorProvider,
|
||||
|
||||
@@ -320,7 +320,8 @@
|
||||
<TextBlock x:Uid="NewTabMenu_CurrentFolderTextBlock"
|
||||
Style="{StaticResource TextBlockSubHeaderStyle}" />
|
||||
<!-- Name -->
|
||||
<local:SettingContainer x:Uid="NewTabMenu_CurrentFolderName"
|
||||
<local:SettingContainer x:Name="CurrentFolderName"
|
||||
x:Uid="NewTabMenu_CurrentFolderName"
|
||||
CurrentValue="{x:Bind ViewModel.CurrentFolderName, Mode=OneWay}"
|
||||
Style="{StaticResource ExpanderSettingContainerStyle}">
|
||||
<TextBox Style="{StaticResource TextBoxSettingStyle}"
|
||||
@@ -328,7 +329,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Icon -->
|
||||
<local:SettingContainer x:Uid="NewTabMenu_CurrentFolderIcon"
|
||||
<local:SettingContainer x:Name="CurrentFolderIcon"
|
||||
x:Uid="NewTabMenu_CurrentFolderIcon"
|
||||
CurrentValueAccessibleName="{x:Bind ViewModel.CurrentFolderLocalizedIcon, Mode=OneWay}"
|
||||
Style="{StaticResource ExpanderSettingContainerStyleWithComplexPreview}">
|
||||
<local:SettingContainer.CurrentValue>
|
||||
@@ -354,13 +356,15 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Inlining -->
|
||||
<local:SettingContainer x:Uid="NewTabMenu_CurrentFolderInlining">
|
||||
<local:SettingContainer x:Name="CurrentFolderInlining"
|
||||
x:Uid="NewTabMenu_CurrentFolderInlining">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.CurrentFolderInlining, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Allow Empty -->
|
||||
<local:SettingContainer x:Uid="NewTabMenu_CurrentFolderAllowEmpty">
|
||||
<local:SettingContainer x:Name="CurrentFolderAllowEmpty"
|
||||
x:Uid="NewTabMenu_CurrentFolderAllowEmpty">
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.CurrentFolderAllowEmpty, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingContainer>
|
||||
@@ -372,7 +376,8 @@
|
||||
Style="{StaticResource TextBlockSubHeaderStyle}" />
|
||||
|
||||
<!-- Add Profile -->
|
||||
<local:SettingContainer x:Uid="NewTabMenu_AddProfile"
|
||||
<local:SettingContainer x:Name="AddProfile"
|
||||
x:Uid="NewTabMenu_AddProfile"
|
||||
FontIconGlyph=""
|
||||
Style="{StaticResource SettingContainerWithIcon}">
|
||||
|
||||
@@ -421,7 +426,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Add Separator -->
|
||||
<local:SettingContainer x:Uid="NewTabMenu_AddSeparator"
|
||||
<local:SettingContainer x:Name="AddSeparator"
|
||||
x:Uid="NewTabMenu_AddSeparator"
|
||||
FontIconGlyph=""
|
||||
Style="{StaticResource SettingContainerWithIcon}">
|
||||
<Button x:Name="AddSeparatorButton"
|
||||
@@ -437,7 +443,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Add Folder -->
|
||||
<local:SettingContainer x:Uid="NewTabMenu_AddFolder"
|
||||
<local:SettingContainer x:Name="AddFolder"
|
||||
x:Uid="NewTabMenu_AddFolder"
|
||||
FontIconGlyph=""
|
||||
Style="{StaticResource SettingContainerWithIcon}">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
@@ -463,7 +470,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Add Match Profiles -->
|
||||
<local:SettingContainer x:Uid="NewTabMenu_AddMatchProfiles"
|
||||
<local:SettingContainer x:Name="AddMatchProfiles"
|
||||
x:Uid="NewTabMenu_AddMatchProfiles"
|
||||
FontIconGlyph=""
|
||||
Style="{StaticResource ExpanderSettingContainerStyleWithIcon}">
|
||||
<StackPanel Spacing="8">
|
||||
@@ -490,7 +498,8 @@
|
||||
</local:SettingContainer>
|
||||
|
||||
<!-- Add Remaining Profiles -->
|
||||
<local:SettingContainer x:Uid="NewTabMenu_AddRemainingProfiles"
|
||||
<local:SettingContainer x:Name="AddRemainingProfiles"
|
||||
x:Uid="NewTabMenu_AddRemainingProfiles"
|
||||
FontIconGlyph=""
|
||||
Style="{StaticResource SettingContainerWithIcon}">
|
||||
<Button x:Name="AddRemainingProfilesButton"
|
||||
|
||||
@@ -510,6 +510,25 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
return _folderTreeCache;
|
||||
}
|
||||
|
||||
Collections::IObservableVector<Editor::FolderEntryViewModel> NewTabMenuViewModel::FolderTreeFlatList() const
|
||||
{
|
||||
std::vector<Editor::FolderEntryViewModel> flatList;
|
||||
_FolderTreeFlatListImpl(_rootEntries, flatList);
|
||||
return single_threaded_observable_vector<Editor::FolderEntryViewModel>(std::move(flatList));
|
||||
}
|
||||
|
||||
void NewTabMenuViewModel::_FolderTreeFlatListImpl(const Windows::Foundation::Collections::IVector<Editor::NewTabMenuEntryViewModel>& entriesToAdd, std::vector<Editor::FolderEntryViewModel>& flatList)
|
||||
{
|
||||
for (const auto& entry : entriesToAdd)
|
||||
{
|
||||
if (const auto& folderVM = entry.try_as<Editor::FolderEntryViewModel>())
|
||||
{
|
||||
flatList.push_back(folderVM);
|
||||
_FolderTreeFlatListImpl(folderVM.Entries(), flatList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This recursively constructs the FolderTree
|
||||
FolderTreeViewEntry::FolderTreeViewEntry(Editor::FolderEntryViewModel folderEntry) :
|
||||
_folderEntry{ folderEntry },
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
Windows::Foundation::Collections::IObservableVector<Model::Profile> AvailableProfiles() const { return _Settings.AllProfiles(); }
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::FolderTreeViewEntry> FolderTree() const;
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::FolderEntryViewModel> FolderTreeFlatList() const;
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::NewTabMenuEntryViewModel> CurrentView() const;
|
||||
VIEW_MODEL_OBSERVABLE_PROPERTY(Editor::FolderEntryViewModel, CurrentFolder, nullptr);
|
||||
VIEW_MODEL_OBSERVABLE_PROPERTY(Editor::FolderTreeViewEntry, CurrentFolderTreeViewSelectedItem, nullptr);
|
||||
@@ -73,6 +74,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
Windows::Foundation::Collections::IObservableVector<Editor::NewTabMenuEntryViewModel>::VectorChanged_revoker _rootEntriesChangedRevoker;
|
||||
|
||||
static bool _IsRemainingProfilesEntryMissing(const Windows::Foundation::Collections::IVector<Editor::NewTabMenuEntryViewModel>& entries);
|
||||
static void _FolderTreeFlatListImpl(const Windows::Foundation::Collections::IVector<Editor::NewTabMenuEntryViewModel>& entriesToAdd, std::vector<Editor::FolderEntryViewModel>& flatList);
|
||||
void _FolderPropertyChanged(const IInspectable& sender, const Windows::UI::Xaml::Data::PropertyChangedEventArgs& args);
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user