aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-02-07 05:03:33 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-02-07 05:03:33 +0800
commitf1088a30d366f1362f31d1b0422452ad058a2640 (patch)
treea80173251e37d501783ffbad0490786de5bc77a1 /mail/em-format-html.c
parent08df2dcd198fb9680323315c7c290fd2b96787c6 (diff)
downloadgsoc2013-evolution-f1088a30d366f1362f31d1b0422452ad058a2640.tar.gz
gsoc2013-evolution-f1088a30d366f1362f31d1b0422452ad058a2640.tar.zst
gsoc2013-evolution-f1088a30d366f1362f31d1b0422452ad058a2640.zip
Make private (only EMFormatHTMLQuote used it and that class is no longer
2004-02-06 Jeffrey Stedfast <fejj@ximian.com> * em-format-html.c (efh_format_headers): Make private (only EMFormatHTMLQuote used it and that class is no longer in use). (efh_format_message): Updated for above change. * em-format-quote.c (emfq_format_message): Always write a \n after the credits line. svn path=/trunk/; revision=24661
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r--mail/em-format-html.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 75adb279e2..75ed9ff0ff 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -202,7 +202,7 @@ efh_class_init(GObjectClass *klass)
((EMFormatClass *)klass)->format_attachment = efh_format_attachment;
((EMFormatClass *)klass)->format_secure = efh_format_secure;
((EMFormatClass *)klass)->busy = efh_busy;
-
+
klass->finalize = efh_finalise;
}
@@ -1326,23 +1326,23 @@ static void efh_format_error(EMFormat *emf, CamelStream *stream, const char *txt
}
static void
-efh_format_text_header(EMFormat *emf, CamelStream *stream, const char *label, const char *value, guint32 flags)
+efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const char *label, const char *value, guint32 flags)
{
char *mhtml = NULL;
const char *fmt, *html;
-
+
if (value == NULL)
return;
-
+
while (*value == ' ')
value++;
-
+
if (flags & EM_FORMAT_HTML_HEADER_HTML)
html = value;
else
- html = mhtml = camel_text_to_html(value, ((EMFormatHTML *)emf)->text_html_flags, 0);
-
- if (((EMFormatHTML *)emf)->simple_headers) {
+ html = mhtml = camel_text_to_html (value, emfh->text_html_flags, 0);
+
+ if (emfh->simple_headers) {
fmt = "<b>%s</b>: %s<br>";
} else {
if (flags & EM_FORMAT_HTML_HEADER_NOCOLUMNS) {
@@ -1541,17 +1541,18 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, const c
label = namein;
}
- efh_format_text_header (emf, stream, label, txt, flags);
+ efh_format_text_header (efh, stream, label, txt, flags);
+
g_free (value);
}
-void
-em_format_html_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
+static void
+efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
{
+ EMFormat *emf = (EMFormat *) efh;
EMFormatHeader *h;
const char *charset;
CamelContentType *ct;
-#define emf ((EMFormat *)efh)
ct = camel_mime_part_get_content_type((CamelMimePart *)part);
charset = camel_content_type_param (ct, "charset");
@@ -1579,17 +1580,15 @@ em_format_html_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMediu
h = h->next;
}
}
-
+
if (!efh->simple_headers)
- camel_stream_printf(stream,
- "</table>\n</font>\n");
-#undef emf
+ camel_stream_printf (stream, "</table>\n</font>\n");
}
static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *part)
{
-#define efh ((EMFormatHTML *)emf)
/* TODO: make this validity stuff a method */
+ EMFormatHTML *efh = (EMFormatHTML *) emf;
CamelCipherValidity *save = emf->valid, *save_parent = emf->valid_parent;
emf->valid = NULL;
@@ -1599,8 +1598,8 @@ static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *
camel_stream_printf(stream, "<blockquote>\n");
if (!efh->hide_headers)
- em_format_html_format_headers(efh, stream, part);
-
+ efh_format_headers(efh, stream, part);
+
camel_stream_printf(stream, "<table height=6><tr><td><a></a></td></tr></table>\n");
em_format_part(emf, stream, (CamelMimePart *)part);
@@ -1611,7 +1610,6 @@ static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *
emf->valid = save;
emf->valid_parent = save_parent;
-#undef efh
}
static void efh_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part)