added calls to g_object_freeze/thaw_notify() so gtk_label_get_text()

2007-06-13  Michael Natterer  <mitch@imendio.com>

	* gtk/gtklabel.c (gtk_label_set_label): added calls to
	g_object_freeze/thaw_notify() so gtk_label_get_text() doesn't
	return the old text when called from a "notify::label" callback.


svn path=/trunk/; revision=18120
This commit is contained in:
Michael Natterer 2007-06-13 13:38:51 +00:00 committed by Michael Natterer
parent 4e4748e890
commit c82cc89bd6
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-06-13 Michael Natterer <mitch@imendio.com>
* gtk/gtklabel.c (gtk_label_set_label): added calls to
g_object_freeze/thaw_notify() so gtk_label_get_text() doesn't
return the old text when called from a "notify::label" callback.
2007-06-13 Kristian Rietveld <kris@imendio.com>
Audit of GtkTreeView coordinate system usage. (#142494).

View File

@ -1330,12 +1330,16 @@ gtk_label_set_label (GtkLabel *label,
g_return_if_fail (GTK_IS_LABEL (label));
g_return_if_fail (str != NULL);
g_object_freeze_notify (G_OBJECT (label));
last_keyval = label->mnemonic_keyval;
gtk_label_set_label_internal (label, g_strdup (str));
gtk_label_recalculate (label);
if (last_keyval != label->mnemonic_keyval)
gtk_label_setup_mnemonic (label, last_keyval);
g_object_thaw_notify (G_OBJECT (label));
}
/**