aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-composer-header.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 /composer/e-composer-header.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 'composer/e-composer-header.c')
-rw-r--r--composer/e-composer-header.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c
index 5ef5e41d15..83c4afd49e 100644
--- a/composer/e-composer-header.c
+++ b/composer/e-composer-header.c
@@ -379,6 +379,9 @@ e_composer_header_set_sensitive (EComposerHeader *header,
{
g_return_if_fail (E_IS_COMPOSER_HEADER (header));
+ if ((header->priv->sensitive ? 1 : 0) == (sensitive ? 1 : 0))
+ return;
+
header->priv->sensitive = sensitive;
g_object_notify (G_OBJECT (header), "sensitive");
@@ -398,6 +401,9 @@ e_composer_header_set_visible (EComposerHeader *header,
{
g_return_if_fail (E_IS_COMPOSER_HEADER (header));
+ if ((header->priv->visible ? 1 : 0) == (visible ? 1 : 0))
+ return;
+
header->priv->visible = visible;
g_object_notify (G_OBJECT (header), "visible");