mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
Avoid spurious notifications from GtkEntry
Using gtk_entry_set_buffer() in dispose() causes problematic notifications, so just get rid of the buffer manually. See bug 613241.
This commit is contained in:
parent
95dbbe2bda
commit
fe34ee4ff3
@ -2463,12 +2463,19 @@ static void
|
||||
gtk_entry_dispose (GObject *object)
|
||||
{
|
||||
GtkEntry *entry = GTK_ENTRY (object);
|
||||
GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (entry);
|
||||
|
||||
gtk_entry_set_icon_from_pixbuf (entry, GTK_ENTRY_ICON_PRIMARY, NULL);
|
||||
gtk_entry_set_icon_tooltip_markup (entry, GTK_ENTRY_ICON_PRIMARY, NULL);
|
||||
gtk_entry_set_icon_from_pixbuf (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||
gtk_entry_set_icon_tooltip_markup (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
|
||||
gtk_entry_set_buffer (entry, NULL);
|
||||
|
||||
if (priv->buffer)
|
||||
{
|
||||
buffer_disconnect_signals (entry);
|
||||
g_object_unref (priv->buffer);
|
||||
priv->buffer = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gtk_entry_parent_class)->dispose (object);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user