* sample/GtkDemo/DemoImages.cs: Fix some crashers discovered while
trying to use this as a test case to figure out whether or not I'd broken Gtk#. Sigh. :) svn path=/trunk/gtk-sharp/; revision=36863
This commit is contained in:
parent
70d245e7fe
commit
ec0b40c343
2 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-11-30 Dan Winship <danw@novell.com>
|
||||||
|
|
||||||
|
* sample/GtkDemo/DemoImages.cs: Fix some crashers discovered while
|
||||||
|
trying to use this as a test case to figure out whether or not I'd
|
||||||
|
broken Gtk#. Sigh. :)
|
||||||
|
|
||||||
2004-11-30 Mike Kestner <mkestner@novell.com>
|
2004-11-30 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* glib/glue/value.c : add back some code lost in the merge of
|
* glib/glue/value.c : add back some code lost in the merge of
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace GtkDemo
|
||||||
{
|
{
|
||||||
public class DemoImages : Gtk.Window
|
public class DemoImages : Gtk.Window
|
||||||
{
|
{
|
||||||
private static Gtk.Image progressiveImage;
|
private Gtk.Image progressiveImage;
|
||||||
private VBox vbox;
|
private VBox vbox;
|
||||||
BinaryReader imageStream;
|
BinaryReader imageStream;
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ namespace GtkDemo
|
||||||
timeout_id = GLib.Timeout.Add (150, new GLib.TimeoutHandler (ProgressiveTimeout));
|
timeout_id = GLib.Timeout.Add (150, new GLib.TimeoutHandler (ProgressiveTimeout));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Gdk.PixbufLoader pixbufLoader;
|
Gdk.PixbufLoader pixbufLoader;
|
||||||
|
|
||||||
// TODO: Decide if we want to perform crazy error handling
|
// TODO: Decide if we want to perform crazy error handling
|
||||||
private bool ProgressiveTimeout ()
|
private bool ProgressiveTimeout ()
|
||||||
|
@ -162,14 +162,14 @@ namespace GtkDemo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ProgressivePreparedCallback (object obj, EventArgs args)
|
void ProgressivePreparedCallback (object obj, EventArgs args)
|
||||||
{
|
{
|
||||||
Gdk.Pixbuf pixbuf = pixbufLoader.Pixbuf;
|
Gdk.Pixbuf pixbuf = pixbufLoader.Pixbuf;
|
||||||
pixbuf.Fill (0xaaaaaaff);
|
pixbuf.Fill (0xaaaaaaff);
|
||||||
progressiveImage.FromPixbuf = pixbuf;
|
progressiveImage.FromPixbuf = pixbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ProgressiveUpdatedCallback (object obj, AreaUpdatedArgs args)
|
void ProgressiveUpdatedCallback (object obj, AreaUpdatedArgs args)
|
||||||
{
|
{
|
||||||
progressiveImage.QueueDraw ();
|
progressiveImage.QueueDraw ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue