diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-07-15 18:24:01 +0800 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-07-15 23:48:45 +0800 |
commit | ff8615ec0ad504b3fb81784747b82fca42ed1457 (patch) | |
tree | 3fcd2114e1e3c2e5b7e307498e4300457881f0dd /mail/em-composer-utils.c | |
parent | 8ae4bf802aac4218ebfbe10cae09693ba64c05f3 (diff) | |
download | gsoc2013-evolution-ff8615ec0ad504b3fb81784747b82fca42ed1457.tar.gz gsoc2013-evolution-ff8615ec0ad504b3fb81784747b82fca42ed1457.tar.zst gsoc2013-evolution-ff8615ec0ad504b3fb81784747b82fca42ed1457.zip |
Don't show the "reply in private?" nag popup for munged Reply-To: list messages
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r-- | mail/em-composer-utils.c | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 4884432492..4bc91c65a0 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -1776,19 +1776,15 @@ get_reply_list (CamelMimeMessage *message, CamelInternetAddress *to) return TRUE; } -static CamelInternetAddress * -get_reply_to (CamelMimeMessage *message) +gboolean +em_utils_is_munged_list_message(CamelMimeMessage *message) { - CamelInternetAddress *reply_to; - GConfClient *gconf; - gboolean ignore_list_reply_to; - - gconf = mail_config_get_gconf_client (); - ignore_list_reply_to = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/ignore_list_reply_to", NULL); + CamelInternetAddress *reply_to, *list; + gboolean result = FALSE; reply_to = camel_mime_message_get_reply_to (message); - if (reply_to && ignore_list_reply_to) { - CamelInternetAddress *list = camel_internet_address_new (); + if (reply_to) { + list = camel_internet_address_new (); if (get_reply_list (message, list) && camel_address_length (CAMEL_ADDRESS(list)) == camel_address_length (CAMEL_ADDRESS(reply_to))) { @@ -1804,12 +1800,31 @@ get_reply_to (CamelMimeMessage *message) if (strcmp (l_addr, r_addr)) break; } - if (i == camel_address_length (CAMEL_ADDRESS(list))) { - reply_to = NULL; - } + if (i == camel_address_length (CAMEL_ADDRESS(list))) + result = TRUE; } g_object_unref (list); } + return result; +} + +static CamelInternetAddress * +get_reply_to (CamelMimeMessage *message) +{ + CamelInternetAddress *reply_to; + + reply_to = camel_mime_message_get_reply_to (message); + if (reply_to) { + GConfClient *gconf; + gboolean ignore_list_reply_to; + + gconf = mail_config_get_gconf_client (); + ignore_list_reply_to = gconf_client_get_bool (gconf, + "/apps/evolution/mail/composer/ignore_list_reply_to", NULL); + + if (ignore_list_reply_to && em_utils_is_munged_list_message (message)) + reply_to = NULL; + } if (!reply_to) reply_to = camel_mime_message_get_from (message); |