[gtk+/gtk-2-16] Improve GtkEntry handling of invalid stock ids
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/gtk-2-16] Improve GtkEntry handling of invalid stock ids
- Date: Sun, 31 May 2009 01:08:06 -0400 (EDT)
commit 3cf9c3107fbd09a98aab9a938e2ec03986f748d5
Author: Cody Russell <bratsche gnome org>
Date: Sat May 30 00:10:14 2009 -0400
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.
---
gtk/gtkentry.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 607ef87..92aaaf7 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -6420,6 +6420,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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]