diff options
author | Radek Doulik <rodo@ximian.com> | 2001-04-25 17:32:46 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2001-04-25 17:32:46 +0800 |
commit | b024121e896a03f60f92496b9ed5df259547aa7a (patch) | |
tree | 1b2df13b389d52170f80831103f4b0e4251a00dc /mail/mail-tools.c | |
parent | 0f25a9078109a26a08f909c6d2c34e1289c543d8 (diff) | |
download | gsoc2013-evolution-b024121e896a03f60f92496b9ed5df259547aa7a.tar gsoc2013-evolution-b024121e896a03f60f92496b9ed5df259547aa7a.tar.gz gsoc2013-evolution-b024121e896a03f60f92496b9ed5df259547aa7a.tar.bz2 gsoc2013-evolution-b024121e896a03f60f92496b9ed5df259547aa7a.tar.lz gsoc2013-evolution-b024121e896a03f60f92496b9ed5df259547aa7a.tar.xz gsoc2013-evolution-b024121e896a03f60f92496b9ed5df259547aa7a.tar.zst gsoc2013-evolution-b024121e896a03f60f92496b9ed5df259547aa7a.zip |
signature changing
* signature changing
2001-04-25 Radek Doulik <rodo@ximian.com>
* mail-tools.c (mail_tool_quote_message): set object data directly
in HTML source
* mail-callbacks.c (mail_generate_reply): remove \n from citation
(mail_generate_reply): don't use e_msg_composer_mark_text_orig
svn path=/trunk/; revision=9558
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r-- | mail/mail-tools.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c index c78182128d..97433457a0 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -310,15 +310,15 @@ mail_tool_quote_message (CamelMimeMessage *message, const char *fmt, ...) } if (is_html) { - ret_text = g_strdup_printf ("<blockquote><i><font color=\"%06x\">\n%s%s%s\n" - "</font></i></blockquote>\n", - mail_config_get_citation_color (), + ret_text = g_strdup_printf ("%s<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->" + "<blockquote><i><font color=\"%06x\">\n%s\n" + "</font></i></blockquote>" + "<!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->", credits ? credits : "", - credits ? "\n" : "", - text); + mail_config_get_citation_color (), text); } else { - gchar *s, *d, *quoted_text; - gint lines, len, offset = 0; + gchar *s, *d, *quoted_text, *orig_text; + gint lines, len; /* Count the number of lines in the body. If * the text ends with a \n, this will be one @@ -328,21 +328,15 @@ mail_tool_quote_message (CamelMimeMessage *message, const char *fmt, ...) for (s = text, lines = 0; s; s = strchr (s + 1, '\n')) lines++; - offset = credits ? strlen (credits) : 0; - /* offset is the size of the credits, strlen (text) * covers the body, lines * 2 does the "> "s, and * the last +2 covers the final "\0", plus an extra * "\n" in case text doesn't end with one. */ - quoted_text = g_malloc (offset + strlen (text) + - lines * 2 + 2); - - if (credits) - memcpy (quoted_text, credits, offset); + quoted_text = g_malloc (strlen (text) + lines * 2 + 2); s = text; - d = quoted_text + offset; + d = quoted_text; /* Copy text to quoted_text line by line, * prepending "> ". @@ -360,14 +354,21 @@ mail_tool_quote_message (CamelMimeMessage *message, const char *fmt, ...) *d = '\0'; /* Now convert that to HTML. */ - ret_text = e_text_to_html_full (quoted_text, E_TEXT_TO_HTML_PRE - | (mail_config_get_citation_highlight () - ? E_TEXT_TO_HTML_MARK_CITATION : 0), - mail_config_get_citation_color ()); + orig_text = e_text_to_html_full (quoted_text, E_TEXT_TO_HTML_PRE + | (mail_config_get_citation_highlight () + ? E_TEXT_TO_HTML_MARK_CITATION : 0), + mail_config_get_citation_color ()); g_free (quoted_text); + ret_text = g_strdup_printf ("%s<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->" + "%s" + "<!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->", + credits ? credits : "", + orig_text); + g_free (orig_text); } g_free (text); + printf ("ret: %s\n", ret_text); return ret_text; } |