[gtk+/gtk-2-18] Recompute label contents when the buffer changes



commit 132e224c70098ae8e52e94914e134b13b18351af
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Mar 12 15:58:11 2010 -0500

    Recompute label contents when the buffer changes
    
    Also reset cursor positions to avoid assertions.
    This fixes bug 612505, patch by Tristan Van Berkom.
    (cherry picked from commit 233281fd394b34e6b4a7684ea362781f72c3a476)

 gtk/gtkentry.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index cc1260c..0359fc8 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -6667,6 +6667,9 @@ gtk_entry_set_buffer (GtkEntry       *entry,
   g_object_notify (obj, "invisible-char");
   g_object_notify (obj, "invisible-char-set");
   g_object_thaw_notify (obj);
+
+  gtk_editable_set_position (GTK_EDITABLE (entry), 0);
+  gtk_entry_recompute (entry);
 }
 
 



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