GNOME Bugzilla – Bug 586762
Revise icon fallback logic for device icons on "-" tokens
Last modified: 2018-02-10 03:23:56 UTC
I need to set the icon for a GVFS backend mount to "multimedia-player-apple-ipod-touch" as defined by the fd icon spec in order to show the corresponding device icon in Nautilus. Nautilus uses gtk_icon_theme_lookup_icon() with the GENERIC_FALLBACK option to allow fallbacks along tokens split by "-". I have installed my "multimedia-player-apple-ipod-touch" icons to the hicolor "general" theme in the correct folders. The call to gtk_icon_theme_lookup_icon(..."multimedia-player-apple-ipod-touch"...) with the GENERIC_FALLBACK flag always ends up showing the "multimedia-player" icon, despite having installed the correct device icons to the hicolor theme! To make it funny, if you do not pass the GENERIC_FALLBACK flag the icon is found, since the code path jumps to also check the fallback icon theme for the icon down to the hicolor theme. Note that the behavior so far is not really a bug but rather a feature. However, it is not necessarily the expected behavior nor it's implications are helpful regarding efficient reuse of device specific icons. The issue becomes even more prominent if you pick a scenario where the gnome-icon-theme has a lot of nice device specific icons and you have set a different theme on your desktop. Then all icons would show up with generic icons despite there might be hundreds of nice device specific icons usable from gnome-icon-theme which acts as a "fallback theme" if icons are not found in the current theme.
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.