diff options
-rw-r--r-- | camel/ChangeLog | 9 | ||||
-rw-r--r-- | camel/camel-exception.c | 3 | ||||
-rw-r--r-- | camel/camel-folder-summary.c | 28 |
3 files changed, 33 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index b35407a970..8ead265cf9 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,12 @@ +2004-04-02 Not Zed <NotZed@Ximian.com> + + * camel-exception.c (w): turn this on, this should always be on, + it points to real bugs in the code. + + * camel-folder-summary.c (summary_build_content_info): dont set + attachments if its a signature block. + (summary_build_content_info_message): same. + 2004-04-01 Jeffrey Stedfast <fejj@ximian.com> * camel-exception.c (w): Wrap annoying exeption warnings with w(). diff --git a/camel/camel-exception.c b/camel/camel-exception.c index f6576e2afc..f6e6acf78b 100644 --- a/camel/camel-exception.c +++ b/camel/camel-exception.c @@ -34,7 +34,8 @@ #include "camel-debug.h" -#define w(x) +/* dont turn this off */ +#define w(x) x /* i dont know why gthread_mutex stuff even exists, this is easier */ diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 2ecf0a2603..83c7022c33 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -2050,7 +2050,14 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam /* check content type for indexing, then read body */ ct = camel_mime_parser_content_type(mp); /* update attachments flag as we go */ - if (!camel_content_type_is(ct, "text", "*")) + if (camel_content_type_is(ct, "application", "pgp-signature") +#ifdef ENABLE_SMIME + || camel_content_type_is(ct, "application", "x-pkcs7-signature") + || camel_content_type_is(ct, "application", "pkcs7-signature") +#endif + ) + /* TODO: set secured bit */; + else if (!camel_content_type_is(ct, "text", "*")) msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS; if (p->index && camel_content_type_is(ct, "text", "*")) { @@ -2178,6 +2185,7 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi int parts, i; struct _CamelFolderSummaryPrivate *p = _PRIVATE(s); CamelMessageContentInfo *info = NULL, *child; + CamelContentType *ct; if (s->build_content) info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_new_from_message(s, object); @@ -2191,10 +2199,18 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi add a reference, probably need fixing for multithreading */ /* check for attachments */ - if (camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "multipart", "*")) { - if (camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "multipart", "mixed")) + ct = ((CamelDataWrapper *)containee)->mime_type; + if (camel_content_type_is(ct, "multipart", "*")) { + if (camel_content_type_is(ct, "multipart", "mixed")) msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS; - } else if (!camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "*")) + } else if (camel_content_type_is(ct, "application", "pgp-signature") +#ifdef ENABLE_SMIME + || camel_content_type_is(ct, "application", "x-pkcs7-signature") + || camel_content_type_is(ct, "application", "pkcs7-signature") +#endif + ) { + /* TODO: signed bit */; + } else if (!camel_content_type_is(ct, "text", "*")) msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS; /* using the object types is more accurate than using the mime/types */ @@ -2217,11 +2233,11 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi my_list_append((struct _node **)&info->childs, (struct _node *)child); } } else if (p->filter_stream - && camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "*")) { + && camel_content_type_is(ct, "text", "*")) { int html_id = -1, idx_id = -1; /* pre-attach html filter if required, otherwise just index filter */ - if (camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "html")) { + if (camel_content_type_is(ct, "text", "html")) { if (p->filter_html == NULL) p->filter_html = camel_mime_filter_html_new(); else |