From 509799fa0cb3cfecf2c60bc828af6c4b6fc809c7 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 22 Oct 2007 15:46:56 +0000 Subject: [PATCH] Change the clutter_color_from_string() format The format should be "%02x%02x%02x%02x" because we use guint8 for each component, and not guint16. The string before was completely broken. --- ChangeLog | 6 ++++++ clutter/clutter-color.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7af470639..9c4170b0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-22 Emmanuele Bassi + + * clutter/clutter-color.c (clutter_color_to_string): Change + the print format to "%02x%02x%02x%02x" because we use guint8 + for each component, not guint16. + 2007-10-19 Emmanuele Bassi * clutter/clutter-entry.c (clutter_entry_paint): Fixed off by diff --git a/clutter/clutter-color.c b/clutter/clutter-color.c index d567f1368..e470c3a5d 100644 --- a/clutter/clutter-color.c +++ b/clutter/clutter-color.c @@ -541,7 +541,7 @@ clutter_color_to_string (const ClutterColor *color) { g_return_val_if_fail (color != NULL, NULL); - return g_strdup_printf ("#%04x%04x%04x%04x", + return g_strdup_printf ("#%02x%02x%02x%02x", color->red, color->green, color->blue,