summaryrefslogtreecommitdiff
path: root/gtk/gtkiconhelper.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2011-12-15 20:01:35 +0100
committerCosimo Cecchi <cosimoc@gnome.org>2011-12-15 20:01:35 +0100
commitf0714338b3c5810b2ca1de3aaa4ba0683c055ff5 (patch)
treef211022993e5f0270fdfc36e040f170d988c5688 /gtk/gtkiconhelper.c
parent798413151f33bd3839080fc384a09b768c81af75 (diff)
downloadgtk+-f0714338b3c5810b2ca1de3aaa4ba0683c055ff5.tar.gz
iconhelper: treat the empty string as a NULL icon name
Treat the empty string as if it was a NULL icon name instead of rendering GTK_STOCK_MISSING_IMAGE. This used to be the previous behavior of GtkCellRendererPixbuf and applications might still rely on it.
Diffstat (limited to 'gtk/gtkiconhelper.c')
-rw-r--r--gtk/gtkiconhelper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
index 30f7e2cbeb..ae1cb68091 100644
--- a/gtk/gtkiconhelper.c
+++ b/gtk/gtkiconhelper.c
@@ -378,7 +378,8 @@ _gtk_icon_helper_set_icon_name (GtkIconHelper *self,
{
_gtk_icon_helper_clear (self);
- if (icon_name != NULL)
+ if (icon_name != NULL &&
+ g_strcmp0 (icon_name, "") != 0)
{
self->priv->storage_type = GTK_IMAGE_ICON_NAME;
self->priv->icon_name = g_strdup (icon_name);