Public bug reported:
Beginning with the version of GIO present in Intrepid Beta, the icons
for mimetypes have a wrong fallback order. This is caused by the
following snippet in glib2.0-2.18.1/gio/gcontenttype.c, function
g_content_type_get_icon:
G_LOCK (gio_xdgmime);
xdg_mimetype_icon = g_strdup (xdg_mime_get_icon (type));
G_UNLOCK (gio_xdgmime);
(...)
if (xdg_mimetype_icon)
icon_names[n++] = xdg_mimetype_icon;
icon_names[n++] = mimetype_icon;
icon_names[n++] = legacy_mimetype_icon;
icon_names[n++] = generic_mimetype_icon;
xdg_mime_get_icon is supposed to get the custom name of the icon for the
type specified by the user and defined in /usr/share/mime/icons. The
problem is that xdg_mime_get_icon automatically falls back to the
generic icon if there is no custom override defined by the user. As a
result all mimetypes that have a generic icon assigned completely ignore
specific mime icons from the theme (e.g. application-x-rar) and use the
generic icon instead (e.g. package-x-generic). This is described in more
detail in bug #279911 and bug #278113. Please note that this problem is
completely different from bug #217997, because we're speaking about
generic icons overriding specific icons from the same theme, not generic
icons from current theme overriding hicolor icons.
The fix is to remove this fallback mechanism from xdg_mime_get_icon, and
modify the above snippet to also use xdg_mime_get_generic_icon and use
the correct fallback order (1. XDG override, 2. specific mimetype icon,
3. legacy specific gnome-mime- icon, 4. XDG generic icon, 5. generic
mimetype icon (e.g. application-x-generic). The attached patch does
this. Note that xdg_mime_get_icon is only used in gcontenttype.c and
only once, so the change won't introduce any regressions.
** Affects: glib2.0 (Ubuntu)
Importance: Undecided
Status: New
--
Wrong fallback order of mimetype icons in GIO
https://bugs.launchpad.net/bugs/280867
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to glib2.0 in ubuntu.
--
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs