> This looks like a bug in pygtk.  You should be able to fix it by editing
> generate/gtkmisc.defs, and finding the following section:
> (define-func gtk_pixmap_set
>   none
>   ((GtkPixmap pixmap)
>    (GdkPixmap val)
>    (GdkBitmap mask)))

> and change it to:
> (define-func gtk_pixmap_set
>   none
>   ((GtkPixmap pixmap)
>    (GdkPixmap val)
>    (GdkBitmap mask (null-ok))))

Another way without hacking into pygtk and thus making your program incompatible for
the rest of the world would be to check if Imlib returns None for the mask.
If this happens, you can create a mask by yourself:

  width, height = (img2.rgb_width, img2.rgb_height)
  mask = create_pixmap(None, width, height, 1)
  gc = mask.new_gc()
  gc.foreground = GdkColor(0, 0, 0, 0)
  draw_rectangle(mask, gc, TRUE, 0, 0, width, height)

This is the way I handle this.

Martin Grimme - http://www.pycage.de



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to