From 6c05b09be16ac8eceb17653c3c26c0c6f963ef10 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 18 Jun 2012 15:34:33 +0200 Subject: Do not call g_object_notify() when property didn't change --- composer/e-composer-header.c | 6 ++++++ composer/e-composer-post-header.c | 3 +++ 2 files changed, 9 insertions(+) (limited to 'composer') 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"); diff --git a/composer/e-composer-post-header.c b/composer/e-composer-post-header.c index cc013244bc..48deadfb70 100644 --- a/composer/e-composer-post-header.c +++ b/composer/e-composer-post-header.c @@ -350,6 +350,9 @@ e_composer_post_header_set_mail_account (EComposerPostHeader *header, g_return_if_fail (E_IS_COMPOSER_POST_HEADER (header)); + if (header->priv->mail_account == mail_account) + return; + if (mail_account != NULL) { g_return_if_fail (E_IS_SOURCE (mail_account)); g_object_ref (mail_account); -- cgit