- if(size)
- return save_rest(context, buf, size);
- else
- return context->needmore;
+ if(size) {
+ bv = save_rest(context, buf, size);
+ if (!bv) {
+ g_set_error (error,
+ GDK_PIXBUF_ERROR,
+ GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
+ _("Couldn't save the rest"));
+
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+void
+MODULE_ENTRY (wbmp, fill_vtable) (GdkPixbufModule *module)
+{
+ module->begin_load = gdk_pixbuf__wbmp_image_begin_load;
+ module->stop_load = gdk_pixbuf__wbmp_image_stop_load;
+ module->load_increment = gdk_pixbuf__wbmp_image_load_increment;
+}
+
+void
+MODULE_ENTRY (wbmp, fill_info) (GdkPixbufFormat *info)
+{
+ static GdkPixbufModulePattern signature[] = {
+ { " ", "z", 1 },
+ { NULL, NULL, 0 }
+ };
+ static gchar * mime_types[] = {
+ "image/vnd.wap.wbmp",
+ NULL
+ };
+ static gchar * extensions[] = {
+ "wbmp",
+ NULL
+ };
+
+ info->name = "wbmp";
+ info->signature = signature;
+ info->description = N_("The WBMP image format");
+ info->mime_types = mime_types;
+ info->extensions = extensions;
+ info->flags = GDK_PIXBUF_FORMAT_THREADSAFE;
+ info->license = "LGPL";