diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-09-12 22:51:01 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-09-12 22:51:01 +0800 |
commit | 497e2144ace593643f64eb4dfd48f691d205521b (patch) | |
tree | d13219c04b9b3a3d501750b2e25a5319b5475a6b /mail/mail-mlist-magic.c | |
parent | 327d984447bb5e40445bf3af25704e23699b1c28 (diff) | |
download | gsoc2013-evolution-497e2144ace593643f64eb4dfd48f691d205521b.tar.gz gsoc2013-evolution-497e2144ace593643f64eb4dfd48f691d205521b.tar.zst gsoc2013-evolution-497e2144ace593643f64eb4dfd48f691d205521b.zip |
Grey out the "Filter for Mailing List" item if we cannot figure out a
mailing list for the selected message.
svn path=/trunk/; revision=5364
Diffstat (limited to 'mail/mail-mlist-magic.c')
-rw-r--r-- | mail/mail-mlist-magic.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/mail/mail-mlist-magic.c b/mail/mail-mlist-magic.c index 7385688f64..10104db4d0 100644 --- a/mail/mail-mlist-magic.c +++ b/mail/mail-mlist-magic.c @@ -113,8 +113,10 @@ check_sender (CamelMimeMessage *message, if (value[6] == '\0' || value[6] == '@') return NULL; - *header_name_return = "Sender"; - *header_value_return = g_strdup (value); + if (header_name_return != NULL) + *header_name_return = "Sender"; + if (header_value_return != NULL) + *header_value_return = g_strdup (value); return extract_until_at_sign (value + 6); } @@ -130,8 +132,10 @@ check_x_been_there (CamelMimeMessage *message, if (value == NULL || *value == '@') return NULL; - *header_name_return = "X-BeenThere"; - *header_value_return = g_strdup (value); + if (header_name_return != NULL) + *header_name_return = "X-BeenThere"; + if (header_value_return != NULL) + *header_value_return = g_strdup (value); return extract_until_at_sign (value); } @@ -155,8 +159,10 @@ check_delivered_to (CamelMimeMessage *message, if (value[13] == '\0' || value[13] == '@') return NULL; - *header_name_return = "Delivered-To"; - *header_value_return = g_strdup (value); + if (header_name_return != NULL) + *header_name_return = "Delivered-To"; + if (header_value_return != NULL) + *header_value_return = g_strdup (value); return extract_until_at_sign (value + 13); } @@ -180,8 +186,10 @@ check_x_mailing_list (CamelMimeMessage *message, if (value[value_length - 1] != '>') return NULL; - *header_name_return = "X-Mailing-List"; - *header_value_return = g_strdup (value); + if (header_name_return != NULL) + *header_name_return = "X-Mailing-List"; + if (header_value_return != NULL) + *header_value_return = g_strdup (value); return extract_until_at_sign (value + 1); } @@ -200,8 +208,10 @@ check_x_loop (CamelMimeMessage *message, if (*value == '\0' || *value == '@') return NULL; - *header_name_return = "X-Loop"; - *header_value_return = g_strdup (value); + if (header_name_return != NULL) + *header_name_return = "X-Loop"; + if (header_value_return != NULL) + *header_value_return = g_strdup (value); return extract_until_at_sign (value); } |