diff options
author | Cody Russell <bratsche@gnome.org> | 2009-05-30 00:10:14 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2009-05-30 00:10:14 -0400 |
commit | 47db0f0020bd0f83f263f78255adaaa9e6481930 (patch) | |
tree | 056ff2fedbecc7683d225e24fa6dc764959e52eb /gtk/gtkentry.c | |
parent | 5964109ef30d4ab8df9c0a5a7c2806c5f57b1fe5 (diff) | |
download | gtk+-47db0f0020bd0f83f263f78255adaaa9e6481930.tar.gz |
Improve GtkEntry handling of invalid stock ids
Instead of silently showing no icon, show a "missing image"
icon, like GtkImage does in the same situation. Fixes bug 579590.
Diffstat (limited to 'gtk/gtkentry.c')
-rw-r--r-- | gtk/gtkentry.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index a21e94f57f..5473143f72 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -6448,6 +6448,11 @@ gtk_entry_ensure_pixbuf (GtkEntry *entry, icon_info->stock_id, GTK_ICON_SIZE_MENU, NULL); + if (!icon_info->pixbuf) + icon_info->pixbuf = gtk_widget_render_icon (GTK_WIDGET (entry), + GTK_STOCK_MISSING_IMAGE, + GTK_ICON_SIZE_MENU, + NULL); GTK_WIDGET_STATE (entry) = state; break; |