diff --git a/ChangeLog b/ChangeLog index b62017718..0178bd423 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-05-10 Mike Kestner + + * gdk/Pixbuf.custom : use non-obsolete PixbufLoader.Write overload. + * gdk/PixbufLoader.custom : add obsolete PixbufLoader.Write overload + for the uint case for backcompat. Update other uses to the new ulong + overload. + * sample/GtkDemo/DemoImage.cs : use PixbufLoader.Write (byte[]) + overload. + 2005-05-09 Mike Kestner * glib/Object.cs : add a try/catch block to g_object_unref calls to diff --git a/doc/en/Gdk/PixbufLoader.xml b/doc/en/Gdk/PixbufLoader.xml index d0c41cf07..6e96f7464 100644 --- a/doc/en/Gdk/PixbufLoader.xml +++ b/doc/en/Gdk/PixbufLoader.xml @@ -625,5 +625,23 @@ If the value is , the image will be looked up on the call To be added + + + Method + + System.Boolean + + + + + + + Writes a Pixbuf to a buffer. + a + a + a + This overload is obsolete and has been replaced by a ulong version for 64 bit compatibility. + + diff --git a/gdk/PixbufLoader.custom b/gdk/PixbufLoader.custom index ca7137f6f..b3132ffc0 100644 --- a/gdk/PixbufLoader.custom +++ b/gdk/PixbufLoader.custom @@ -36,9 +36,15 @@ } } - public bool Write (byte[] bytes) + public bool Write (byte[] bytes) + { + return this.Write (bytes, (ulong) bytes.Length); + } + + [Obsolete ("Replaced by Write (byte[], ulong) for 64 bit portability")] + public bool Write (byte[] bytes, uint count) { - return this.Write (bytes, (uint) bytes.Length); + return this.Write (bytes, (ulong) count); } private void LoadFromStream (System.IO.Stream input) diff --git a/sample/GtkDemo/DemoImages.cs b/sample/GtkDemo/DemoImages.cs index fe634b53c..07ccae595 100644 --- a/sample/GtkDemo/DemoImages.cs +++ b/sample/GtkDemo/DemoImages.cs @@ -158,7 +158,7 @@ namespace GtkDemo if (imageStream.PeekChar () != -1) { byte[] bytes = imageStream.ReadBytes (256); - pixbufLoader.Write (bytes, (uint) bytes.Length); + pixbufLoader.Write (bytes); return true; // leave the timeout active } else { imageStream.Close ();