]> Pileus Git - ~andy/gtk/commitdiff
Recompute label contents when the buffer changes
authorMatthias Clasen <mclasen@redhat.com>
Fri, 12 Mar 2010 20:58:11 +0000 (15:58 -0500)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Sun, 4 Apr 2010 00:59:14 +0000 (20:59 -0400)
Also reset cursor positions to avoid assertions.
This fixes bug 612505, patch by Tristan Van Berkom.

gtk/gtkentry.c

index 1a9442474e3af2a4e37783351b47f98ce16a9b93..227af1c7a815ce866df6239f2cd452713609bdf3 100644 (file)
@@ -6708,6 +6708,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);
 }
 
 /**