[glide] Support all direction options for slide animationmake



commit 2d835d8d276b48e2250a154a8a7df04c423ea24d
Author: Robert Carr <racarr Valentine localdomain>
Date:   Tue Apr 27 04:48:21 2010 -0400

    Support all direction options for slide animationmake

 src/glide-slide.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/glide-slide.c b/src/glide-slide.c
index ff79fae..0ab0ddd 100644
--- a/src/glide-slide.c
+++ b/src/glide-slide.c
@@ -472,6 +472,9 @@ glide_slide_serialize (GlideActor *self)
   GlideSlide *slide = GLIDE_SLIDE (self);
   JsonNode *node = json_node_new (JSON_NODE_OBJECT);
   JsonObject *obj;
+  gchar *cs;
+  
+  cs = clutter_color_to_string (&slide->priv->color);
   
   obj = json_object_new ();
   json_node_set_object (node, obj);
@@ -480,6 +483,9 @@ glide_slide_serialize (GlideActor *self)
   
   if (slide->priv->background)
     glide_json_object_set_string (obj, "background", slide->priv->background); 
+  
+  glide_json_object_set_string (obj, "color", cs);
+  g_free (cs);
 
   glide_json_object_set_animation (obj, "animation", slide->priv->animation); 
 
@@ -641,6 +647,7 @@ glide_slide_construct_from_json (GlideSlide *slide, JsonObject *slide_obj, Glide
   GList *actors_l, *a;
   const gchar *background;
   GlideAnimationInfo info;
+  ClutterColor c;
   
   actors_n = json_object_get_member (slide_obj, "actors");
   actors = json_node_get_array (actors_n);
@@ -652,6 +659,9 @@ glide_slide_construct_from_json (GlideSlide *slide, JsonObject *slide_obj, Glide
   glide_json_object_get_animation (slide_obj, "animation", &info);
   glide_slide_set_animation (slide, &info);
   
+  clutter_color_from_string (&c, glide_json_object_get_string (slide_obj, "color"));
+  glide_slide_set_color (slide, &c);  
+  
   
   
   actors_l = json_array_get_elements (actors);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]