if (imageList != null) imageList.dispose (); imageList = null; if (image != null) { if (image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); imageList = new ImageList (); int imageIndex = imageList.add (image); int  pixbuf = imageList.getPixbuf (imageIndex); OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf); if (text.length () == 0) OS.gtk_widget_hide (labelHandle); OS.gtk_widget_show (imageHandle);
if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) { if (imageList != null) imageList.dispose (); imageList = null; if (image != null) { if (image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); imageList = new ImageList (); int imageIndex = imageList.add (image); int  pixbuf = imageList.getPixbuf (imageIndex); OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf); if (text.length () == 0) OS.gtk_widget_hide (labelHandle); OS.gtk_widget_show (imageHandle); } else { OS.gtk_image_set_from_pixbuf (imageHandle, 0); OS.gtk_widget_show (labelHandle); OS.gtk_widget_hide (imageHandle); }
public void setImage (Image image) {	super.setImage (image);	if (imageList != null) imageList.dispose ();	imageList = null;	if (image != null) {		if (image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);		imageList = new ImageList ();		int imageIndex = imageList.add (image);		int /*long*/ pixbuf = imageList.getPixbuf (imageIndex);		OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf);		if (text.length () == 0) OS.gtk_widget_hide (labelHandle);		OS.gtk_widget_show (imageHandle);	} else {		OS.gtk_image_set_from_pixbuf (imageHandle, 0);		OS.gtk_widget_show (labelHandle);		OS.gtk_widget_hide (imageHandle);	}}