From 3242c9f90cde4b89e11b613f5b89ddb59080d0c8 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 6 May 2003 17:54:19 +0000 Subject: Format the colour string in a way that gdk_color_parse() will handle. 2003-05-05 Jeffrey Stedfast * filter-colour.c (format_sexp): Format the colour string in a way that gdk_color_parse() will handle. Apparently it no longer handles rgb://? Fixes bug #42345. svn path=/trunk/; revision=21115 --- filter/ChangeLog | 6 ++++++ filter/filter-colour.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/filter/ChangeLog b/filter/ChangeLog index 9d3eb2cf08..ece5ee7998 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2003-05-05 Jeffrey Stedfast + + * filter-colour.c (format_sexp): Format the colour string in a way + that gdk_color_parse() will handle. Apparently it no longer + handles rgb://? Fixes bug #42345. + 2003-04-24 Jeffrey Stedfast Fix for bug #41578. diff --git a/filter/filter-colour.c b/filter/filter-colour.c index 63d1d07e03..4819b24524 100644 --- a/filter/filter-colour.c +++ b/filter/filter-colour.c @@ -223,7 +223,7 @@ format_sexp (FilterElement *fe, GString *out) FilterColour *fc = (FilterColour *)fe; char *str; - str = g_strdup_printf ("rgb:%04x/%04x/%04x", fc->r, fc->g, fc->b); + str = g_strdup_printf ("#%02x%02x%02x", (fc->r >> 8) & 0xff, (fc->g >> 8) & 0xff, (fc->b >> 8) & 0xff); e_sexp_encode_string (out, str); g_free (str); } -- cgit v1.2.3