Convert the Subject header to HTML and also make sure that the Subject,

2001-05-08  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-tools.c (mail_tool_forward_message): Convert the Subject
	header to HTML and also make sure that the Subject, To, and From
	header values are non-NULL before feeding them into
	e_text_to_html().

svn path=/trunk/; revision=9718
This commit is contained in:
Jeffrey Stedfast
2001-05-08 19:18:30 +00:00
committed by Jeffrey Stedfast
parent 1a0cddf01b
commit 2bb791349c
2 changed files with 22 additions and 8 deletions

View File

@ -1,5 +1,10 @@
2001-05-08 Jeffrey Stedfast <fejj@ximian.com>
* mail-tools.c (mail_tool_forward_message): Convert the Subject
header to HTML and also make sure that the Subject, To, and From
header values are non-NULL before feeding them into
e_text_to_html().
* mail-callbacks.c (edit_msg_internal): Free the UIDs if the user
decides to not go through with editing all the messages he
selected.

View File

@ -396,27 +396,36 @@ mail_tool_forward_message (CamelMimeMessage *message)
if (text) {
gchar *ret_text, *credits = NULL;
const CamelInternetAddress *cia;
const char *subject;
char *buf, *from, *to;
char *buf, *from, *to, *subject;
/* create credits */
cia = camel_mime_message_get_from (message);
buf = camel_address_format (CAMEL_ADDRESS (cia));
from = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
g_free (buf);
if (buf) {
from = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
g_free (buf);
} else
from = NULL;
cia = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
buf = camel_address_format (CAMEL_ADDRESS (cia));
to = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
g_free (buf);
if (buf) {
to = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
g_free (buf);
} else
to = NULL;
subject = camel_mime_message_get_subject (message);
buf = (char *) camel_mime_message_get_subject (message);
if (buf)
subject = e_text_to_html (buf, E_TEXT_TO_HTML_CONVERT_NL | E_TEXT_TO_HTML_CONVERT_URLS);
else
subject = "";
credits = g_strdup_printf (_("-----Forwarded Message-----<br>"
"<b>From:</b> %s<br>"
"<b>To:</b> %s<br>"
"<b>Subject:</b> %s<br>"),
from, to, subject);
from ? from : "", to ? to : "", subject);
g_free (from);
g_free (to);