aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-05-07 01:54:19 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-05-07 01:54:19 +0800
commit3242c9f90cde4b89e11b613f5b89ddb59080d0c8 (patch)
treedc364a3de176054cddf35053dbfce72aeb4db67d
parentf370c7e3e08823c285653557fdd7eaf014841547 (diff)
downloadgsoc2013-evolution-3242c9f90cde4b89e11b613f5b89ddb59080d0c8.tar.gz
gsoc2013-evolution-3242c9f90cde4b89e11b613f5b89ddb59080d0c8.tar.zst
gsoc2013-evolution-3242c9f90cde4b89e11b613f5b89ddb59080d0c8.zip
Format the colour string in a way that gdk_color_parse() will handle.
2003-05-05 Jeffrey Stedfast <fejj@ximian.com> * filter-colour.c (format_sexp): Format the colour string in a way that gdk_color_parse() will handle. Apparently it no longer handles rgb:<red>/<green>/<blue>? Fixes bug #42345. svn path=/trunk/; revision=21115
-rw-r--r--filter/ChangeLog6
-rw-r--r--filter/filter-colour.c2
2 files changed, 7 insertions, 1 deletions
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 <fejj@ximian.com>
+
+ * filter-colour.c (format_sexp): Format the colour string in a way
+ that gdk_color_parse() will handle. Apparently it no longer
+ handles rgb:<red>/<green>/<blue>? Fixes bug #42345.
+
2003-04-24 Jeffrey Stedfast <fejj@ximian.com>
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);
}