[PR #11365] [MERGED] Replace the UWP file export with the shell32 one #28528

Open
opened 2026-01-31 09:29:05 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11365
Author: @zadjii-msft
Created: 9/29/2021
Status: Merged
Merged: 10/1/2021
Merged by: @undefined

Base: mainHead: dev/migrie/b/export-text-nits


📝 Commits (5)

  • abed501 Allows the dialog to be opened when elevated. moves some helpers around
  • d86e0c7 Make it act like a .txt export, in downloads
  • 1900bb8 comments
  • f848ba8 this is what I get for editing in VS
  • 23a2ca6 Yea I'm pretty sure we can disable this

📊 Changes

12 files changed (+140 additions, -84 deletions)

View changed files

📝 src/cascadia/TerminalApp/TabManagement.cpp (+36 -21)
📝 src/cascadia/TerminalSettingsEditor/Appearances.cpp (+2 -1)
📝 src/cascadia/TerminalSettingsEditor/Profiles.cpp (+2 -1)
📝 src/cascadia/TerminalSettingsEditor/Utils.cpp (+0 -24)
📝 src/cascadia/TerminalSettingsEditor/Utils.h (+0 -36)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp (+11 -0)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.h (+1 -0)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.idl (+2 -0)
src/cascadia/WinRTUtils/Utils.cpp (+33 -0)
📝 src/cascadia/WinRTUtils/WinRTUtils.vcxproj (+1 -0)
📝 src/cascadia/WinRTUtils/inc/Utils.h (+48 -0)
📝 src/cascadia/WinRTUtils/pch.h (+4 -1)

📄 Description

Just like in #9760, we can't actually use the UWP file picker API, because it will absolutely not work at all when the Terminal is running elevated. That would prevent the picker from appearing at all. So instead, we'll just use the shell32 one manually.

This also gets rid of the confirmation dialog, since the team felt we didn't really need that. We could maybe replace it with a Toast (#8592), but meh


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/11365 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 9/29/2021 **Status:** ✅ Merged **Merged:** 10/1/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/b/export-text-nits` --- ### 📝 Commits (5) - [`abed501`](https://github.com/microsoft/terminal/commit/abed501380672dfeca5e275de27377b6b6df8b16) Allows the dialog to be opened when elevated. moves some helpers around - [`d86e0c7`](https://github.com/microsoft/terminal/commit/d86e0c70cbe531cbf422fdfffcadf1d7903917d4) Make it act like a .txt export, in downloads - [`1900bb8`](https://github.com/microsoft/terminal/commit/1900bb8bb5817e7afc2da24bb6923a2fefd651b8) comments - [`f848ba8`](https://github.com/microsoft/terminal/commit/f848ba8a0df15a390b81a93bbf6f31ffe357b6cf) this is what I get for editing in VS - [`23a2ca6`](https://github.com/microsoft/terminal/commit/23a2ca6267aaee09527ff056f4a4bf22d12468e0) Yea I'm pretty sure we can disable this ### 📊 Changes **12 files changed** (+140 additions, -84 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/TabManagement.cpp` (+36 -21) 📝 `src/cascadia/TerminalSettingsEditor/Appearances.cpp` (+2 -1) 📝 `src/cascadia/TerminalSettingsEditor/Profiles.cpp` (+2 -1) 📝 `src/cascadia/TerminalSettingsEditor/Utils.cpp` (+0 -24) 📝 `src/cascadia/TerminalSettingsEditor/Utils.h` (+0 -36) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp` (+11 -0) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.idl` (+2 -0) ➕ `src/cascadia/WinRTUtils/Utils.cpp` (+33 -0) 📝 `src/cascadia/WinRTUtils/WinRTUtils.vcxproj` (+1 -0) 📝 `src/cascadia/WinRTUtils/inc/Utils.h` (+48 -0) 📝 `src/cascadia/WinRTUtils/pch.h` (+4 -1) </details> ### 📄 Description Just like in #9760, we can't actually use the UWP file picker API, because it will absolutely not work at all when the Terminal is running elevated. That would prevent the picker from appearing at all. So instead, we'll just use the shell32 one manually. This also gets rid of the confirmation dialog, since the team felt we didn't really need that. We could maybe replace it with a Toast (#8592), but _meh_ * [x] closes #11356 * [x] closes #11358 * This is a lot like #9760 * introduced in #11062 * megathread: #9700 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:29:05 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28528