diff options
author | Matthias Clasen <mclasen@redhat.com> | 2006-06-20 18:01:23 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-06-20 18:01:23 +0000 |
commit | 8a763ca49d386e4c808b040d8138783916872964 (patch) | |
tree | 1f8b48235111809cbe92e5f7b1f5ab993e6bcc2d /gtk/gtkactiongroup.c | |
parent | 0bce4d271acc1d280df4aafd6d1d3409a088d1c6 (diff) | |
download | gtk+-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/gtkactiongroup.c')
-rw-r--r-- | gtk/gtkactiongroup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkactiongroup.c b/gtk/gtkactiongroup.c index dfa48f7461..7b7bd6b7f6 100644 --- a/gtk/gtkactiongroup.c +++ b/gtk/gtkactiongroup.c @@ -782,9 +782,9 @@ gtk_action_group_add_actions_full (GtkActionGroup *action_group, if (entries[i].stock_id) { - if (gtk_icon_factory_lookup_default (entries[i].stock_id)) - g_object_set (action, "stock-id", entries[i].stock_id, NULL); - else + g_object_set (action, "stock-id", entries[i].stock_id, NULL); + if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default (), + entries[i].stock_id)) g_object_set (action, "icon-name", entries[i].stock_id, NULL); } |