summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-01-11 16:13:23 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-01-11 16:13:23 +0000
commitc5584b10ca63fa1f67522aab41b9659289dfc660 (patch)
tree44c179a5c3307ce0d95aadfa41275a2abaf84063
parent235144125fc36ee8e8590a34c3b587849c0eb460 (diff)
downloadgdk-pixbuf-c5584b10ca63fa1f67522aab41b9659289dfc660.tar.gz
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.
-rw-r--r--ChangeLog3
-rw-r--r--ChangeLog.pre-2-103
-rw-r--r--gtk/gtklabel.c14
3 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f966d0b41..30114695a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index f966d0b41..30114695a 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -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
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 4fdf956ff..e0557422f 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -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));
}
/**