GNOME Bugzilla – Bug 568499
CellRendererPixbuf stock-size property has wrong type
Last modified: 2009-04-17 21:05:00 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
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.
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.