]> Pileus Git - ~andy/gtk/commitdiff
use gdk_pixbuf_new_from_stream(). fixed up item factory so inlined pixbufs
authorTim Janik <timj@gtk.org>
Tue, 26 Jun 2001 08:32:25 +0000 (08:32 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 26 Jun 2001 08:32:25 +0000 (08:32 +0000)
Tue Jun 26 10:04:30 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkiconfactory.c:
        * gtk/gtkitemfactory.c: use gdk_pixbuf_new_from_stream(). fixed up
        item factory so inlined pixbufs actually work.

Tue Jun 26 09:48:02 2001  Tim Janik  <timj@gtk.org>

        * Makefile.am (noinst_PROGRAMS): get rid of make-inline-pixbuf

        * gdk-pixbuf-data.[hc]: provide gdk_pixbuf_new_from_stream()
        instead from gdk_pixbuf_new_from_inline().

        * gdk-pixdata.[hc]: auxillary GdkPixdata structure, public
        installed API for applications that need to serialize/deserialize
        on their own (gimp, BEAST).

        * gdk-pixbuf/gdk-pixbuf-csource.c: provide publically installed
        program that can dump images in CSource format and Pixbuf
        stream format. supports RLE encoding, MACRO formatting etc...
        invoke with --help.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
demos/Makefile.am
demos/testpixbuf.c

index 160bf460d0ba3f8709dc21545db038cdd97e21ca..07d8094789c38c4ca8e1bb80bf4de02d91a7dab8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jun 26 10:04:30 2001  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkiconfactory.c:
+       * gtk/gtkitemfactory.c: use gdk_pixbuf_new_from_stream(). fixed up
+       item factory so inlined pixbufs actually work.
+
 2001-06-25  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeviewcolumn.h, gtk/gtktreeviewcolumn.c:
index 160bf460d0ba3f8709dc21545db038cdd97e21ca..07d8094789c38c4ca8e1bb80bf4de02d91a7dab8 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun 26 10:04:30 2001  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkiconfactory.c:
+       * gtk/gtkitemfactory.c: use gdk_pixbuf_new_from_stream(). fixed up
+       item factory so inlined pixbufs actually work.
+
 2001-06-25  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeviewcolumn.h, gtk/gtktreeviewcolumn.c:
index 160bf460d0ba3f8709dc21545db038cdd97e21ca..07d8094789c38c4ca8e1bb80bf4de02d91a7dab8 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun 26 10:04:30 2001  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkiconfactory.c:
+       * gtk/gtkitemfactory.c: use gdk_pixbuf_new_from_stream(). fixed up
+       item factory so inlined pixbufs actually work.
+
 2001-06-25  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeviewcolumn.h, gtk/gtktreeviewcolumn.c:
index 160bf460d0ba3f8709dc21545db038cdd97e21ca..07d8094789c38c4ca8e1bb80bf4de02d91a7dab8 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun 26 10:04:30 2001  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkiconfactory.c:
+       * gtk/gtkitemfactory.c: use gdk_pixbuf_new_from_stream(). fixed up
+       item factory so inlined pixbufs actually work.
+
 2001-06-25  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeviewcolumn.h, gtk/gtktreeviewcolumn.c:
index 160bf460d0ba3f8709dc21545db038cdd97e21ca..07d8094789c38c4ca8e1bb80bf4de02d91a7dab8 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun 26 10:04:30 2001  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkiconfactory.c:
+       * gtk/gtkitemfactory.c: use gdk_pixbuf_new_from_stream(). fixed up
+       item factory so inlined pixbufs actually work.
+
 2001-06-25  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeviewcolumn.h, gtk/gtktreeviewcolumn.c:
index 160bf460d0ba3f8709dc21545db038cdd97e21ca..07d8094789c38c4ca8e1bb80bf4de02d91a7dab8 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun 26 10:04:30 2001  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkiconfactory.c:
+       * gtk/gtkitemfactory.c: use gdk_pixbuf_new_from_stream(). fixed up
+       item factory so inlined pixbufs actually work.
+
 2001-06-25  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeviewcolumn.h, gtk/gtktreeviewcolumn.c:
index 160bf460d0ba3f8709dc21545db038cdd97e21ca..07d8094789c38c4ca8e1bb80bf4de02d91a7dab8 100644 (file)
@@ -1,3 +1,9 @@
+Tue Jun 26 10:04:30 2001  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkiconfactory.c:
+       * gtk/gtkitemfactory.c: use gdk_pixbuf_new_from_stream(). fixed up
+       item factory so inlined pixbufs actually work.
+
 2001-06-25  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktreeviewcolumn.h, gtk/gtktreeviewcolumn.c:
index 25eba726532215e09b6486b7c7b68d7b1c8c2b9e..5bcf5023cbb1d7ddd9bf04305db1351b40fad37c 100644 (file)
@@ -32,10 +32,12 @@ noinst_PROGRAMS =           \
 
 BUILT_SOURCES=test-inline-pixbufs.h
 
-test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/make-inline-pixbuf apple-red.png gnome-foot.png
+test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource 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/make-inline-pixbuf $$curdir/test-inline-pixbufs.h  apple_red apple-red.png gnome_foot gnome-foot.png)
+         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)
 
 testpixbuf_DEPENDENCIES = $(DEPS)
 testpixbuf_drawable_DEPENDENCIES = $(DEPS)
index 0af6d368e93b40a764ccc5a70c9097feda094fc0..a2ecbe1f089615058ca68afe3c83321e850b4ce1 100644 (file)
@@ -543,7 +543,8 @@ 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);
@@ -557,11 +558,18 @@ main (int argc, char **argv)
                 }
 
                 /* Test loading from inline 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");
+                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");
                 
                found_valid = TRUE;
        } else {