diff options
author | Havoc Pennington <hp@redhat.com> | 2001-01-26 18:50:58 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-01-26 18:50:58 +0000 |
commit | d3f92415e6ce5bebe6fdd9071defb32303ebbb24 (patch) | |
tree | 660a32c40f8a9d175acf500f7bb5bbcc610a7450 | |
parent | 9234d911464115dc1d4f3e9154a7452bef1eb8d6 (diff) | |
download | gtk+-d3f92415e6ce5bebe6fdd9071defb32303ebbb24.tar.gz |
fix included modules case.
2001-01-26 Havoc Pennington <hp@redhat.com>
* gdk-pixbuf-io.c (mname): fix included modules case.
-rw-r--r-- | gdk-pixbuf/ChangeLog | 9 | ||||
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-io.c | 14 |
2 files changed, 19 insertions, 4 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index e9341230cf..cfcbd81f6c 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,12 @@ +2001-01-26 Havoc Pennington <hp@redhat.com> + + * gdk-pixbuf-io.c (mname): fix included modules case. + +2001-01-22 Havoc Pennington <hp@redhat.com> + + * gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): check errors + from gdk_pixbuf_load_module + 2001-01-22 Havoc Pennington <hp@redhat.com> * Makefile.am: Add built marshaller files to support diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index ef675dc068..f6c81af66f 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -322,7 +322,7 @@ gdk_pixbuf_load_module (GdkPixbufModule *image_module, } #else -#define mname(type,fn) gdk_pixbuf__ ## type ## _image_ ##fn +#define mname(type,fn) gdk_pixbuf__ ## type ## _ ##fn #define m_fill_vtable(type) extern void mname(type,fill_vtable) (GdkPixbufModule *module) m_fill_vtable (png); @@ -602,10 +602,16 @@ gdk_pixbuf_new_from_xpm_data (const char **data) { GdkPixbuf *(* load_xpm_data) (const char **data); GdkPixbuf *pixbuf; + GError *error = NULL; - if (file_formats[XPM_FILE_FORMAT_INDEX].module == NULL) - gdk_pixbuf_load_module (&file_formats[XPM_FILE_FORMAT_INDEX], NULL); - + if (file_formats[XPM_FILE_FORMAT_INDEX].module == NULL) { + if (!gdk_pixbuf_load_module (&file_formats[XPM_FILE_FORMAT_INDEX], &error)) { + g_warning ("Error loading XPM image loader: %s", error->message); + g_error_free (error); + return FALSE; + } + } + if (file_formats[XPM_FILE_FORMAT_INDEX].module == NULL) { g_warning ("Can't find gdk-pixbuf module for parsing inline XPM data"); return NULL; |