aboutsummaryrefslogtreecommitdiffstats
path: root/libevolution-utils/e-alert.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-06-18 21:34:33 +0800
committerMilan Crha <mcrha@redhat.com>2012-06-18 21:35:44 +0800
commit6c05b09be16ac8eceb17653c3c26c0c6f963ef10 (patch)
tree5bb22771cf05419f851373ee43b1ad39a0dcfeaa /libevolution-utils/e-alert.c
parente045e6f12324e1063a87488ac298fd23affea581 (diff)
downloadgsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.gz
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.zst
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.zip
Do not call g_object_notify() when property didn't change
Diffstat (limited to 'libevolution-utils/e-alert.c')
-rw-r--r--libevolution-utils/e-alert.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libevolution-utils/e-alert.c b/libevolution-utils/e-alert.c
index 7983083103..7d3b5e717f 100644
--- a/libevolution-utils/e-alert.c
+++ b/libevolution-utils/e-alert.c
@@ -782,6 +782,9 @@ e_alert_set_message_type (EAlert *alert,
{
g_return_if_fail (E_IS_ALERT (alert));
+ if (alert->priv->message_type == message_type)
+ return;
+
alert->priv->message_type = message_type;
g_object_notify (G_OBJECT (alert), "message-type");
@@ -818,6 +821,9 @@ e_alert_set_primary_text (EAlert *alert,
{
g_return_if_fail (E_IS_ALERT (alert));
+ if (g_strcmp0 (alert->priv->primary_text, primary_text) == 0)
+ return;
+
g_free (alert->priv->primary_text);
alert->priv->primary_text = g_strdup (primary_text);
@@ -855,6 +861,9 @@ e_alert_set_secondary_text (EAlert *alert,
{
g_return_if_fail (E_IS_ALERT (alert));
+ if (g_strcmp0 (alert->priv->secondary_text, secondary_text) == 0)
+ return;
+
g_free (alert->priv->secondary_text);
alert->priv->secondary_text = g_strdup (secondary_text);