summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2007-06-13 13:38:51 +0000
committerMichael Natterer <mitch@src.gnome.org>2007-06-13 13:38:51 +0000
commitc82cc89bd675d9fcd082f5a990654cdc08d1add7 (patch)
treecbc065ea61f7b36d6852eac079865b0b756addde
parent4e4748e890f3c19b6d1e8cb72f316c33e25b846a (diff)
downloadgtk+-c82cc89bd675d9fcd082f5a990654cdc08d1add7.tar.gz
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
-rw-r--r--ChangeLog6
-rw-r--r--gtk/gtklabel.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 66bf4e83c9..06db2b9682 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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).
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index e1693b0b0f..36c9065000 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -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));
}
/**