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 /em-format | |
parent | e045e6f12324e1063a87488ac298fd23affea581 (diff) | |
download | gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.gz gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.bz2 gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.lz gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.xz gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.zst gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.zip |
Do not call g_object_notify() when property didn't change
Diffstat (limited to 'em-format')
-rw-r--r-- | em-format/e-mail-formatter.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/em-format/e-mail-formatter.c b/em-format/e-mail-formatter.c index 0c8a0e7068..2bf8ac0de7 100644 --- a/em-format/e-mail-formatter.c +++ b/em-format/e-mail-formatter.c @@ -1200,6 +1200,10 @@ e_mail_formatter_set_mark_citations (EMailFormatter *formatter, { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); + if (((E_MAIL_FORMATTER_GET_CLASS (formatter)->text_html_flags + & CAMEL_MIME_FILTER_TOHTML_MARK_CITATION) ? 1 : 0) == (mark_citations ? 1 : 0)) + return; + if (mark_citations) E_MAIL_FORMATTER_GET_CLASS (formatter)->text_html_flags |= CAMEL_MIME_FILTER_TOHTML_MARK_CITATION; @@ -1224,6 +1228,9 @@ e_mail_formatter_set_only_local_photos (EMailFormatter *formatter, { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); + if ((formatter->priv->only_local_photos ? 1 : 0) == (only_local_photos ? 1 : 0)) + return; + formatter->priv->only_local_photos = only_local_photos; g_object_notify (G_OBJECT (formatter), "only-local-photos"); @@ -1243,6 +1250,9 @@ e_mail_formatter_set_show_sender_photo (EMailFormatter *formatter, { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); + if ((formatter->priv->show_sender_photo ? 1 : 0) == (show_sender_photo ? 1 : 0)) + return; + formatter->priv->show_sender_photo = show_sender_photo; g_object_notify (G_OBJECT (formatter), "show-sender-photo"); @@ -1262,6 +1272,9 @@ e_mail_formatter_set_show_real_date (EMailFormatter *formatter, { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); + if ((formatter->priv->show_real_date ? 1 : 0) == (show_real_date ? 1 : 0)) + return; + formatter->priv->show_real_date = show_real_date; g_object_notify (G_OBJECT (formatter), "show-real-date"); @@ -1281,6 +1294,9 @@ e_mail_formatter_set_animate_images (EMailFormatter *formatter, { g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); + if ((formatter->priv->animate_images ? 1 : 0) == (animate_images ? 1 : 0)) + return; + formatter->priv->animate_images = animate_images; g_object_notify (G_OBJECT (formatter), "animate-images"); @@ -1301,6 +1317,9 @@ e_mail_formatter_set_charset (EMailFormatter *formatter, g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); g_return_if_fail (charset && *charset); + if (g_strcmp0 (formatter->priv->charset, charset) == 0) + return; + if (formatter->priv->charset) g_free (formatter->priv->charset); @@ -1324,6 +1343,9 @@ e_mail_formatter_set_default_charset (EMailFormatter *formatter, g_return_if_fail (E_IS_MAIL_FORMATTER (formatter)); g_return_if_fail (default_charset && *default_charset); + if (g_strcmp0 (formatter->priv->default_charset, default_charset) == 0) + return; + if (formatter->priv->default_charset) g_free (formatter->priv->default_charset); |