aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog23
-rw-r--r--mail/em-folder-browser.c20
-rw-r--r--mail/em-folder-selector.c2
-rw-r--r--mail/em-folder-tree.c12
-rw-r--r--mail/em-folder-utils.c21
-rw-r--r--mail/em-folder-utils.h17
-rw-r--r--mail/em-format-html-display.c14
-rw-r--r--mail/em-format-html.c24
-rw-r--r--mail/em-format-quote.c21
-rw-r--r--mail/em-format.c15
-rw-r--r--mail/em-format.h10
-rw-r--r--mail/mail-component.c2
12 files changed, 115 insertions, 66 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3477cf791f..194e93db68 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,26 @@
+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.
+
2005-05-17 Radek Doulik <rodo@novell.com>
* em-format-html.c: removed include of htmlengine.h which wasn't
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 257ac8ad38..c93c027bf7 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -576,13 +576,16 @@ emfb_folder_copy(BonoboUIComponent *uid, void *data, const char *path)
CamelFolderInfo *fi = NULL;
CamelException ex;
+ /* FIXME: This function MUST become multi-threaded.
+ FIXME: This interface should NOT use a folderinfo */
+
camel_exception_init (&ex);
if ((fi = camel_store_get_folder_info (emfb->view.folder->parent_store,
emfb->view.folder->full_name,
CAMEL_STORE_FOLDER_INFO_FAST,
&ex)) != NULL)
- emfu_copy_folder (fi);
+ em_folder_utils_copy_folder (fi);
camel_exception_clear (&ex);
@@ -598,11 +601,14 @@ emfb_folder_move(BonoboUIComponent *uid, void *data, const char *path)
camel_exception_init (&ex);
+ /* FIXME: This function MUST become multi-threaded.
+ FIXME: This interface should NOT use a folderinfo */
+
if ((fi = camel_store_get_folder_info (emfb->view.folder->parent_store,
emfb->view.folder->full_name,
CAMEL_STORE_FOLDER_INFO_FAST,
&ex)) != NULL)
- emfu_move_folder (fi);
+ em_folder_utils_move_folder (fi);
camel_exception_clear (&ex);
@@ -614,7 +620,7 @@ emfb_folder_delete(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderBrowser *emfb = data;
- emfu_delete_folder (emfb->view.folder);
+ em_folder_utils_delete_folder (emfb->view.folder);
return;
}
@@ -624,7 +630,7 @@ emfb_folder_rename(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderBrowser *emfb = data;
- emfu_rename_folder (emfb->view.folder);
+ em_folder_utils_rename_folder (emfb->view.folder);
return;
}
@@ -638,14 +644,16 @@ emfb_folder_create(BonoboUIComponent *uid, void *data, const char *path)
camel_exception_init (&ex);
+ /* FIXME: This function MUST be multithreaded
+ FIXME: This interface should NOT use a folderinfo */
if (emfb->view.folder) {
if ((fi = camel_store_get_folder_info (emfb->view.folder->parent_store,
emfb->view.folder->full_name,
CAMEL_STORE_FOLDER_INFO_FAST,
&ex)) != NULL)
- emfu_folder_create (fi);
+ em_folder_utils_create_folder(fi);
} else {
- emfu_folder_create (NULL);
+ em_folder_utils_create_folder(NULL);
}
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index 4a88e29ad9..73d0e75cb7 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -161,7 +161,7 @@ emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs)
if (response != EM_FOLDER_SELECTOR_RESPONSE_NEW)
return;
- emfu_folder_create (NULL);
+ em_folder_utils_create_folder(NULL);
g_signal_stop_emission_by_name (emfs, "response");
}
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index ed96710a99..426c8527e2 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2002,7 +2002,6 @@ emft_popup_open_new (GtkWidget *item, EMFolderTree *emft)
}
#endif
-
static void
emft_popup_copy(EPopup *ep, EPopupItem *item, void *data)
{
@@ -2010,7 +2009,7 @@ emft_popup_copy(EPopup *ep, EPopupItem *item, void *data)
CamelFolderInfo *fi = NULL;
if ((fi = em_folder_tree_get_selected_folder_info (emft)) != NULL) {
- emfu_copy_folder (fi);
+ em_folder_utils_copy_folder (fi);
}
}
@@ -2021,7 +2020,7 @@ emft_popup_move(EPopup *ep, EPopupItem *item, void *data)
CamelFolderInfo *fi = NULL;
if ((fi = em_folder_tree_get_selected_folder_info (emft)) != NULL) {
- emfu_copy_folder (fi);
+ em_folder_utils_copy_folder(fi);
}
}
@@ -2032,7 +2031,7 @@ emft_popup_new_folder (EPopup *ep, EPopupItem *pitem, void *data)
CamelFolderInfo *fi;
if ((fi = em_folder_tree_get_selected_folder_info (emft)) != NULL) {
- emfu_folder_create (fi);
+ em_folder_utils_create_folder(fi);
}
}
@@ -2069,7 +2068,7 @@ emft_popup_delete_folder (EPopup *ep, EPopupItem *pitem, void *data)
CamelFolder *folder;
if ((folder = em_folder_tree_get_selected_folder (emft)) != NULL) {
- emfu_delete_folder (folder);
+ em_folder_utils_delete_folder(folder);
}
}
@@ -2080,11 +2079,10 @@ emft_popup_rename_folder (EPopup *ep, EPopupItem *pitem, void *data)
CamelFolder *folder;
if ((folder = em_folder_tree_get_selected_folder (emft)) != NULL) {
- emfu_rename_folder (folder);
+ em_folder_utils_rename_folder(folder);
}
}
-
static void
emft_popup_properties (EPopup *ep, EPopupItem *pitem, void *data)
{
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index 32ebb59a73..844f4b8bb5 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -353,8 +353,10 @@ emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *i
return (flags & EMFT_EXCLUDE_NOINFERIORS) == 0;
}
+/* FIXME: this interface references the folderinfo without copying it */
+/* FIXME: these functions must be documented */
void
-emfu_copy_folder (CamelFolderInfo *folderinfo)
+em_folder_utils_copy_folder (CamelFolderInfo *folderinfo)
{
struct _copy_folder_data *cfd;
@@ -366,11 +368,14 @@ emfu_copy_folder (CamelFolderInfo *folderinfo)
NULL, emfu_copy_folder_exclude,
emfu_copy_folder_selected, cfd);}
+
+/* FIXME: this interface references the folderinfo without copying it */
+/* FIXME: these functions must be documented */
void
-emfu_move_folder (CamelFolderInfo *folderinfo)
+em_folder_utils_move_folder (CamelFolderInfo *folderinfo)
{
struct _copy_folder_data *cfd;
-
+
cfd = g_malloc (sizeof (*cfd));
cfd->fi = folderinfo;
cfd->delete = TRUE;
@@ -463,8 +468,9 @@ emfu_delete_response (GtkWidget *dialog, int response, gpointer data)
gtk_widget_destroy (dialog);
}
+/* FIXME: these functions must be documented */
void
-emfu_delete_folder (CamelFolder *folder)
+em_folder_utils_delete_folder (CamelFolder *folder)
{
CamelStore *local;
GtkWidget *dialog;
@@ -487,8 +493,10 @@ emfu_delete_folder (CamelFolder *folder)
gtk_widget_show (dialog);
}
+/* FIXME: this must become threaded */
+/* FIXME: these functions must be documented */
void
-emfu_rename_folder (CamelFolder *folder)
+em_folder_utils_rename_folder (CamelFolder *folder)
{
char *prompt, *new_name;
const char *p;
@@ -727,8 +735,9 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs, int response, gpointer d
camel_exception_clear (&ex);
}
+/* FIXME: these functions must be documented */
void
-emfu_folder_create (CamelFolderInfo *folderinfo) {
+em_folder_utils_create_folder (CamelFolderInfo *folderinfo) {
EMFolderTree *folder_tree;
EMFolderTreeModel *model;
GtkWidget *dialog;
diff --git a/mail/em-folder-utils.h b/mail/em-folder-utils.h
index ceec49ced1..c8b8438777 100644
--- a/mail/em-folder-utils.h
+++ b/mail/em-folder-utils.h
@@ -21,12 +21,17 @@
*
*/
-#include <camel/camel-store.h>
+#ifndef _EM_FOLDER_UTILS_H
+#define _EM_FOLDER_UTILS_H
-void emfu_copy_folder (CamelFolderInfo *folderinfo);
-void emfu_move_folder (CamelFolderInfo *folderinfo);
+/* FIXME: These api's are really busted, there is no consistency and most rely on the wrong data */
-void emfu_delete_folder (CamelFolder *folder);
-void emfu_rename_folder (CamelFolder *folder);
+void em_folder_utils_copy_folder (struct _CamelFolderInfo *folderinfo);
+void em_folder_utils_move_folder (struct _CamelFolderInfo *folderinfo);
-void emfu_folder_create (CamelFolderInfo *folderinfo);
+void em_folder_utils_delete_folder (struct _CamelFolder *folder);
+void em_folder_utils_rename_folder (struct _CamelFolder *folder);
+
+void em_folder_utils_create_folder (struct _CamelFolderInfo *folderinfo);
+
+#endif
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 0bf61bd145..c835dd1541 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -125,11 +125,11 @@ static void efhd_iframe_created(GtkHTML *html, GtkHTML *iframe, EMFormatHTMLDisp
/*static void efhd_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTMLDisplay *efh);
static gboolean efhd_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTMLDisplay *efh);*/
+static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info);
+
static const EMFormatHandler *efhd_find_handler(EMFormat *emf, const char *mime_type);
static void efhd_format_clone(EMFormat *, CamelFolder *folder, const char *, CamelMimeMessage *msg, EMFormat *);
-static void efhd_format_prefix(EMFormat *emf, CamelStream *stream);
static void efhd_format_error(EMFormat *emf, CamelStream *stream, const char *txt);
-static void efhd_format_message(EMFormat *, CamelStream *, CamelMedium *);
static void efhd_format_source(EMFormat *, CamelStream *, CamelMimePart *);
static void efhd_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
static void efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
@@ -274,9 +274,7 @@ efhd_class_init(GObjectClass *klass)
{
((EMFormatClass *)klass)->find_handler = efhd_find_handler;
((EMFormatClass *)klass)->format_clone = efhd_format_clone;
- ((EMFormatClass *)klass)->format_prefix = efhd_format_prefix;
((EMFormatClass *)klass)->format_error = efhd_format_error;
- ((EMFormatClass *)klass)->format_message = efhd_format_message;
((EMFormatClass *)klass)->format_source = efhd_format_source;
((EMFormatClass *)klass)->format_attachment = efhd_format_attachment;
((EMFormatClass *)klass)->format_secure = efhd_format_secure;
@@ -908,6 +906,7 @@ efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Came
/* ********************************************************************** */
static EMFormatHandler type_builtin_table[] = {
+ { "x-evolution/message/prefix", (EMFormatFunc)efhd_message_prefix },
};
static void
@@ -970,7 +969,7 @@ efhd_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
camel_stream_close(stream);
}
-static void efhd_format_prefix(EMFormat *emf, CamelStream *stream)
+static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
const char *flag, *comp, *due;
time_t date;
@@ -1035,11 +1034,6 @@ static void efhd_format_error(EMFormat *emf, CamelStream *stream, const char *tx
((EMFormatClass *)efhd_parent)->format_error(emf, stream, txt);
}
-static void efhd_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *part)
-{
- ((EMFormatClass *)efhd_parent)->format_message(emf, stream, part);
-}
-
static void efhd_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
{
((EMFormatClass *)efhd_parent)->format_source(emf, stream, part);
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 87d840923d..d00387ba80 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -95,9 +95,10 @@ static void efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *han
static gboolean efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh);
static void efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh);
+static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info);
+
static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource);
static void efh_format_error(EMFormat *emf, CamelStream *stream, const char *txt);
-static void efh_format_message(EMFormat *, CamelStream *, CamelMedium *);
static void efh_format_source(EMFormat *, CamelStream *, CamelMimePart *);
static void efh_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
static void efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
@@ -219,7 +220,6 @@ efh_class_init(GObjectClass *klass)
{
((EMFormatClass *)klass)->format_clone = efh_format_clone;
((EMFormatClass *)klass)->format_error = efh_format_error;
- ((EMFormatClass *)klass)->format_message = efh_format_message;
((EMFormatClass *)klass)->format_source = efh_format_source;
((EMFormatClass *)klass)->format_attachment = efh_format_attachment;
((EMFormatClass *)klass)->format_secure = efh_format_secure;
@@ -1106,6 +1106,10 @@ static EMFormatHandler type_builtin_table[] = {
{ "image/jpg", (EMFormatFunc)efh_image },
{ "image/pjpeg", (EMFormatFunc)efh_image },
+
+ /* special internal types */
+
+ { "x-evolution/message/rfc822", (EMFormatFunc)efh_format_message }
};
static void
@@ -1159,8 +1163,14 @@ static void efh_format_do(struct _mail_msg *mm)
if (((EMFormat *)m->format)->mode == EM_FORMAT_SOURCE) {
em_format_format_source((EMFormat *)m->format, (CamelStream *)m->estream, (CamelMimePart *)m->message);
} else {
- em_format_format_prefix((EMFormat *)m->format, (CamelStream *)m->estream);
- em_format_format_message((EMFormat *)m->format, (CamelStream *)m->estream, (CamelMedium *)m->message);
+ const EMFormatHandler *handle;
+
+ handle = em_format_find_handler((EMFormat *)m->format, "x-evolution/message/prefix");
+ if (handle)
+ handle->handler((EMFormat *)m->format, (CamelStream *)m->estream, (CamelMimePart *)m->message, handle);
+ handle = em_format_find_handler((EMFormat *)m->format, "x-evolution/message/rfc822");
+ if (handle)
+ handle->handler((EMFormat *)m->format, (CamelStream *)m->estream, (CamelMimePart *)m->message, handle);
}
camel_stream_flush((CamelStream *)m->estream);
@@ -1688,7 +1698,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
}
}
-static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *part)
+static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
/* TODO: make this validity stuff a method */
EMFormatHTML *efh = (EMFormatHTML *) emf;
@@ -1701,10 +1711,10 @@ static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *
camel_stream_printf(stream, "<blockquote>\n");
if (!efh->hide_headers)
- efh_format_headers(efh, stream, part);
+ efh_format_headers(efh, stream, (CamelMedium *)part);
camel_stream_printf(stream, EM_FORMAT_HTML_VPAD);
- em_format_part(emf, stream, (CamelMimePart *)part);
+ em_format_part(emf, stream, part);
if (emf->message != (CamelMimeMessage *)part)
camel_stream_printf(stream, "</blockquote>\n");
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
index b6a2dffc16..f7df8fcccc 100644
--- a/mail/em-format-quote.c
+++ b/mail/em-format-quote.c
@@ -46,7 +46,7 @@ struct _EMFormatQuotePrivate {
static void emfq_format_clone(EMFormat *, CamelFolder *, const char *, CamelMimeMessage *, EMFormat *);
static void emfq_format_error(EMFormat *emf, CamelStream *stream, const char *txt);
-static void emfq_format_message(EMFormat *, CamelStream *, CamelMedium *);
+static void emfq_format_message(EMFormat *, CamelStream *, CamelMimePart *, const EMFormatHandler *);
static void emfq_format_source(EMFormat *, CamelStream *, CamelMimePart *);
static void emfq_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
@@ -90,7 +90,6 @@ emfq_class_init(GObjectClass *klass)
{
((EMFormatClass *) klass)->format_clone = emfq_format_clone;
((EMFormatClass *) klass)->format_error = emfq_format_error;
- ((EMFormatClass *) klass)->format_message = emfq_format_message;
((EMFormatClass *) klass)->format_source = emfq_format_source;
((EMFormatClass *) klass)->format_attachment = emfq_format_attachment;
@@ -138,11 +137,16 @@ static void
emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *src)
{
EMFormatQuote *emfq = (EMFormatQuote *) emf;
-
+ const EMFormatHandler *handle;
+
((EMFormatClass *)emfq_parent)->format_clone(emf, folder, uid, msg, src);
camel_stream_reset(emfq->stream);
- em_format_format_message(emf, emfq->stream, (CamelMedium *)msg);
+
+ handle = em_format_find_handler(emf, "x-evolution/message/rfc822");
+ if (handle)
+ handle->handler(emf, emfq->stream, (CamelMimePart *)msg, handle);
+
camel_stream_flush(emfq->stream);
g_signal_emit_by_name(emf, "complete");
@@ -359,7 +363,7 @@ emfq_format_headers (EMFormatQuote *emfq, CamelStream *stream, CamelMedium *part
}
static void
-emfq_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *part)
+emfq_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
EMFormatQuote *emfq = (EMFormatQuote *) emf;
@@ -373,9 +377,9 @@ emfq_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *part)
emfq->citation_colour & 0xffffff);
if (emfq->flags & EM_FORMAT_QUOTE_HEADERS)
- emfq_format_headers (emfq, stream, part);
+ emfq_format_headers (emfq, stream, (CamelMedium *)part);
- em_format_part (emf, stream, (CamelMimePart *) part);
+ em_format_part (emf, stream, part);
if (emfq->flags & EM_FORMAT_QUOTE_CITE)
camel_stream_write_string(stream, "</blockquote></font><!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->");
@@ -510,6 +514,9 @@ static EMFormatHandler type_builtin_table[] = {
/* { "multipart/related",(EMFormatFunc)emfq_multipart_related },*/
{ "message/external-body", (EMFormatFunc)emfq_ignore },
{ "multipart/appledouble", (EMFormatFunc)emfq_ignore },
+
+ /* internal evolution types */
+ { "x-evolution/message/rfc822", (EMFormatFunc)emfq_format_message },
};
static void
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);
}
diff --git a/mail/em-format.h b/mail/em-format.h
index a822809bc1..8800019a9f 100644
--- a/mail/em-format.h
+++ b/mail/em-format.h
@@ -239,16 +239,16 @@ struct _EMFormatClass {
/* start formatting a message */
void (*format_clone)(EMFormat *, struct _CamelFolder *, const char *uid, struct _CamelMimeMessage *, EMFormat *);
- /* called to insert prefix material, after format_clone but before format_message */
- void (*format_prefix)(EMFormat *, struct _CamelStream *);
+ void *dummy0;
/* some internel error/inconsistency */
void (*format_error)(EMFormat *, struct _CamelStream *, const char *msg);
/* use for external structured parts */
void (*format_attachment)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *, const char *mime_type, const struct _EMFormatHandler *info);
- /* for any message parts */
- void (*format_message)(EMFormat *, struct _CamelStream *, struct _CamelMedium *);
+
+ void *dummy1;
+
/* use for unparsable content */
void (*format_source)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *);
/* for outputing secure(d) content */
@@ -303,7 +303,6 @@ void em_format_pull_level(EMFormat *emf);
#define em_format_format_clone(emf, folder, uid, msg, src) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_clone((emf), (folder), (uid), (msg), (src))
/* formats a new message */
#define em_format_format(emf, folder, uid, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_clone((emf), (folder), (uid), (msg), NULL)
-#define em_format_format_prefix(emf, stream) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_prefix((emf), (stream))
#define em_format_redraw(emf) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_clone((emf), \
((EMFormat *)(emf))->folder, \
((EMFormat *)(emf))->uid, \
@@ -311,7 +310,6 @@ void em_format_pull_level(EMFormat *emf);
(emf))
void em_format_format_error(EMFormat *emf, struct _CamelStream *stream, const char *fmt, ...);
#define em_format_format_attachment(emf, stream, msg, type, info) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_attachment((emf), (stream), (msg), (type), (info))
-#define em_format_format_message(emf, stream, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_message((emf), (stream), (msg))
#define em_format_format_source(emf, stream, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_source((emf), (stream), (msg))
void em_format_format_secure(EMFormat *emf, struct _CamelStream *stream, struct _CamelMimePart *part, struct _CamelCipherValidity *valid);
diff --git a/mail/mail-component.c b/mail/mail-component.c
index c37991625c..6679c08bb6 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -746,7 +746,7 @@ create_item(const char *type, EMFolderTreeModel *model, const char *uri)
em_utils_compose_new_message(uri);
} else if (strcmp(type, "folder") == 0) {
- emfu_folder_create (NULL);
+ em_folder_utils_create_folder(NULL);
} else
return -1;