summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-03-19 23:20:38 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-03-19 23:24:33 -0400
commit5f29a679f8a31b6548f34179d65a39de9ec63535 (patch)
tree64b70ec80d2c38f18dd8469eee1debbaa19639e9
parent8dc4a4f95485e0a63eff58728503baacce82d09f (diff)
downloadgtk+-5f29a679f8a31b6548f34179d65a39de9ec63535.tar.gz
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.
-rw-r--r--gtk/gtkentry.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 16b7f2a7cb..20653b4fca 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -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);
}