mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-20 10:20:09 +00:00
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.
This commit is contained in:
parent
5964109ef3
commit
47db0f0020
@ -6448,6 +6448,11 @@ gtk_entry_ensure_pixbuf (GtkEntry *entry,
|
|||||||
icon_info->stock_id,
|
icon_info->stock_id,
|
||||||
GTK_ICON_SIZE_MENU,
|
GTK_ICON_SIZE_MENU,
|
||||||
NULL);
|
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;
|
GTK_WIDGET_STATE (entry) = state;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user