summaryrefslogtreecommitdiff
path: root/gtk/gtkimage.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-04-09 21:57:04 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-04-09 21:57:04 +0000
commita75e27c0a4a80d5accbd6783a4bb1fbf8a75e2c4 (patch)
treef8c230a965593f3457c63b813be69acf04b40559 /gtk/gtkimage.c
parent62fee90c16ee613649ac7fccee43bd9346ff8058 (diff)
downloadgtk+-a75e27c0a4a80d5accbd6783a4bb1fbf8a75e2c4.tar.gz
Don't display too many broken images. (#169870, Roman Kagan, patch by Ivan
2005-04-09 Matthias Clasen <mclasen@redhat.com> * gtk/gtkimage.c (gtk_image_calc_size, gtk_image_expose): Don't display too many broken images. (#169870, Roman Kagan, patch by Ivan Wong) * gtk/gtkwidget.c (gtk_widget_unparent): Remove debugging output. (#300013, Tommi Komulainen) * io-bmp.c (gdk_pixbuf__bmp_image_save_to_callback): Don't overflow the stack. (Jakub Jelinek, Arjan van de Ven)
Diffstat (limited to 'gtk/gtkimage.c')
-rw-r--r--gtk/gtkimage.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index b512292779..e982cd08bd 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -1547,7 +1547,6 @@ gtk_image_expose (GtkWidget *widget,
GdkBitmap *mask;
GdkPixbuf *pixbuf;
gboolean needs_state_transform;
- GtkStockItem item;
gchar *stock_id;
@@ -1657,7 +1656,7 @@ gtk_image_expose (GtkWidget *widget,
break;
case GTK_IMAGE_STOCK:
- if (gtk_stock_lookup (image->data.stock.stock_id, &item))
+ if (gtk_style_lookup_icon_set (widget->style, image->data.stock.stock_id))
stock_id = image->data.stock.stock_id;
else
stock_id = GTK_STOCK_MISSING_IMAGE;
@@ -1957,7 +1956,6 @@ gtk_image_calc_size (GtkImage *image)
{
GtkWidget *widget = GTK_WIDGET (image);
GdkPixbuf *pixbuf = NULL;
- GtkStockItem item;
gchar *stock_id;
/* We update stock/icon set on every size request, because
@@ -1968,7 +1966,7 @@ gtk_image_calc_size (GtkImage *image)
switch (image->storage_type)
{
case GTK_IMAGE_STOCK:
- if (gtk_stock_lookup (image->data.stock.stock_id, &item))
+ if (gtk_style_lookup_icon_set (widget->style, image->data.stock.stock_id))
stock_id = image->data.stock.stock_id;
else
stock_id = GTK_STOCK_MISSING_IMAGE;