summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-04-02 09:53:29 +0000
committerMichael Zucci <zucchi@src.gnome.org>2004-04-02 09:53:29 +0000
commit544dc3767cc28e24ee851d79b14e405352b1641d (patch)
tree4dd83f7d4ae1c0f483ea899ed11986208aa084cc
parent35e2926b129a190e5652db90d38f0be0038e28ca (diff)
downloadevolution-data-server-evolution-1-5-6-branch.tar.gz
turn this on, this should always be on, it points to real bugs in theEVOLUTION_1_5_6_1EVOLUTION_1_5_6evolution-1-5-6-branch
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.
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/camel-exception.c3
-rw-r--r--camel/camel-folder-summary.c28
3 files changed, 33 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b35407a97..8ead265cf 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 f6576e2af..f6e6acf78 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 2ecf0a260..83c7022c3 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