From 79d83995442cf9958cb382a2b949c4154b995ef9 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Mon, 17 Dec 2001 21:16:30 +0000 Subject: Avoid embedding tags when we are printing. 2001-12-17 Jon Trowbridge * mail-format.c (attachment_header): Avoid embedding tags when we are printing. (handle_multipart_signed): Don't do the click-for-info signature stuff when we are printing. (handle_via_bonobo): Don't embed an tag if we are printing. * folder-browser.c: Changed context_menu[] array so that we can print when the preview pane is closed. svn path=/trunk/; revision=15139 --- mail/mail-format.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'mail/mail-format.c') diff --git a/mail/mail-format.c b/mail/mail-format.c index 74ffc99a22..b3bd1379b2 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -624,13 +624,19 @@ attachment_header (CamelMimePart *part, const char *mime_type, MailDisplay *md, const char *info; /* Start the table, create the pop-up object. */ - gtk_html_stream_printf (stream, - "" - "" - "" - "" - "
", - get_cid (part, md), mime_type); + mail_html_write (html, stream, + "" + ""); + + if (! md->printing) { + gtk_html_stream_printf (stream, "", + get_cid (part, md), mime_type); + } + + mail_html_write (html, stream, + "" + "
"); + /* Write the MIME type */ info = gnome_vfs_mime_get_value (mime_type, "description"); @@ -1729,7 +1735,7 @@ handle_multipart_signed (CamelMimePart *part, const char *mime_type, subpart = camel_multipart_get_part (mp, i); mail_part_set_default_displayed_inline (subpart, md, FALSE); - if (!mail_part_is_displayed_inline (subpart, md)) { + if (!mail_part_is_displayed_inline (subpart, md) && !md->printing) { char *url; /* Write out the click-for-info object */ @@ -1790,7 +1796,7 @@ handle_multipart_signed (CamelMimePart *part, const char *mime_type, } if (message) { - gtk_html_stream_printf (stream, "", good ? "" : "color=red"); + gtk_html_stream_printf (stream, "", good || md->printing ? "" : "color=red"); mail_text_write (html, stream, md->printing, message); mail_html_write (html, stream, ""); } @@ -2078,9 +2084,12 @@ static gboolean handle_via_bonobo (CamelMimePart *part, const char *mime_type, MailDisplay *md, GtkHTML *html, GtkHTMLStream *stream) { - gtk_html_stream_printf (stream, - "", - get_cid (part, md), mime_type); + if (! md->printing) { + gtk_html_stream_printf (stream, + "", + get_cid (part, md), mime_type); + } + return TRUE; } -- cgit v1.2.3