diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-04-01 01:38:21 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-04-01 01:38:21 +0800 |
commit | 2983bfc285a877d4f0327b28eb061fe4e952826b (patch) | |
tree | d02cb6c1ca1c695d1ccfee085bfbb76d319482aa /mail | |
parent | 1295a3e0a4bf78f92213663df77f09a1c804ee28 (diff) | |
download | gsoc2013-evolution-2983bfc285a877d4f0327b28eb061fe4e952826b.tar gsoc2013-evolution-2983bfc285a877d4f0327b28eb061fe4e952826b.tar.gz gsoc2013-evolution-2983bfc285a877d4f0327b28eb061fe4e952826b.tar.bz2 gsoc2013-evolution-2983bfc285a877d4f0327b28eb061fe4e952826b.tar.lz gsoc2013-evolution-2983bfc285a877d4f0327b28eb061fe4e952826b.tar.xz gsoc2013-evolution-2983bfc285a877d4f0327b28eb061fe4e952826b.tar.zst gsoc2013-evolution-2983bfc285a877d4f0327b28eb061fe4e952826b.zip |
Only do citation colouring if the user has specified to do so and use the
2004-03-31 Jeffrey Stedfast <fejj@ximian.com>
* em-format-html.c (efh_text_plain): Only do citation colouring if
the user has specified to do so and use the user's specified
colour when appropriate. Fixes bug #56290.
svn path=/trunk/; revision=25269
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 4 | ||||
-rw-r--r-- | mail/em-format-html.c | 30 |
2 files changed, 31 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 81a63cccc9..28424ef1b7 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,9 @@ 2004-03-31 Jeffrey Stedfast <fejj@ximian.com> + * em-format-html.c (efh_text_plain): Only do citation colouring if + the user has specified to do so and use the user's specified + colour when appropriate. Fixes bug #56290. + * em-subscribe-editor.c (em_subscribe_editor_new): Save/restore the subscribe dialog's window size. Fixes bug #56230. diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 9dbf044262..b6806e07fe 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -31,6 +31,8 @@ #include <fcntl.h> #include <ctype.h> +#include <gconf/gconf-client.h> + #include <gal/util/e-iconv.h> #include <gal/util/e-util.h> /* for e_utf8_strftime, what about e_time_format_time? */ #include "e-util/e-time-utils.h" @@ -627,9 +629,10 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo CamelDataWrapper *dw; CamelContentType *type; const char *format; - guint32 rgb = 0x737373, flags; + guint32 rgb, flags; int i, count, len; - + GConfClient *gconf; + camel_stream_printf (stream, "<table bgcolor=\"#%06x\" cellspacing=0 cellpadding=1 width=100%%><tr><td>\n" "<table bgcolor=\"#%06x\" cellspacing=0 cellpadding=0 width=100%%><tr><td>\n" @@ -684,7 +687,28 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo camel_object_unref(inline_filter); camel_content_type_unref(ct); } - + + gconf = gconf_client_get_default (); + if (gconf_client_get_bool (gconf, "/apps/evolution/mail/display/mark_citations", NULL)) { + GError *err = NULL; + GdkColor colour; + char *str; + + str = gconf_client_get_string (gconf, "/apps/evolution/mail/display/citation_colour", &err); + if (err == NULL) { + gdk_color_parse (str, &colour); + rgb = ((colour.red & 0xff00) << 8) | (colour.green & 0xff00) | ((colour.blue & 0xff00) >> 8); + } else { + /* default colour */ + g_error_free (err); + rgb = 0x737373; + } + g_free (str); + } else { + rgb = 0; + } + g_object_unref (gconf); + filtered_stream = camel_stream_filter_new_with_stream(stream); html_filter = camel_mime_filter_tohtml_new(flags, rgb); camel_stream_filter_add(filtered_stream, html_filter); |