gdk-pixbuf/test-loaders.c (test_loader): Catch errors at close time.

gdk-pixbuf/test-loaders.c (main): Remove C++ comments.
demos/testpixbuf.c (update_timeout): Use gdk_pixbuf_loader_get_pixbuf
only in response to an area_prepared signal.
This commit is contained in:
Matthias Clasen
2001-08-28 19:06:58 +00:00
parent 306d137756
commit 61223e291d
10 changed files with 54 additions and 16 deletions

View File

@ -449,19 +449,15 @@ update_timeout(gpointer data)
}
} else { /* Really done */
GdkPixbuf *pixbuf = gdk_pixbuf_loader_get_pixbuf (status->loader);
new_testrgb_window (pixbuf, "After progressive load");
done = TRUE;
}
}
else
done = TRUE;
if (done) {
gtk_widget_queue_draw(*status->rgbwin);
/* ignoring errors, we should not do that. */
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader), NULL);
g_object_unref (G_OBJECT(status->loader));
gtk_widget_queue_draw (*status->rgbwin);
g_object_unref (G_OBJECT (status->loader));
fclose (status->imagefile);
g_free (status->buf);
}