Skip to content

Add fallbacks for icon names only the Mint themes provide - #13995

Open
Fantu wants to merge 1 commit into
linuxmint:masterfrom
Fantu:standard-icon-names
Open

Fantu wants to merge 1 commit into
linuxmint:masterfrom
Fantu:standard-icon-names

Conversation

@Fantu

@Fantu Fantu commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

A few of the icon names Cinnamon asks for are not part of the freedesktop Icon Naming Specification and are provided by Mint-X and Mint-Y only. On a distribution that ships a different default icon theme they resolve to nothing and the GTK "missing image" icon is drawn instead.

This was reported on Debian as #1147525: the Recent Files category of the menu applet is missing its icon with every icon theme available there (gnome, mate, Adwaita, ContrastHigh).

Rather than replacing the names — which would change how these icons look on Mint — this asks for a GIcon with a list of names, keeping the current name first and adding a fallback that exists everywhere:

first choice (unchanged) fallback where
folder-recent document-open-recent "Recent Files" category of the menu applet
gnome-panel-launcher cinnamon-panel-launcher launchers with no icon of their own
application-default-icon application-x-executable windows with no application icon (window list, grouped window list, alt-tab, workspace overview)

Both fallbacks of the first kind are in the naming spec; cinnamon-panel-launcher is installed by Cinnamon itself from data/icons, and is already the icon panel-launchers@cinnamon.org declares for itself.

Verified with GtkIconTheme.lookup_by_gicon:

  • Mint-XMint-X/places/48/folder-recent.svg, Mint-X/apps/48/gnome-panel-launcher.png, Mint-X/apps/48/application-default-icon.png — all unchanged.
  • Mint-YMint-Y/places/48/folder-recent.png, Mint-Y/apps/48/gnome-panel-launcher.png — unchanged; application-x-executable for the third one, which Mint-Y does not have under the old name either (so this is a missing icon on Mint too, now fixed).
  • mate-icon-theme (the Debian default) → document-open-recent, cinnamon-panel-launcher, application-x-executable instead of nothing.

Two notes:

  • The symbolic category icons of the menu applet are unaffected: get_names()[0] is still folder-recent, so the "xsi-" + icon mapping keeps resolving to xsi-folder-recent-symbolic.
  • The "icon" fields of the applet/desklet metadata are deliberately left alone — ExtensionCore already checks has_icon() and falls back to cs-applets/cs-desklets, so those never show a broken icon.

A few of the icon names Cinnamon asks for are not part of the
freedesktop Icon Naming Specification and are provided by Mint-X and
Mint-Y only, so on a distribution shipping a different default icon
theme they resolve to nothing and the GTK "missing image" icon is drawn
instead. This was reported on Debian as https://bugs.debian.org/1147525
for the "Recent Files" category of the menu applet, which is missing its
icon with every icon theme available there.

Ask for a GIcon with a list of names instead of a single name, keeping
the current name first so that nothing changes where it exists, and
adding a name from the specification (or one of the icons Cinnamon
itself installs into hicolor) as the fallback:

- folder-recent, then document-open-recent, for the "Recent Files"
category of the menu applet.
- gnome-panel-launcher, then cinnamon-panel-launcher, for launchers with
no icon of their own. cinnamon-panel-launcher is installed from
data/icons and is already the icon panel-launchers@cinnamon.org declares
for itself.
- application-default-icon, then application-x-executable, for windows
with no application icon (window list, grouped window list, alt-tab and
the workspace overview). application-default-icon is in Mint-X but not
in Mint-Y, so this one is a missing icon on Mint too.

Verified with GtkIconTheme.lookup_by_gicon: with Mint-X and Mint-Y all
three keep resolving to exactly the same theme icons as before, while
with mate-icon-theme (the default on Debian) they now resolve to
document-open-recent, cinnamon-panel-launcher and
application-x-executable instead of failing. The symbolic category icons
of the menu applet are unaffected: get_names()[0] is still
folder-recent, so the "xsi-" + icon mapping keeps picking
xsi-folder-recent-symbolic.

The "icon" fields of the applet and desklet metadata are left alone on
purpose: ExtensionCore already checks has_icon() and falls back to
cs-applets/cs-desklets there, so those never show a broken icon.

Assisted-by: Claude Code:claude-opus-5
@JosephMcc

Copy link
Copy Markdown
Contributor

The proper fix is for Cinnamon to ship any non-standard icon it uses as part of it's packaging or include it in one of it's dependencies, like xapp.

@Fantu

Fantu commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

That is already what one of the three cases does: the panel launcher fallback here is
cinnamon-panel-launcher, which Cinnamon ships from data/icons and which
panel-launchers@cinnamon.org already declares as its own icon. No new artwork needed
there.

For the other two I would argue the name list is the better fix, because of how GTK
resolves a GIcon: theme by theme, not name by name. It tries every name in the current
theme (and its inherited ones) before falling through to hicolor. With a folder-recent
shipped in hicolor and mate as the icon theme:

Gio.ThemedIcon.new_from_names(["folder-recent", "document-open-recent"])
  → /usr/share/icons/mate/48x48/actions/document-open-recent.png

So a shipped icon always beats a theme that has the specification name, and the user ends
up with our icon sitting among icons drawn in a different style. With the name list the
theme keeps the first word — Mint-X/Mint-Y through folder-recent, other themes through
document-open-recent — and the result stays visually consistent either way. Both
folder-recent and application-default-icon do have an equivalent in the naming
specification, unlike cs-* or cinnamon-panel-launcher, which are genuinely Cinnamon's
own.

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.

2 participants