aboutsummaryrefslogtreecommitdiffstats
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
parent08df2dcd198fb9680323315c7c290fd2b96787c6 (diff)
downloadgsoc2013-evolution-f1088a30d366f1362f31d1b0422452ad058a2640.tar
gsoc2013-evolution-f1088a30d366f1362f31d1b0422452ad058a2640.tar.gz
gsoc2013-evolution-f1088a30d366f1362f31d1b0422452ad058a2640.tar.bz2
gsoc2013-evolution-f1088a30d366f1362f31d1b0422452ad058a2640.tar.lz
gsoc2013-evolution-f1088a30d366f1362f31d1b0422452ad058a2640.tar.xz
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
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-format-html.c38
-rw-r--r--mail/em-format-html.h4
-rw-r--r--mail/em-format-quote.c14
-rw-r--r--mail/em-format-quote.h4
5 files changed, 35 insertions, 32 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index bbffaac3ed..cd7abf25a6 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,12 @@
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.
+
* em-subscribe-editor.c (sub_folderinfo_get): Set the NO_VIRTUAL
flag bit for get_folder_info(). Fixes bug #51887.
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)
diff --git a/mail/em-format-html.h b/mail/em-format-html.h
index cd1365e620..65c242a415 100644
--- a/mail/em-format-html.h
+++ b/mail/em-format-html.h
@@ -124,6 +124,7 @@ struct _EMFormatHTML {
struct _EMFormatHTMLClass {
EMFormatClass format_class;
+
};
GType em_format_html_get_type(void);
@@ -135,9 +136,6 @@ void em_format_html_set_load_http(EMFormatHTML *emf, int state);
void em_format_html_set_mark_citations(EMFormatHTML *emf, int state, guint32 citation_colour);
void em_format_html_set_xmailer_mask(EMFormatHTML *emf, unsigned int xmailer_mask);
-/* output headers */
-void em_format_html_format_headers(EMFormatHTML *efh, struct _CamelStream *stream, struct _CamelMedium *part);
-
/* retrieves a pseudo-part icon wrapper for a file */
struct _CamelMimePart *em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *path, const char *name);
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
index b8173376e8..a58cf05583 100644
--- a/mail/em-format-quote.c
+++ b/mail/em-format-quote.c
@@ -129,8 +129,8 @@ em_format_quote_new(const char *credits, CamelStream *stream, guint32 flags)
static void
emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *src)
{
-#define emfq ((EMFormatQuote *)emf)
-
+ EMFormatQuote *emfq = (EMFormatQuote *) emf;
+
((EMFormatClass *)emfq_parent)->format_clone(emf, folder, uid, msg, src);
camel_stream_reset(emfq->stream);
@@ -138,30 +138,30 @@ emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMime
camel_stream_flush(emfq->stream);
g_signal_emit_by_name(emf, "complete");
-#undef emfq
}
static void
emfq_format_error(EMFormat *emf, CamelStream *stream, const char *txt)
{
- /* FIXME: should we even bother writign error text for quoting? probably not... */
+ /* FIXME: should we even bother writing error text for quoting? probably not... */
}
static void
emfq_format_message(EMFormat *emf, CamelStream *stream, CamelMedium *part)
{
- EMFormatQuote *emfq =(EMFormatQuote *) emf;
+ EMFormatQuote *emfq = (EMFormatQuote *) emf;
if (emfq->credits)
camel_stream_printf(stream, "%s", emfq->credits);
-
if (emfq->flags & EM_FORMAT_QUOTE_CITE)
camel_stream_printf(stream, "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->\n"
"<blockquote type=cite>\n"
"<font color=\"#%06x\">\n",
emfq->citation_colour & 0xffffff);
-
+ else
+ camel_stream_write (stream, "\n", 1);
+
if (emfq->flags & EM_FORMAT_QUOTE_HEADERS) {
camel_stream_printf(stream, "<b>To: </b> Header goes here<br>");
}
diff --git a/mail/em-format-quote.h b/mail/em-format-quote.h
index 218937b935..4c25179389 100644
--- a/mail/em-format-quote.h
+++ b/mail/em-format-quote.h
@@ -49,8 +49,8 @@ struct _EMFormatQuoteClass {
EMFormatClass format_class;
};
-GType em_format_quote_get_type(void);
+GType em_format_quote_get_type (void);
-EMFormatQuote *em_format_quote_new(const char *, struct _CamelStream *, guint32 flags);
+EMFormatQuote *em_format_quote_new (const char *credits, struct _CamelStream *stream, guint32 flags);
#endif /* !_EM_FORMAT_QUOTE_H */