mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 06:32:10 +01:00
Look at old-style gnome mime icon names too, as many have not moved to the
2008-02-22 Alexander Larsson <alexl@redhat.com> * gcontenttype.c (g_content_type_get_icon): Look at old-style gnome mime icon names too, as many have not moved to the new style. svn path=/trunk/; revision=6557
This commit is contained in:
parent
e1a9179b0f
commit
5f6ccf9a3f
@ -1,3 +1,9 @@
|
||||
2008-02-22 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gcontenttype.c (g_content_type_get_icon):
|
||||
Look at old-style gnome mime icon names too, as many
|
||||
have not moved to the new style.
|
||||
|
||||
2008-02-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* *.c: Correct the @include in for section docs.
|
||||
|
@ -645,7 +645,7 @@ GIcon *
|
||||
g_content_type_get_icon (const char *type)
|
||||
{
|
||||
char *mimetype_icon, *generic_mimetype_icon, *p;
|
||||
char *icon_names[2];
|
||||
char *icon_names[3];
|
||||
GThemedIcon *themed_icon;
|
||||
|
||||
g_return_val_if_fail (type != NULL, NULL);
|
||||
@ -665,11 +665,14 @@ g_content_type_get_icon (const char *type)
|
||||
generic_mimetype_icon[(p - type) + strlen ("-x-generic")] = 0;
|
||||
|
||||
icon_names[0] = mimetype_icon;
|
||||
icon_names[1] = generic_mimetype_icon;
|
||||
/* Not all icons have migrated to the new icon theme spec, look for old names too */
|
||||
icon_names[1] = g_strconcat ("gnome-mime-", mimetype_icon, NULL);
|
||||
icon_names[2] = generic_mimetype_icon;
|
||||
|
||||
themed_icon = g_themed_icon_new_from_names (icon_names, 2);
|
||||
themed_icon = g_themed_icon_new_from_names (icon_names, 3);
|
||||
|
||||
g_free (mimetype_icon);
|
||||
g_free (icon_names[1]);
|
||||
g_free (generic_mimetype_icon);
|
||||
|
||||
return G_ICON (themed_icon);
|
||||
|
Loading…
x
Reference in New Issue
Block a user