diff options
author | Not Zed <NotZed@Ximian.com> | 2001-03-14 15:06:54 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-03-14 15:06:54 +0800 |
commit | 0e9c0268a8ae99b88d7b98539181c0e938e5cb53 (patch) | |
tree | 448e5a9d7b6797e4a396c942a8370c5db2a99540 /camel/camel-folder-summary.c | |
parent | 83b4aa2b1d586cd9014394343b303d71e31ad3b8 (diff) | |
download | gsoc2013-evolution-0e9c0268a8ae99b88d7b98539181c0e938e5cb53.tar.gz gsoc2013-evolution-0e9c0268a8ae99b88d7b98539181c0e938e5cb53.tar.zst gsoc2013-evolution-0e9c0268a8ae99b88d7b98539181c0e938e5cb53.zip |
re-constify inbuf, to remove a warning.
2001-03-14 Not Zed <NotZed@Ximian.com>
* camel-mime-filter-charset.c (filter, complete): re-constify
inbuf, to remove a warning.
* camel-mime-parser.c (folder_scan_step): When we're out of data,
run the filter_complete. For some reason the logic that was there
was never being run, always try it now, i think it was to work
around a buggy filter, rather than fix it the right way.
* camel-folder-summary.c (summary_build_content_info): If indexing
html parts, use the html filter to convert it to some indexable
format.
(summary_build_content_info): Reset the filters before adding them
back to the stream, if they get re-used in a given instance
(likely).
* Makefile.am (libcamelinclude_HEADERS): Added
camel-mime-filter-html.[ch].
(INCLUDES): Added xml clags
2001-03-05 Not Zed <NotZed@Ximian.com>
* camel-folder-search.c (camel_folder_search_class_init): Setup a
new function, "uid" which matches uids.
(search_uid): Implement the "match uid" command.
svn path=/trunk/; revision=8705
Diffstat (limited to 'camel/camel-folder-summary.c')
-rw-r--r-- | camel/camel-folder-summary.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 4e9e9e9d1b..9aaa61e50c 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -36,6 +36,7 @@ #include <camel/camel-mime-filter-charset.h> #include <camel/camel-mime-filter-save.h> #include <camel/camel-mime-filter-basic.h> +#include <camel/camel-mime-filter-html.h> #include <camel/camel-mime-message.h> #include <camel/camel-stream-mem.h> @@ -2053,7 +2054,7 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam CamelMessageContentInfo *info = NULL; struct _header_content_type *ct; int body; - int enc_id = -1, chr_id = -1, idx_id = -1; + int enc_id = -1, chr_id = -1, html_id = -1, idx_id = -1; struct _CamelFolderSummaryPrivate *p = _PRIVATE(s); CamelMimeFilterCharset *mfc; CamelMessageContentInfo *part; @@ -2087,11 +2088,15 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam d(printf(" decoding base64\n")); if (p->filter_64 == NULL) p->filter_64 = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_BASE64_DEC); + else + camel_mime_filter_reset((CamelMimeFilter *)p->filter_64); enc_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_64); } else if (!strcasecmp(encoding, "quoted-printable")) { d(printf(" decoding quoted-printable\n")); if (p->filter_qp == NULL) p->filter_qp = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_QP_DEC); + else + camel_mime_filter_reset((CamelMimeFilter *)p->filter_qp); enc_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_qp); } else { d(printf(" ignoring encoding %s\n", encoding)); @@ -2109,6 +2114,8 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam mfc = camel_mime_filter_charset_new_convert(charset, "UTF-8"); if (mfc) g_hash_table_insert(p->filter_charset, g_strdup(charset), mfc); + } else { + camel_mime_filter_reset((CamelMimeFilter *)mfc); } if (mfc) { chr_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)mfc); @@ -2117,6 +2124,14 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam } } + if (header_content_type_is(ct, "text", "html")) { + if (p->filter_html == NULL) + p->filter_html = camel_mime_filter_html_new(); + else + camel_mime_filter_reset((CamelMimeFilter *)p->filter_html); + html_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_html); + } + /* and this filter actually does the indexing */ idx_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_index); } @@ -2126,6 +2141,7 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam /* and remove the filters */ camel_mime_parser_filter_remove(mp, enc_id); camel_mime_parser_filter_remove(mp, chr_id); + camel_mime_parser_filter_remove(mp, html_id); camel_mime_parser_filter_remove(mp, idx_id); break; case HSCAN_MULTIPART: |