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.
This commit is contained in:
Matthias Clasen
2011-06-23 17:56:03 -04:00
parent 441bf26a2e
commit dddf587aec

View 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));
}
/**