Entry: Emit notify::pixbuf whenever icon's cleared

not just if it was specifically using pixbuf storage type, since the
getter works for any storage type, so in any case when we had storage
and clear it, we need to notify that the effective :pixbuf is now NULL.
This commit is contained in:
Daniel Boles
2018-12-15 16:45:34 +00:00
parent 8eadb2f771
commit 307d0ce866

View File

@@ -7484,15 +7484,18 @@ gtk_entry_clear_icon (GtkEntry *entry,
if (GDK_IS_WINDOW (icon_info->window))
gdk_window_hide (icon_info->window);
_gtk_icon_helper_clear (icon_helper);
g_object_notify_by_pspec (G_OBJECT (entry),
entry_props[icon_pos == GTK_ENTRY_ICON_PRIMARY
? PROP_PIXBUF_PRIMARY
: PROP_PIXBUF_SECONDARY]);
storage_type = _gtk_icon_helper_get_storage_type (icon_helper);
switch (storage_type)
{
case GTK_IMAGE_PIXBUF:
g_object_notify_by_pspec (G_OBJECT (entry),
entry_props[icon_pos == GTK_ENTRY_ICON_PRIMARY
? PROP_PIXBUF_PRIMARY
: PROP_PIXBUF_SECONDARY]);
break;
case GTK_IMAGE_STOCK:
@@ -7521,8 +7524,6 @@ gtk_entry_clear_icon (GtkEntry *entry,
break;
}
_gtk_icon_helper_clear (icon_helper);
g_object_notify_by_pspec (G_OBJECT (entry),
entry_props[icon_pos == GTK_ENTRY_ICON_PRIMARY
? PROP_STORAGE_TYPE_PRIMARY