Change the clutter_color_from_string() format
authorEmmanuele Bassi <ebassi@openedhand.com>
Mon, 22 Oct 2007 15:46:56 +0000 (15:46 +0000)
committerEmmanuele Bassi <ebassi@openedhand.com>
Mon, 22 Oct 2007 15:46:56 +0000 (15:46 +0000)
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
clutter/clutter-color.c

index 7af4706..9c4170b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-22  Emmanuele Bassi  <ebassi@openedhand.com>
+
+       * 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  <ebassi@openedhand.com>
 
        * clutter/clutter-entry.c (clutter_entry_paint): Fixed off by
index d567f13..e470c3a 100644 (file)
@@ -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,