diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 39 | ||||
-rw-r--r-- | gdk-pixbuf/ChangeLog | 5 | ||||
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-io.c | 5 |
4 files changed, 49 insertions, 5 deletions
@@ -1,3 +1,8 @@ +2008-07-15 Matthias Clasen <mclasen@redhat.com> + + * configure.in: Add a test to see if GIO can sniff image data, + this should make gdk-pixbuf use its own sniffing again, on OS X. + 2008-07-15 Xavier Claessens <xclaesse@gmail.com> Bug 542523 – GtkTextTag should handle setting properties to NULL diff --git a/configure.in b/configure.in index a5e1ca097e..7c80aeb053 100644 --- a/configure.in +++ b/configure.in @@ -1015,6 +1015,45 @@ AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes]) # check one of the variables here AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes]) +AC_MSG_CHECKING([if gio can sniff png]) +gtk_save_LIBS="$LIBS" +gtk_save_CFLAGS="$CFLAGS" +LIBS="`$PKG_CONFIG --libs gio-2.0`" +CFLAGS="`$PKG_CONFIG --cflags gio-2.0`" +AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include <gio/gio.h> +static const gsize data_size = 159; +static const guint8 data[] = +{ + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, + 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00, + 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00, + 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, + 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74, + 0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, 0x0f, 0x10, 0x08, 0x15, 0x61, 0xd8, + 0x35, 0x37, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57, + 0x81, 0x0e, 0x17, 0x00, 0x00, 0x00, 0x0c, 0x49, 0x44, 0x41, 0x54, 0x08, + 0xd7, 0x63, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x05, 0xfe, 0x02, 0xfe, 0xdc, + 0xcc, 0x59, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, + 0x42, 0x60, 0x82 +}; +int +main (int argc, char **argv) +{ + char *content_type; + content_type = g_content_type_guess (NULL, data, data_size, NULL); + return strcmp (content_type, "image/png"); +}]])], + [gio_can_sniff=yes + AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])], + [gio_can_sniff=no]) +AC_MSG_RESULT($gio_can_sniff) +LIBS="$gtk_save_LIBS" +CFLAGS="$gtk_save_CFLAGS" + # # Allow building some or all immodules included # diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 2d6a730ddc..62ed4582c1 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +2008-07-15 Matthias Clasen <mclasen@redhat.com> + + * gdk-pixbuf-io.c: Move the check for wheter to use + GIO for sniffing to configure. + 2008-07-14 Matthias Clasen <mclasen@redhat.com> Bug 401985 – Documentation improvement for the diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index ea6f5293c1..e75fe98863 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -51,11 +51,6 @@ #define SNIFF_BUFFER_SIZE 4096 #define LOAD_BUFFER_SIZE 65536 -#ifndef G_OS_WIN32 -/* GIO doesn't do mime sniffing on Win32, so we need to do our own */ -#define GDK_PIXBUF_USE_GIO_MIME 1 -#endif - #ifndef GDK_PIXBUF_USE_GIO_MIME static gint format_check (GdkPixbufModule *module, guchar *buffer, int size) |