diff options
author | Not Zed <NotZed@Ximian.com> | 2003-09-18 05:19:04 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-09-18 05:19:04 +0800 |
commit | 81a0ff5bc44a3bd11399e6b3c985735737606c8c (patch) | |
tree | 54b5ed4342a6843c1db4c7e75f2e1b1fe9b82dff /mail/mail-tools.c | |
parent | a36a1bb70b6ebcb51ac39304370c89bda63e11b9 (diff) | |
download | gsoc2013-evolution-81a0ff5bc44a3bd11399e6b3c985735737606c8c.tar.gz gsoc2013-evolution-81a0ff5bc44a3bd11399e6b3c985735737606c8c.tar.zst gsoc2013-evolution-81a0ff5bc44a3bd11399e6b3c985735737606c8c.zip |
cvs removed.
2003-09-17 Not Zed <NotZed@Ximian.com>
* folder-browser.c, folder-browser.h, folder-browser-ui.c
folder-browser-ui.h, mail-callbacks.c, mail-callbacks.h
mail-display.c, mail-display.h, mail-display-stream.c
mail-display-stream.h, mail-format.c, mail-format.h
mail-identify.c, mail-search.c, mail-search.h
message-browser.c, message-browser.h, subscribe-dialog.c
subscribe-dialog.h, mail-font-prefs.c, mail-font-prefs.h: cvs
removed.
* Makefile.am: Removed mail-font-prefs.[ch], hasn't been built for
ages.
* em-*.c: killed a bunch of printfs.
* em-format-html-display.c (efhd_html_button_press_event): update
for html object api chagnes.
** Merge in mail-refactor-2 branch.
svn path=/trunk/; revision=22602
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r-- | mail/mail-tools.c | 131 |
1 files changed, 1 insertions, 130 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c index 758a4b512b..99fd749d78 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -48,12 +48,12 @@ #include "mail.h" /*session*/ #include "mail-config.h" #include "mail-vfolder.h" -#include "mail-format.h" #include "mail-tools.h" #include "mail-local.h" #include "mail-mt.h" #include "mail-folder-cache.h" + /* **************************************** */ CamelFolder * @@ -345,135 +345,6 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex) return folder; } -/** - * mail_tool_quote_message: - * @message: mime message to quote - * @fmt: credits format - example: "On %s, %s wrote:\n" - * @Varargs: arguments - * - * Returns an allocated buffer containing the quoted message. - */ -gchar * -mail_tool_quote_message (CamelMimeMessage *message, const char *fmt, ...) -{ - CamelDataWrapper *contents; - gboolean want_plain; - char *text, *colour; - GConfClient *gconf; - - gconf = mail_config_get_gconf_client (); - - contents = camel_medium_get_content_object (CAMEL_MEDIUM (message)); - /* We pass "want_plain" for "cite", since if it's HTML, we'll - * do the citing ourself below. - */ - /* FIXME the citing logic has changed and we basically never want_plain - * to be true now, but I don't want to remove all that logic until I - * am sure --Larry - */ - want_plain = FALSE; - text = mail_get_message_body (contents, want_plain, FALSE); - - /* Set the quoted reply text. */ - if (text) { - char *sig, *p, *ret_text, *credits = NULL; - - /* look for the signature and strip it off */ - sig = text; - while ((p = strstr (sig, "\n-- \n"))) - sig = p + 1; - - if (sig != text) - *sig = '\0'; - - /* create credits */ - if (fmt) { - va_list ap; - - va_start (ap, fmt); - credits = g_strdup_vprintf (fmt, ap); - va_end (ap); - } - - colour = gconf_client_get_string (gconf, "/apps/evolution/mail/display/citation_colour", NULL); - - ret_text = g_strdup_printf ("%s<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->" - "<font color=\"%s\">\n%s%s%s</font>" - "<!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->", - credits ? credits : "", - colour ? colour : "#737373", - want_plain ? "" : "<blockquote type=cite><i>", - text, - want_plain ? "" : "</i></blockquote>"); - - g_free (text); - g_free (colour); - g_free (credits); - - return ret_text; - } - - return NULL; -} - - -/** - * mail_tool_forward_message: - * @message: mime message to forward - * @quoted: whether to forwarded it quoted (%TRUE) or inline (%FALSE) - * - * Returns an allocated buffer containing the forwarded message. - */ -gchar * -mail_tool_forward_message (CamelMimeMessage *message, gboolean quoted) -{ - GConfClient *gconf; - char *text; - - gconf = mail_config_get_gconf_client (); - - text = mail_get_message_body (CAMEL_DATA_WRAPPER (message), FALSE, FALSE); - - if (text != NULL) { - char *sig, *p, *ret_text; - - /* FIXME: this code should be merged with the quote_message() code above somehow... */ - - /* look for the signature and strip it off */ - sig = text; - while ((p = strstr (sig, "\n-- \n"))) - sig = p + 1; - - if (sig != text) - *sig = '\0'; - - if (quoted) { - char *colour; - - colour = gconf_client_get_string (gconf, "/apps/evolution/mail/display/citation_colour", NULL); - - ret_text = g_strdup_printf ("-----%s-----<br>" - "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"orig\" value=\"1\">-->" - "<font color=\"%s\">\n%s%s%s</font>" - "<!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->", - _("Forwarded Message"), - colour ? colour : "#737373", - "<blockquote type=cite><i>", text, - "</i></blockquote>"); - - g_free (colour); - } else { - ret_text = g_strdup_printf ("-----%s-----<br>%s", _("Forwarded Message"), text ? text : ""); - } - - g_free (text); - - return ret_text; - } - - return NULL; -} - /** * mail_tools_x_evolution_message_parse: |