[clutter-gtk] examples/multistage: Do not use deprecated API



commit c337b8f249f4e03eaec90f6528cf623c5ecf55d4
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Wed Jun 6 11:51:39 2012 +0100

    examples/multistage: Do not use deprecated API

 examples/gtk-clutter-multistage.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/examples/gtk-clutter-multistage.c b/examples/gtk-clutter-multistage.c
index 8d4bcc9..e274bcf 100644
--- a/examples/gtk-clutter-multistage.c
+++ b/examples/gtk-clutter-multistage.c
@@ -39,7 +39,7 @@ main (int argc, char *argv[])
   gtk_notebook_append_page (GTK_NOTEBOOK (notebook), clutter0,
                             gtk_label_new ("One stage"));
   stage0 = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (clutter0));
-  clutter_stage_set_color (CLUTTER_STAGE (stage0), &col0);
+  clutter_actor_set_background_color (stage0, &col0);
 
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox,
@@ -48,7 +48,7 @@ main (int argc, char *argv[])
   clutter1 = gtk_clutter_embed_new ();
   gtk_widget_set_size_request (clutter1, 320, 240);
   stage1 = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (clutter1));
-  clutter_stage_set_color (CLUTTER_STAGE(stage1), &col1);
+  clutter_actor_set_background_color (stage1, &col1);
   tex1 = gtk_clutter_texture_new ();
   gtk_clutter_texture_set_from_stock (GTK_CLUTTER_TEXTURE (tex1),
                                       clutter1,
@@ -59,7 +59,7 @@ main (int argc, char *argv[])
                                   clutter_actor_get_width (tex1) / 2,
                                   clutter_actor_get_height (tex1) / 2);
   clutter_actor_set_position (tex1, 160, 120);
-  clutter_stage_add (stage1, tex1); 
+  clutter_actor_add_child (stage1, tex1); 
   clutter_actor_show (tex1);
 
   gtk_container_add (GTK_CONTAINER (vbox), clutter1);
@@ -67,7 +67,7 @@ main (int argc, char *argv[])
   clutter2 = gtk_clutter_embed_new ();
   gtk_widget_set_size_request (clutter2, 320, 120);
   stage2 = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (clutter2));
-  clutter_stage_set_color (CLUTTER_STAGE(stage2), &col2);
+  clutter_actor_set_background_color (stage2, &col2);
   tex2 = gtk_clutter_texture_new ();
   gtk_clutter_texture_set_from_icon_name (GTK_CLUTTER_TEXTURE (tex2),
                                           clutter1,
@@ -78,7 +78,7 @@ main (int argc, char *argv[])
                                   clutter_actor_get_width (tex2) / 2,
                                   clutter_actor_get_height (tex2) / 2);
   clutter_actor_set_position (tex2, 160, 60);
-  clutter_stage_add (stage2, tex2);
+  clutter_actor_add_child (stage2, tex2);
 
   gtk_container_add (GTK_CONTAINER (vbox), clutter2);
 



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