summaryrefslogtreecommitdiff
path: root/gtk/gtktoolbutton.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-06-20 18:01:23 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-06-20 18:01:23 +0000
commit8a763ca49d386e4c808b040d8138783916872964 (patch)
tree1f8b48235111809cbe92e5f7b1f5ab993e6bcc2d /gtk/gtktoolbutton.c
parent0bce4d271acc1d280df4aafd6d1d3409a088d1c6 (diff)
downloadgtk+-8a763ca49d386e4c808b040d8138783916872964.tar.gz
Fix handling of stock items without icons in action-based ui. (#342458,
2006-06-20 Matthias Clasen <mclasen@redhat.com> Fix handling of stock items without icons in action-based ui. (#342458, Callum McKenzie) * gtk/gtkactiongroup.c (gtk_action_group_add_actions_full): Set the stock id even if there is no icon for it. * gtk/gtkaction.c (connect_proxy): * gtk/gtktoolbutton.c (gtk_tool_button_construct_contents): Only construct a stock icon if the stock item has an icon.
Diffstat (limited to 'gtk/gtktoolbutton.c')
-rw-r--r--gtk/gtktoolbutton.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c
index ae9c7ad550..5c7ff4daf1 100644
--- a/gtk/gtktoolbutton.c
+++ b/gtk/gtktoolbutton.c
@@ -405,7 +405,8 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
NULL);
}
}
- else if (button->priv->stock_id)
+ else if (button->priv->stock_id &&
+ gtk_icon_factory_lookup_default (button->priv->stock_id))
{
icon = gtk_image_new_from_stock (button->priv->stock_id, icon_size);
gtk_widget_show (icon);