diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-07-23 04:20:15 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-07-23 04:20:15 +0000 |
commit | 830a9d27109c68e0c40c3caa5fed94304fef1358 (patch) | |
tree | 2c40677ed8975c02ce5bf0f4431fe9f16f75c4cc /gdk-pixbuf | |
parent | 7551360c1e76b9f0fd3c981639e22d2ffc9aba14 (diff) | |
download | gtk+-830a9d27109c68e0c40c3caa5fed94304fef1358.tar.gz |
More correct content type handling
svn path=/trunk/; revision=20897
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r-- | gdk-pixbuf/ChangeLog | 5 | ||||
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-io.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index d1ef0ba8ad..9fc9f93390 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +2008-07-23 Matthias Clasen <mclasen@redhat.com> + + * gdk-pixbuf-io.c (_gdk_pixbuf_get_module): Compare two content + types, not content type and mime type. + 2008-07-21 Matthias Clasen <mclasen@redhat.com> * === Released 2.13.5 === diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index e75fe98863..b5a8222856 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -770,6 +770,7 @@ _gdk_pixbuf_get_module (guchar *buffer, guint size, #ifdef GDK_PIXBUF_USE_GIO_MIME gchar *mime_type; gchar **mimes; + gchar *type; gint j; mime_type = g_content_type_guess (filename, buffer, size, NULL); @@ -783,10 +784,13 @@ _gdk_pixbuf_get_module (guchar *buffer, guint size, mimes = info->mime_types; for (j = 0; mimes[j] != NULL; j++) { - if (g_ascii_strcasecmp (mimes[j], mime_type) == 0) { + type = g_content_type_from_mime_type (mimes[j]); + if (g_ascii_strcasecmp (type, mime_type) == 0) { + g_free (type); selected = module; break; } + g_free (type); } } g_free (mime_type); |