diff options
Diffstat (limited to 'mail/em-format-html-print.c')
-rw-r--r-- | mail/em-format-html-print.c | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c index 1be0e5ed63..e6da0c983a 100644 --- a/mail/em-format-html-print.c +++ b/mail/em-format-html-print.c @@ -222,36 +222,14 @@ emfhp_complete (EMFormatHTMLPrint *efhp) g_object_unref (operation); } -static void -emfhp_got_message (CamelFolder *folder, - const gchar *uid, - CamelMimeMessage *msg, - gpointer data) -{ - EMFormatHTMLPrint *efhp = data; - - if (msg == NULL) { - g_object_unref (efhp); - return; - } - - em_format_html_load_images (EM_FORMAT_HTML (efhp)); - - g_signal_connect ( - efhp, "complete", G_CALLBACK (emfhp_complete), efhp); - - /* FIXME Not passing a GCancellable here. */ - em_format_format_clone ( - (EMFormat *) efhp, folder, uid, msg, - (EMFormat *) efhp->source, NULL); -} - void em_format_html_print_message (EMFormatHTMLPrint *efhp, + CamelMimeMessage *message, CamelFolder *folder, - const gchar *uid) + const gchar *message_uid) { - g_object_ref (efhp); + g_return_if_fail (EM_IS_FORMAT_HTML_PRINT (efhp)); + g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message)); /* Wrap flags to display all entries by default.*/ EM_FORMAT_HTML (efhp)->header_wrap_flags |= @@ -259,15 +237,14 @@ em_format_html_print_message (EMFormatHTMLPrint *efhp, EM_FORMAT_HTML_HEADER_CC | EM_FORMAT_HTML_HEADER_BCC; - mail_get_message ( - folder, uid, emfhp_got_message, efhp, mail_msg_unordered_push); -} + em_format_html_load_images (EM_FORMAT_HTML (efhp)); -void -em_format_html_print_raw_message (EMFormatHTMLPrint *efhp, - CamelMimeMessage *msg) -{ - g_object_ref (efhp); + g_signal_connect ( + efhp, "complete", G_CALLBACK (emfhp_complete), efhp); - emfhp_got_message (NULL, NULL, msg, efhp); + /* FIXME Not passing a GCancellable here. */ + em_format_format_clone ( + EM_FORMAT (efhp), + folder, message_uid, message, + EM_FORMAT (efhp->source), NULL); } |