After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 77348 - gtk.Image set_from_pixmap - wrong parameter handling
gtk.Image set_from_pixmap - wrong parameter handling
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: general
1.99.x/2.0.x
Other All
: Normal minor
: pygtk-2.0
Assigned To: James Henstridge
James Henstridge
Depends on:
Blocks:
 
 
Reported: 2002-04-02 10:41 UTC by Peter Kese
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peter Kese 2002-04-02 10:41:45 UTC
gtk.Image.set_from_pixmap(pixmap,mask)...
                          ^^^^^^ ^^^^
Pygtk, requires both parameters to be GdkPixmaps.

This is wrong, because:
 1) Mask should be a GdkBitmap
 2) ither or both parameters can be None (NULL)
    according to Gtk specification. (Note that
    90% of calls to this function set pixmap
    only)

Also it would be nice to have the following function:
    gtk.image_new_from_file(...)
Comment 1 James Henstridge 2002-04-11 10:47:47 UTC
GdkBitmaps are GdkPixmaps (bitmaps are simply 1-bit pixmaps), so (1)
should not be an issue.  The second argument should definitely be
optional and allow None to be passed.

Why would you want to pass None as the first argument?
Comment 2 Peter Kese 2002-04-24 23:02:37 UTC
I don't know why one would like to set mask only (without pixmap),
but according to gtk documentation, both parameters are optional
(any can be specified as NULL).

Check:
http://developer.gnome.org/doc/API/2.0/gtk/gtkimage.html#GTK-IMAGE-SET
-FROM-PIXMAP
Comment 3 James Henstridge 2002-05-04 14:00:00 UTC
Checked in defs file change to allow None as a mask.  Unless there is
a good reason why you would want to pass None as the pixmap, I won't
add the null-ok flag for that parameter.