[PR #15221] [MERGED] Add jump list support for indirect icon references #30512

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/15221
Author: @jamespack
Created: 4/21/2023
Status: Merged
Merged: 4/26/2023
Merged by: @DHowett

Base: mainHead: terminal-15205


📝 Commits (5)

  • 93600b9 If given an indirect icon path parse it and use a different API to set the jumplist entry icon.
  • e4bd2e4 Small refactor
  • c4d4062 convert to long instead of ulong to account for signed numbers in the case of a resource id
  • c259d9a Implement to_int in terms of to_long to support both icon indexes and ids. Default to 0 if we have a binary path but no index.
  • 980a10a Check if value returned from to_long will fit in an int data type. Return to_int_error if not

📊 Changes

3 files changed (+51 additions, -9 deletions)

View changed files

📝 src/cascadia/TerminalApp/Jumplist.cpp (+27 -6)
📝 src/cascadia/TerminalSettingsModel/IconPathConverter.cpp (+3 -3)
📝 src/inc/til/string.h (+21 -0)

📄 Description

Adds support to jump list generation for icon paths that include an indirect reference e.g. c:\windows\system32\shell32.dll,214

If given a path that has an indirect icon reference parse the path into component parts filePath and iconIndex and use IShellLinkW::SetIconLocation to set the Icon for the entry. Otherwise do what we always do.

This PR also introduces til::to_int, which is based on til::to_ulong and supports signed integers.

Validation Steps Performed

Icons were visible in the jump list and in terminal next to the profiles.

Closes #15205


🔄 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/15221 **Author:** [@jamespack](https://github.com/jamespack) **Created:** 4/21/2023 **Status:** ✅ Merged **Merged:** 4/26/2023 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `terminal-15205` --- ### 📝 Commits (5) - [`93600b9`](https://github.com/microsoft/terminal/commit/93600b95912610b2b3bd56422c9a36b479e33ce1) If given an indirect icon path parse it and use a different API to set the jumplist entry icon. - [`e4bd2e4`](https://github.com/microsoft/terminal/commit/e4bd2e47b4fe2d27340713771c89dda39adb1fbf) Small refactor - [`c4d4062`](https://github.com/microsoft/terminal/commit/c4d406290eb6c1611af067db3a62717e0404c416) convert to long instead of ulong to account for signed numbers in the case of a resource id - [`c259d9a`](https://github.com/microsoft/terminal/commit/c259d9a0a4cf6f8e678202d502a32ca120eea632) Implement to_int in terms of to_long to support both icon indexes and ids. Default to 0 if we have a binary path but no index. - [`980a10a`](https://github.com/microsoft/terminal/commit/980a10a81b7f2ac08d91158a628f2833af811036) Check if value returned from to_long will fit in an int data type. Return to_int_error if not ### 📊 Changes **3 files changed** (+51 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/Jumplist.cpp` (+27 -6) 📝 `src/cascadia/TerminalSettingsModel/IconPathConverter.cpp` (+3 -3) 📝 `src/inc/til/string.h` (+21 -0) </details> ### 📄 Description Adds support to jump list generation for icon paths that include an indirect reference e.g. `c:\windows\system32\shell32.dll,214` If given a path that has an indirect icon reference parse the path into component parts `filePath` and `iconIndex` and use `IShellLinkW::SetIconLocation` to set the Icon for the entry. Otherwise do what we always do. This PR also introduces `til::to_int`, which is based on `til::to_ulong` and supports signed integers. ## Validation Steps Performed Icons were visible in the jump list and in terminal next to the profiles. Closes #15205 --- <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:41:17 +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#30512