mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-19 08:30:09 +00:00
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.
This commit is contained in:
parent
798413151f
commit
f0714338b3
@ -378,7 +378,8 @@ _gtk_icon_helper_set_icon_name (GtkIconHelper *self,
|
|||||||
{
|
{
|
||||||
_gtk_icon_helper_clear (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->storage_type = GTK_IMAGE_ICON_NAME;
|
||||||
self->priv->icon_name = g_strdup (icon_name);
|
self->priv->icon_name = g_strdup (icon_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user