diff options
author | Daniel Boles <dboles.src@gmail.com> | 2018-12-15 16:45:34 +0000 |
---|---|---|
committer | Daniel Boles <dboles.src@gmail.com> | 2018-12-16 18:59:43 +0000 |
commit | 307d0ce8669c562d4b978dd7495efd544bbd5c78 (patch) | |
tree | 52f3eaa09ffdaa88b31f22484ee9241a023d4eac | |
parent | 8eadb2f771d01cf1f7b9dbfa8b29f88004bf2c44 (diff) | |
download | gtk+-wip/dboles/entry-icon-empty-size-3.tar.gz |
Entry: Emit notify::pixbuf whenever icon's clearedwip/dboles/entry-icon-empty-size-3
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.
-rw-r--r-- | gtk/gtkentry.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 824eee2740..4a7aed04fb 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -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 |