Skip to content

Replace the unknown object icon with UTTypeItem - #170

Merged
dayglojesus merged 1 commit into
textmatelives:mainfrom
tagliala:fix/158-unknown-icon-item
Oct 27, 2026
Merged

dayglojesus merged 1 commit into
textmatelives:mainfrom
tagliala:fix/158-unknown-icon-item

Conversation

@tagliala

Copy link
Copy Markdown

Replace the HFS unknown object icon with the system "item" document icon, as chosen on #158.

Change

Three places drew kUnknownFSObjectIcon through the deprecated -[NSWorkspace iconForFileType:]. Each now uses [NSWorkspace.sharedWorkspace iconForContentType:UTTypeItem]:

Site When it is drawn
FileItemImage.mm a document that is not on disk, with no source control status
NSMenuItem Additions.mm -setIconForFile: for a path that does not exist and has no extension
OakTabBarView.mm an untitled tab in the tab overflow menu

The icon changes on purpose: no UTType reproduces the dashed placeholder. The new one is the system document with a "?", visible in both appearances.

Evidence

Recompiling the three files: 3 deprecation warnings on main, 0 here. ninja -C build TextMate passes.

Captures from the real code paths (CreateIconImageForURL and -[NSMenuItem setIconForFile:]), actual size and 4x:

Light Dark
Before (main) main, light main, dark
After item, light item, dark

Not covered

The tab overflow menu of untitled tabs showed no icon in any build on macOS 27, so there is no in-app capture of that site. It uses the same expression as the other two.

Fix #158

🤖 Generated with Claude Code

Three places drew the HFS unknown object icon through the deprecated
-[NSWorkspace iconForFileType:]: the file browser row of a document
that is not on disk, the Find dialog folder menus, and the tab overflow
menu. No UTType reproduces that icon, so the placeholder changes.

UTTypeItem is the system document icon with a question mark. It says
"not a file on disk", as the dashed placeholder did, and it stays
visible in light and dark appearance, where the old icon is almost
invisible. The choice was made on #158.

Recompiling the three files gives 0 deprecation warnings, from 3 on
main.

Fix #158

Written by Claude Sonnet 5.5 (claude-sonnet-5-5)

Reviewed by Claude Opus 5.5 (claude-opus-5-5)
Reviewed by Claude Fable 5.1 (claude-fable-5-1)
@tagliala
tagliala requested a review from dayglojesus as a code owner October 27, 2026 06:19
@dayglojesus
dayglojesus merged commit 58e0470 into textmatelives:main Oct 27, 2026
3 checks passed
@tagliala
tagliala deleted the fix/158-unknown-icon-item branch October 27, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace the HFS unknown-object icon in three places

2 participants