aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-05-19 14:06:35 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-05-19 14:06:35 +0800
commit16eefad8858f0821257487aa1a6ac970708fd972 (patch)
tree8b5a0b36c9c0b0f454e10c371c68fe19954ad0ce /mail/em-format.c
parentc780968accce9d39e56b2ac21d0c751e1c2b0a91 (diff)
downloadgsoc2013-evolution-16eefad8858f0821257487aa1a6ac970708fd972.tar.gz
gsoc2013-evolution-16eefad8858f0821257487aa1a6ac970708fd972.tar.zst
gsoc2013-evolution-16eefad8858f0821257487aa1a6ac970708fd972.zip
fix rodney's name choices. fix multiple-inclusion. fix forward references.
2005-05-19 Not Zed <NotZed@Ximian.com> * em-folder-utils.h: fix rodney's name choices. fix multiple-inclusion. fix forward references. fix all callers. add many fixme's for the busted api's. * em-format-quote.c (emfq_format_clone): use pseudo mime type to find message formatter. * em-format-html-display.c (efhd_format_message): remove, it didn't do anything. * em-format-html.c (efh_format_message): make this a handler callback. * em-format.c (emf_message_rfc822): make this use the pseudo mime-type x-evolution/message/rfc822 instead of the hardcoded format_message callback. * em-format-html-display.c (efhd_message_prefix): make this use a pseudo-mime-type handler rather than hard-coded, so it can be overridden by a plugin. svn path=/trunk/; revision=29382
Diffstat (limited to 'mail/em-format.c')
-rw-r--r--mail/em-format.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/mail/em-format.c b/mail/em-format.c
index aef5bc0ebe..dd7cf1e084 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -77,7 +77,6 @@ static void emf_builtin_init(EMFormatClass *);
static const EMFormatHandler *emf_find_handler(EMFormat *emf, const char *mime_type);
static void emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource);
-static void emf_format_prefix(EMFormat *emf, CamelStream *stream);
static void emf_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
static gboolean emf_busy(EMFormat *emf);
@@ -162,7 +161,6 @@ emf_class_init(GObjectClass *klass)
klass->finalize = emf_finalise;
((EMFormatClass *)klass)->find_handler = emf_find_handler;
((EMFormatClass *)klass)->format_clone = emf_format_clone;
- ((EMFormatClass *)klass)->format_prefix = emf_format_prefix;
((EMFormatClass *)klass)->format_secure = emf_format_secure;
((EMFormatClass *)klass)->busy = emf_busy;
@@ -684,12 +682,6 @@ emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeM
}
static void
-emf_format_prefix(EMFormat *emf, CamelStream *stream)
-{
- /* NOOP */
-}
-
-static void
emf_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid)
{
CamelCipherValidity *save = emf->valid_parent;
@@ -1464,6 +1456,7 @@ static void
emf_message_rfc822(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
+ const EMFormatHandler *handle;
int len;
if (!CAMEL_IS_MIME_MESSAGE(dw)) {
@@ -1473,7 +1466,11 @@ emf_message_rfc822(EMFormat *emf, CamelStream *stream, CamelMimePart *part, cons
len = emf->part_id->len;
g_string_append_printf(emf->part_id, ".rfc822");
- em_format_format_message(emf, stream, (CamelMedium *)dw);
+
+ handle = em_format_find_handler(emf, "x-evolution/message/rfc822");
+ if (handle)
+ handle->handler(emf, stream, (CamelMimePart *)dw, handle);
+
g_string_truncate(emf->part_id, len);
}