diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-13 06:18:59 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:15 +0800 |
commit | 0477a65401f042cfbae9a636ab76b89f25a6468a (patch) | |
tree | 139be217f8e98e44fb1ea615446a4568992187fc /mail/em-format-html-print.c | |
parent | f21da771776286769f390a6631a1a5fc2a675e76 (diff) | |
download | gsoc2013-evolution-0477a65401f042cfbae9a636ab76b89f25a6468a.tar gsoc2013-evolution-0477a65401f042cfbae9a636ab76b89f25a6468a.tar.gz gsoc2013-evolution-0477a65401f042cfbae9a636ab76b89f25a6468a.tar.bz2 gsoc2013-evolution-0477a65401f042cfbae9a636ab76b89f25a6468a.tar.lz gsoc2013-evolution-0477a65401f042cfbae9a636ab76b89f25a6468a.tar.xz gsoc2013-evolution-0477a65401f042cfbae9a636ab76b89f25a6468a.tar.zst gsoc2013-evolution-0477a65401f042cfbae9a636ab76b89f25a6468a.zip |
em_format_html_print_message(): Require a CamelMimeMessage.
Let EMailReader fetch the CamelMimeMessage itself, handle errors, and
then pass it off to EMFormatHTMLPrint. This also eliminates the need
for em_format_html_print_raw_message().
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); } |