diff options
author | Milan Crha <mcrha@redhat.com> | 2012-06-18 21:34:33 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-06-18 21:35:44 +0800 |
commit | 6c05b09be16ac8eceb17653c3c26c0c6f963ef10 (patch) | |
tree | 5bb22771cf05419f851373ee43b1ad39a0dcfeaa /modules/spamassassin | |
parent | e045e6f12324e1063a87488ac298fd23affea581 (diff) | |
download | gsoc2013-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 'modules/spamassassin')
-rw-r--r-- | modules/spamassassin/evolution-spamassassin.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/spamassassin/evolution-spamassassin.c b/modules/spamassassin/evolution-spamassassin.c index 275e921398..0a6330e264 100644 --- a/modules/spamassassin/evolution-spamassassin.c +++ b/modules/spamassassin/evolution-spamassassin.c @@ -339,6 +339,9 @@ static void spam_assassin_set_local_only (ESpamAssassin *extension, gboolean local_only) { + if ((extension->local_only ? 1 : 0) == (local_only ? 1 : 0)) + return; + extension->local_only = local_only; g_object_notify (G_OBJECT (extension), "local-only"); @@ -354,6 +357,9 @@ static void spam_assassin_set_spamc_binary (ESpamAssassin *extension, const gchar *spamc_binary) { + if (g_strcmp0 (extension->spamc_binary, spamc_binary) == 0) + return; + g_free (extension->spamc_binary); extension->spamc_binary = g_strdup (spamc_binary); @@ -370,6 +376,9 @@ static void spam_assassin_set_spamd_binary (ESpamAssassin *extension, const gchar *spamd_binary) { + if (g_strcmp0 (extension->spamd_binary, spamd_binary) == 0) + return; + g_free (extension->spamd_binary); extension->spamd_binary = g_strdup (spamd_binary); @@ -386,6 +395,9 @@ static void spam_assassin_set_socket_path (ESpamAssassin *extension, const gchar *socket_path) { + if (g_strcmp0 (extension->socket_path, socket_path) == 0) + return; + g_free (extension->socket_path); extension->socket_path = g_strdup (socket_path); @@ -402,6 +414,9 @@ static void spam_assassin_set_use_daemon (ESpamAssassin *extension, gboolean use_daemon) { + if ((extension->use_daemon ? 1 : 0) == (use_daemon ? 1 : 0)) + return; + extension->use_daemon = use_daemon; g_object_notify (G_OBJECT (extension), "use-daemon"); |