[gnome-shell/wip/clutter-deprecation-fixes: 5/27] st-texture-cache: Use ClutterActor, not ClutterGroup



commit 72d3a0fbf7bf1202dbb6965b0f4ea1c230e1ec94
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Feb 14 11:33:10 2012 -0500

    st-texture-cache: Use ClutterActor, not ClutterGroup
    
    ClutterGroup is deprecated, and since ClutterActor is concrete, we
    can use that now instead.

 src/st/st-texture-cache.c |   18 +++++++++---------
 src/st/st-texture-cache.h |    2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
index 813c0fe..0b5a920 100644
--- a/src/st/st-texture-cache.c
+++ b/src/st/st-texture-cache.c
@@ -1162,7 +1162,7 @@ load_from_pixbuf (GdkPixbuf *pixbuf)
 typedef struct {
   gchar *path;
   gint   grid_width, grid_height;
-  ClutterGroup *group;
+  ClutterActor *actor;
 } AsyncImageData;
 
 static void
@@ -1170,7 +1170,7 @@ on_data_destroy (gpointer data)
 {
   AsyncImageData *d = (AsyncImageData *)data;
   g_free (d->path);
-  g_object_unref (d->group);
+  g_object_unref (d->actor);
   g_free (d);
 }
 
@@ -1190,7 +1190,7 @@ on_sliced_image_loaded (GObject *source_object,
     {
       ClutterActor *actor = load_from_pixbuf (GDK_PIXBUF (list->data));
       clutter_actor_hide (actor);
-      clutter_container_add_actor (CLUTTER_CONTAINER (data->group), actor);
+      clutter_actor_add_child (data->actor, actor);
     }
 }
 
@@ -1252,9 +1252,9 @@ load_sliced_image (GSimpleAsyncResult *result,
  * note that the dimensions of the image loaded from @path 
  * should be a multiple of the specified grid dimensions.
  *
- * Returns: (transfer none): A new #ClutterGroup
+ * Returns: (transfer none): A new #ClutterActor
  */
-ClutterGroup *
+ClutterActor *
 st_texture_cache_load_sliced_image (StTextureCache    *cache,
                                     const gchar       *path,
                                     gint               grid_width,
@@ -1262,14 +1262,14 @@ st_texture_cache_load_sliced_image (StTextureCache    *cache,
 {
   AsyncImageData *data;
   GSimpleAsyncResult *result;
-  ClutterGroup *group = CLUTTER_GROUP (clutter_group_new ());
+  ClutterActor *actor = clutter_actor_new ();
 
   data = g_new0 (AsyncImageData, 1);
   data->grid_width = grid_width;
   data->grid_height = grid_height;
   data->path = g_strdup (path);
-  data->group = group;
-  g_object_ref (G_OBJECT (group));
+  data->actor = actor;
+  g_object_ref (G_OBJECT (actor));
 
   result = g_simple_async_result_new (G_OBJECT (cache), on_sliced_image_loaded, data, st_texture_cache_load_sliced_image);
 
@@ -1278,7 +1278,7 @@ st_texture_cache_load_sliced_image (StTextureCache    *cache,
 
   g_object_unref (result);
 
-  return group;
+  return actor;
 }
 
 /**
diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h
index 5f1e701..7275703 100644
--- a/src/st/st-texture-cache.h
+++ b/src/st/st-texture-cache.h
@@ -68,7 +68,7 @@ GType st_texture_cache_get_type (void) G_GNUC_CONST;
 
 StTextureCache* st_texture_cache_get_default (void);
 
-ClutterGroup *
+ClutterActor *
 st_texture_cache_load_sliced_image (StTextureCache    *cache,
                                     const gchar       *path,
                                     gint               grid_width,



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