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 165493 - Stock items aren't initialized so "GtkImage::icon_name" doesn't work
Stock items aren't initialized so "GtkImage::icon_name" doesn't work
Status: RESOLVED DUPLICATE of bug 162791
Product: gtk+
Classification: Platform
Component: [obsolete] stock-icons
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-01-28 11:05 UTC by Damon Chaplin
Modified: 2005-01-29 05:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Damon Chaplin 2005-01-28 11:05:33 UTC
If I do this in a tiny app it doesn't work, the missing image icon is displayed
instead of the stock cancel icon:

  image1 = g_object_new (GTK_TYPE_IMAGE,
			 "icon_name", GTK_STOCK_CANCEL,
			 NULL);

It looks like this happens because init_stock_hash() hasn't been called yet.
If I do something like gtk_stock_list_ids () first the stock cancel icon
is displayed correctly.
Comment 1 Matthias Clasen 2005-01-29 05:08:39 UTC
I think this is the same problem as in bug 162791.
I fixed that one some time ago. 
	

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