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 684532 - Add method for creating StockItem which takes fields as params
Add method for creating StockItem which takes fields as params
Status: RESOLVED DUPLICATE of bug 652697
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-09-21 08:45 UTC by Simon Feltman
Modified: 2012-09-21 08:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Simon Feltman 2012-09-21 08:45:04 UTC
Currently there is no way to set the string fields of a GtkStockItem through python as the introspection API does not support memory management of string fields. See: http://developer.gnome.org/gi/stable/gi-GIFieldInfo.html#g-field-info-set-field

A method for creating a GtkStockItem would help resolve this issue at least for GtkStockItems. Something along the lines of:


/**
 * gtk_stock_item_create:
 * @stock_id: a stock item name
 * @label: user-visible label
 * @modifier: keyboard accelerator modifier key
 * @keyval: keyboard accelerator
 * @translation_domain: translation domain of the menu or toolbar item
 * 
 * Creates a new stock item with the given fields.
 * 
 * Return value: a new #GtkStockItem
 **/
GtkStockItem *
gtk_stock_item_new(const gchar *stock_id,
                   const gchar *label,
                   GdkModifierType modifier,
                   guint keyval,
                   const gchar *translation_domain);
Comment 1 Simon Feltman 2012-09-21 08:49:12 UTC

*** This bug has been marked as a duplicate of bug 652697 ***