]> Pileus Git - ~andy/gtk/commitdiff
GtkLabel: freeze property notification where appropriate
authorMatthias Clasen <mclasen@redhat.com>
Thu, 23 Jun 2011 21:56:03 +0000 (17:56 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 Jul 2011 20:08:06 +0000 (16:08 -0400)
When setting properties that require recalculating the label
text, freeze notification until the label is properly updated.
This fixes bug 126797.

gtk/gtklabel.c

index 8f213aa09f2f146fca98622b314c3af7b0c7a670..7818048db791b6cea7f9acb4ca59fbe455b2b319 100644 (file)
@@ -5661,8 +5661,12 @@ gtk_label_set_use_markup (GtkLabel *label,
 {
   g_return_if_fail (GTK_IS_LABEL (label));
 
+  g_object_freeze_notify (G_OBJECT (label));
+
   gtk_label_set_use_markup_internal (label, setting);
   gtk_label_recalculate (label);
+
+  g_object_thaw_notify (G_OBJECT (label));
 }
 
 /**
@@ -5697,8 +5701,12 @@ gtk_label_set_use_underline (GtkLabel *label,
 {
   g_return_if_fail (GTK_IS_LABEL (label));
 
+  g_object_freeze_notify (G_OBJECT (label));
+
   gtk_label_set_use_underline_internal (label, setting);
   gtk_label_recalculate (label);
+
+  g_object_thaw_notify (G_OBJECT (label));
 }
 
 /**