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 329639 - org.gnu.gtk.Image does not implement getPixbuf
org.gnu.gtk.Image does not implement getPixbuf
Status: RESOLVED FIXED
Product: java-gnome
Classification: Bindings
Component: GTK
mainline
Other Linux
: Normal normal
: ---
Assigned To: Adam Jocksch
java-gnome bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-02 17:04 UTC by Adam Jocksch
Modified: 2006-02-08 18:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
implementation of java methods (3.10 KB, patch)
2006-02-02 21:43 UTC, Adam Jocksch
none Details | Review
Revised patch (3.53 KB, patch)
2006-02-08 16:41 UTC, Adam Jocksch
none Details | Review

Description Adam Jocksch 2006-02-02 17:04:12 UTC
There is currently no way to get a pixbuf from an image, even though the gtk C bindings are in place
Comment 1 Adam Jocksch 2006-02-02 21:43:07 UTC
Created attachment 58611 [details] [review]
implementation of java methods

The methods for returning the image and image mask were also missing, are fixed in this patch.

Also the implementation of the C methods have been changed so that they add references to the objects being returned since we do not own them.
Comment 2 Adam Jocksch 2006-02-08 16:08:30 UTC
The above patch has been committed to CVS HEAD
Comment 3 Ismael Juma 2006-02-08 16:26:22 UTC
I'm sorry for not commenting earlier, but it seems to me that this patch is incorrect. The native side should be returning the value. I will discuss this further on IRC.
Comment 4 Adam Jocksch 2006-02-08 16:41:49 UTC
Created attachment 58947 [details] [review]
Revised patch

This revised patch has 2 jni methods, one for returning the image, the other for returning the bitmap
Comment 5 Ismael Juma 2006-02-08 17:09:46 UTC
I didn't check the javadoc, but can these methods return null? I am not sure if getGObjectFromHandle() is able to deal with a null input.

Otherwise, +1.
Comment 6 Adam Jocksch 2006-02-08 18:08:07 UTC
Have added checks to handle invalid calls to these functions (as per the gtk docs) and have committed the fix to CVS HEAD
Comment 7 Adam Jocksch 2006-02-08 18:14:45 UTC
Closing bug