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 652697 - bindings can't create stock items, gtk_stock_item_new is needed
bindings can't create stock items, gtk_stock_item_new is needed
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
3.0.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
: 684515 684532 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-06-16 08:03 UTC by Benny Malengier
Modified: 2014-01-25 03:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benny Malengier 2011-06-16 08:03:30 UTC
The struct GtkStockItem cannot be set from introspected bindings. Eg with python:

>from gi.repository import Gtk
>a = Gtk.StockItem()
>a.keyval = 3L
>a.label = "test"
RuntimeError: unable to set value for field 


On IRC it was indicated that the solution would be to have C API for gtk_stock_item_new. 

This blocks conversion of larger apps to GTK3 that need to register their own stock items via stock_add.
Comment 1 Benny Malengier 2011-06-18 12:00:04 UTC
Ok, after 3 days of evening hackings to convert, I finally start to see parts of the interface, and all custom stock items are found. 

I conclude that add_stock is not really needed to make stock icons known, it suffices for the app to create IconFactory and friends to find custom stock icons.

So for me, at the moment the priority of this missing binding is low.
Comment 2 Simon Feltman 2012-09-21 08:49:12 UTC
*** Bug 684532 has been marked as a duplicate of this bug. ***
Comment 3 Simon Feltman 2012-09-21 09:07:43 UTC
*** Bug 684515 has been marked as a duplicate of this bug. ***