aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-11-22 06:09:51 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-11-22 06:09:51 +0800
commit0fa1b87e9ee6b947b2706a44fc7429730655b3f9 (patch)
tree186d98fc1423fdd9d86a85a251c78230a2c3060c /mail/mail-format.c
parentfb92b831ae35b70f52a9792422f610defa56517b (diff)
downloadgsoc2013-evolution-0fa1b87e9ee6b947b2706a44fc7429730655b3f9.tar.gz
gsoc2013-evolution-0fa1b87e9ee6b947b2706a44fc7429730655b3f9.tar.zst
gsoc2013-evolution-0fa1b87e9ee6b947b2706a44fc7429730655b3f9.zip
New function to return if user wants to view message source.
2000-11-21 Jeffrey Stedfast <fejj@helixcode.com> * mail-config.c (mail_config_view_source): New function to return if user wants to view message source. (mail_config_set_view_source): New function to set whether the view wants to view source. * mail-ops.c (mail_do_view_message_sources): Removed. We're not gonna view-source this way anymore. * folder-browser-factory.c: Removed the ViewSource bonobo verb from the Message menu. (control_activate): Added ViewSource. * folder-browser.c (on_right_click): Removed Message menu item to view message source. (folder_browser_toggle_view_source): New callback to set whether or not the MailDisplay shows the raw message or the pretty-ified message. * mail-callbacks.c: Removed view_source. * mail-display.c (redisplay): If toggle_raw is set then display the raw message else display the pretty formatted message. (mail_display_redisplay): New function to force the redisplay of a message. * mail-format.c (mail_format_raw_message): New function to write the raw message data. svn path=/trunk/; revision=6639
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r--mail/mail-format.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c
index d85f54febf..8b78c01860 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -40,6 +40,8 @@
#include <string.h> /* for strstr */
#include <fcntl.h>
+static char *get_data_wrapper_text (CamelDataWrapper *data);
+
static char *try_inline_pgp (char *start, MailDisplay *md);
static char *try_uudecoding (char *start, MailDisplay *md);
static char *try_inline_binhex (char *start, MailDisplay *md);
@@ -140,11 +142,32 @@ mail_format_mime_message (CamelMimeMessage *mime_message, MailDisplay *md)
g_datalist_set_data_full (md->data, "urls", urls,
free_urls);
}
-
+
write_headers (mime_message, md);
call_handler_function (CAMEL_MIME_PART (mime_message), md);
}
+
+/**
+ * mail_format_raw_message:
+ * @mime_message: the input mime message
+ * @md: the MailDisplay to render into
+ *
+ * Writes a CamelMimeMessage source out into a MailDisplay
+ **/
+void
+mail_format_raw_message (CamelMimeMessage *mime_message, MailDisplay *md)
+{
+ gchar *text;
+
+ g_return_if_fail (CAMEL_IS_MIME_MESSAGE (mime_message));
+
+ text = get_data_wrapper_text (CAMEL_DATA_WRAPPER (mime_message));
+ fprintf (stderr, "****** %s\n", text ? "yes! we have text" : "nope...no text");
+ mail_text_write (md->html, md->stream, text ? text : "");
+ g_free (text);
+}
+
static const char *
get_cid (CamelMimePart *part, MailDisplay *md)
{