[cp-patches] FYI: Some Image icon cleanups

Mark Wielaard mark at klomp.org
Wed Apr 4 22:57:45 UTC 2007


These are some cleanups for the GtkImage and setIconImage code. If an
GtkImage wasn't properly loaded and you tried to set it as Icon on a
Frame we could crash.

2007-04-04  Mark Wielaard  <mark at klomp.org>

       * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
       (cp_gtk_image_get_pixbuf): Return NULL when pointer is NULL.
       * gnu/java/awt/peer/gtk/GtkImage.java (setImage): Set loaded and
       call deliver() after pixels have been set.
       * gnu/java/awt/peer/gtk/GtkFramePeer.java (setIconImage): Only
       set icon when image has been properly loaded.

Christian, this hopefully solves the issue you reported on irc with
MegaMek. Could you test?

Thanks & Committed,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image-icon-fixlets.patch
Type: text/x-patch
Size: 2690 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20070405/e86e5422/image-icon-fixlets.bin

More information about the Classpath-patches mailing list