[gtk+/gtk-2-18] Refixed patch for bug 612505.



commit 4b529ade7bc94bf540affd48ef007344168ab152
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun Mar 14 15:23:55 2010 -0400

    Refixed patch for bug 612505.
    
    New patch makes sure to update the display even when
    the GtkEntry's buffer is set to NULL, it also breaks the
    reference to the buffer in ->dispose() instead of ->finalize().

 gtk/gtkentry.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 0359fc8..4344449 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2430,6 +2430,7 @@ gtk_entry_dispose (GObject *object)
   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);
 
   G_OBJECT_CLASS (gtk_entry_parent_class)->dispose (object);
 }
@@ -2472,11 +2473,6 @@ gtk_entry_finalize (GObject *object)
 
   g_free (priv->im_module);
 
-  /* COMPAT: entry->text is a deprecated field, and the allocation 
-     is owned by the buffer. */
-
-  gtk_entry_set_buffer (entry, NULL);
-
   G_OBJECT_CLASS (gtk_entry_parent_class)->finalize (object);
 }
 
@@ -6648,9 +6644,6 @@ gtk_entry_set_buffer (GtkEntry       *entry,
     {
        buffer_connect_signals (entry);
 
-       gtk_editable_set_position (GTK_EDITABLE (entry), 0);
-       gtk_entry_recompute (entry);
-
       /* COMPAT: Deprecated. Not used. Setting these fields no longer necessary in GTK 3.x */
       entry->text = (char*)gtk_entry_buffer_get_text (priv->buffer);
       entry->text_length = gtk_entry_buffer_get_length (priv->buffer);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]