diff options
author | Owen Taylor <otaylor@src.gnome.org> | 2001-06-26 16:19:01 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-06-26 16:19:01 +0000 |
commit | 837b7120a81a4a64ece4dc361efba656641d091f (patch) | |
tree | d6b210fd337e6643259f848918c8f0b46126b880 /demos | |
parent | 671b3b0eb06ede434e5e64ff77e7444634cb59a1 (diff) | |
download | gtk+-837b7120a81a4a64ece4dc361efba656641d091f.tar.gz |
Revert inline-pixbuf changes until Tim comes back to fix missing files
Diffstat (limited to 'demos')
-rw-r--r-- | demos/Makefile.am | 8 | ||||
-rw-r--r-- | demos/testpixbuf.c | 20 |
2 files changed, 9 insertions, 19 deletions
diff --git a/demos/Makefile.am b/demos/Makefile.am index 5bcf5023cb..25eba72653 100644 --- a/demos/Makefile.am +++ b/demos/Makefile.am @@ -32,12 +32,10 @@ noinst_PROGRAMS = \ BUILT_SOURCES=test-inline-pixbufs.h -test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource apple-red.png gnome-foot.png +test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/make-inline-pixbuf apple-red.png gnome-foot.png (topdir=`cd $(top_builddir) && pwd` ; curdir=`pwd` ; \ - cd $(srcdir) && \ - GDK_PIXBUF_MODULEDIR=$$topdir/gdk-pixbuf/.libs \ - $$topdir/gdk-pixbuf/gdk-pixbuf-csource --build-list \ - apple_red apple-red.png gnome_foot gnome-foot.png >$$curdir/test-inline-pixbufs.h) + cd $(srcdir) && \ + GDK_PIXBUF_MODULEDIR=$$topdir/gdk-pixbuf/.libs $$topdir/gdk-pixbuf/make-inline-pixbuf $$curdir/test-inline-pixbufs.h apple_red apple-red.png gnome_foot gnome-foot.png) testpixbuf_DEPENDENCIES = $(DEPS) testpixbuf_drawable_DEPENDENCIES = $(DEPS) diff --git a/demos/testpixbuf.c b/demos/testpixbuf.c index a2ecbe1f08..0af6d368e9 100644 --- a/demos/testpixbuf.c +++ b/demos/testpixbuf.c @@ -543,8 +543,7 @@ main (int argc, char **argv) i = 1; if (argc == 1) { const gchar*** xpmp; - GError *error = NULL; - + pixbuf = gdk_pixbuf_new_from_data (default_image, GDK_COLORSPACE_RGB, FALSE, 8, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_WIDTH * 3, NULL, NULL); @@ -558,18 +557,11 @@ main (int argc, char **argv) } /* Test loading from inline data. */ - pixbuf = gdk_pixbuf_new_from_stream (-1, apple_red, FALSE, &error); - if (!pixbuf) - { - fprintf (stderr, "failed to construct \"red apple\" pixbuf: %s\n", - error->message); - g_error_free (error); - } - else - new_testrgb_window (pixbuf, "Red apple from inlined RLE data"); - - pixbuf = gdk_pixbuf_new_from_stream (sizeof (gnome_foot), gnome_foot, TRUE, NULL); - new_testrgb_window (pixbuf, "GNOME Foot from inlined RLE data"); + pixbuf = gdk_pixbuf_new_from_inline (apple_red, FALSE, -1, NULL); + new_testrgb_window (pixbuf, "Red apple from inline data"); + + pixbuf = gdk_pixbuf_new_from_inline (gnome_foot, TRUE, sizeof (gnome_foot), NULL); + new_testrgb_window (pixbuf, "Foot from inline data"); found_valid = TRUE; } else { |