Add some notify batching, always emit notify after setting the new value.

2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c: Add some notify batching, always
	emit notify after setting the new value.
This commit is contained in:
Matthias Clasen 2006-01-11 16:13:23 +00:00 committed by Matthias Clasen
parent 235144125f
commit c5584b10ca
3 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2006-01-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c: Add some notify batching, always
emit notify after setting the new value.
* gtk/gtkmessagedialog.c: Add properties. (#311254,
Johan Dahlin)
(gtk_message_dialog_new): Remove some redundant code, pointed

View File

@ -1,5 +1,8 @@
2006-01-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c: Add some notify batching, always
emit notify after setting the new value.
* gtk/gtkmessagedialog.c: Add properties. (#311254,
Johan Dahlin)
(gtk_message_dialog_new): Remove some redundant code, pointed

View File

@ -1098,8 +1098,9 @@ gtk_label_set_use_markup_internal (GtkLabel *label,
val = val != FALSE;
if (label->use_markup != val)
{
g_object_notify (G_OBJECT (label), "use-markup");
label->use_markup = val;
g_object_notify (G_OBJECT (label), "use-markup");
}
}
@ -1110,8 +1111,9 @@ gtk_label_set_use_underline_internal (GtkLabel *label,
val = val != FALSE;
if (label->use_underline != val)
{
g_object_notify (G_OBJECT (label), "use-underline");
label->use_underline = val;
g_object_notify (G_OBJECT (label), "use-underline");
}
}
@ -1353,11 +1355,15 @@ gtk_label_set_markup (GtkLabel *label,
{
g_return_if_fail (GTK_IS_LABEL (label));
g_object_freeze_notify (G_OBJECT (label));
gtk_label_set_label_internal (label, g_strdup (str ? str : ""));
gtk_label_set_use_markup_internal (label, TRUE);
gtk_label_set_use_underline_internal (label, FALSE);
gtk_label_recalculate (label);
g_object_thaw_notify (G_OBJECT (label));
}
/**
@ -1380,6 +1386,8 @@ gtk_label_set_markup_with_mnemonic (GtkLabel *label,
guint last_keyval;
g_return_if_fail (GTK_IS_LABEL (label));
g_object_freeze_notify (G_OBJECT (label));
last_keyval = label->mnemonic_keyval;
gtk_label_set_label_internal (label, g_strdup (str ? str : ""));
gtk_label_set_use_markup_internal (label, TRUE);
@ -1387,6 +1395,8 @@ gtk_label_set_markup_with_mnemonic (GtkLabel *label,
gtk_label_recalculate (label);
gtk_label_setup_mnemonic (label, last_keyval);
g_object_thaw_notify (G_OBJECT (label));
}
/**