[pygtk] Switching pixmaps using GtkPixmap.set()

James Henstridge james@daa.com.au
Thu, 2 Nov 2000 09:43:40 +0800 (WST)


On Mon, 30 Oct 2000, Tessa Lau wrote:

>  
> > Use "pix2, mask = img2.get_pixmap()" here instead of
> > make_pixmap().  Make_pixmap returns a new GtkPixmap widget rather than a
> > GdkPixmap/GdkBitmap pair.
> 
> That's closer... but that gives me this error:
> TypeError: gtk_pixmap_set, argument 3: expected GdkWindow, None found

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))))

James.