[gtk+/gtk-2-18] Avoid spurious notifications from GtkEntry
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-18] Avoid spurious notifications from GtkEntry
- Date: Sat, 20 Mar 2010 03:36:45 +0000 (UTC)
commit 0fff51eab6427ca4d0ab679c1d994a2a36898a7d
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Mar 19 23:20:38 2010 -0400
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.
(cherry picked from commit 5f29a679f8a31b6548f34179d65a39de9ec63535)
gtk/gtkentry.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 4344449..0dafcf7 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2425,12 +2425,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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]