[gtk+/a11y] GtkLabel: freeze property notification where appropriate



commit 69cf04ae7a5cac737ba14822fbab644359cefdcd
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jun 23 17:56:03 2011 -0400

    GtkLabel: freeze property notification where appropriate
    
    When setting properties that require recalculating the label
    text, freeze notification until the label is properly updated.
    This fixes bug 126797.

 gtk/gtklabel.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 8f213aa..7818048 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -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));
 }
 
 /**



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