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 568499 - CellRendererPixbuf stock-size property has wrong type
CellRendererPixbuf stock-size property has wrong type
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: general
2.13.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-20 23:43 UTC by Kai Willadsen
Modified: 2009-04-17 21:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
make pyg_enum_get_value handle longs too (785 bytes, patch)
2009-04-15 20:16 UTC, Paul Pogonyshev
committed Details | Review

Description Kai Willadsen 2009-01-20 23:43:49 UTC
I'm not sure what the actual bug is here... whether stock-size should be an int, enums should be allowed to be longs, or something else. Regardless, the following snippet illustrates the problem:

>>> import gtk
>>> r = gtk.CellRendererPixbuf()
>>> type(r.props.stock_size)
<type 'long'>
>>> width, height = gtk.icon_size_lookup(r.props.stock_size)
TypeError: enum values must be strings or ints
Comment 1 Paul Pogonyshev 2009-04-15 20:16:19 UTC
Created attachment 132726 [details] [review]
make pyg_enum_get_value handle longs too

I'm not sure if this is a really good fix, maybe the property could instead become int as you suggested, but given that 3.0 finally unifies ints and longs I do not care much.
Comment 2 Paul Pogonyshev 2009-04-17 21:05:00 UTC
2009-04-17  Paul Pogonyshev  <pogonyshev@gmx.net>

	Bug 568499 – CellRendererPixbuf stock-size property has wrong type

	* gobject/pygtype.c (pyg_enum_get_value): Also accept long
	integers.