gtk+ r22433 - trunk/gdk-pixbuf



Author: matthiasc
Date: Sun Mar  1 07:39:03 2009
New Revision: 22433
URL: http://svn.gnome.org/viewvc/gtk+?rev=22433&view=rev

Log:
        * gdk-pixbuf-io.c (_gdk_pixbuf_get_module): If pure sniffing
        yields uncertain results, try again with the filename.
        Patch by Tyler Lawson



Modified:
   trunk/gdk-pixbuf/ChangeLog
   trunk/gdk-pixbuf/gdk-pixbuf-io.c

Modified: trunk/gdk-pixbuf/gdk-pixbuf-io.c
==============================================================================
--- trunk/gdk-pixbuf/gdk-pixbuf-io.c	(original)
+++ trunk/gdk-pixbuf/gdk-pixbuf-io.c	Sun Mar  1 07:39:03 2009
@@ -793,8 +793,11 @@
 	gchar **mimes;
 	gchar *type;
 	gint j;
+	gboolean uncertain;
 
-	mime_type = g_content_type_guess (NULL, buffer, size, NULL);
+	mime_type = g_content_type_guess (NULL, buffer, size, &uncertain);
+	if (uncertain)
+		mime_type = g_content_type_guess (filename, buffer, size, NULL);
 
 	for (modules = get_file_formats (); modules; modules = g_slist_next (modules)) {
 		GdkPixbufModule *module = (GdkPixbufModule *)modules->data;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]