[Gtk-sharp-list] PixbufLoader.Pixbuf

Gonzalo Paniagua Javier gonzalo@ximian.com
15 Dec 2002 02:10:52 +0100


--=-XXvlBVV4llk5zH3h5EQ7
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi!

This is a patch that solves Pixbuf referencing problem when you get it
using PixbufLoader which is the case when the Pixbuf is loaded from a
resource file. The documentation of gdk_pixbuf_loader_get_pixbuf () says
that we should reference the GdkPixbuf returned to continue using it.

Mike, this fixes the crashes in monotalk.

May i commit?

-Gonzalo



--=-XXvlBVV4llk5zH3h5EQ7
Content-Description: 
Content-Disposition: attachment; filename=pixbufloader.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; charset=ISO-8859-1

Index: api/gdk-api.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/gtk-sharp/api/gdk-api.xml,v
retrieving revision 1.7
diff -u -r1.7 gdk-api.xml
--- api/gdk-api.xml	22 Nov 2002 03:30:17 -0000	1.7
+++ api/gdk-api.xml	15 Dec 2002 01:05:24 -0000
@@ -2841,7 +2841,7 @@
       <method name=3D"GetAnimation" cname=3D"gdk_pixbuf_loader_get_animati=
on">
         <return-type type=3D"GdkPixbufAnimation*"/>
       </method>
-      <method name=3D"GetPixbuf" cname=3D"gdk_pixbuf_loader_get_pixbuf">
+      <method name=3D"GetPixbuf" cname=3D"gdk_pixbuf_loader_get_pixbuf" ne=
eds_ref=3D"1">
         <return-type type=3D"GdkPixbuf*"/>
       </method>
       <method name=3D"GetType" cname=3D"gdk_pixbuf_loader_get_type" shared=
=3D"true">
Index: sources/Gdk.metadata
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/gtk-sharp/sources/Gdk.metadata,v
retrieving revision 1.8
diff -u -r1.8 Gdk.metadata
--- sources/Gdk.metadata	10 Nov 2002 10:09:05 -0000	1.8
+++ sources/Gdk.metadata	15 Dec 2002 01:05:24 -0000
@@ -137,4 +137,16 @@
=20
 </rule>
=20
+<rule>
+  <class name=3D"GdkPixbufLoader">
+  	<method>GetPixbuf</method>
+  </class>
+  <data>
+    <attribute target=3D"method">
+      <name>needs_ref</name>
+      <value>1</value>
+    </attribute>
+  </data>
+</rule>
+
 </metadata>

--=-XXvlBVV4llk5zH3h5EQ7--