[clutter-gst] video-player: don't use the deprecated clutter_stage_get_default()



commit 05c3242bc1c5ebdebc67911838bd91e328e44499
Author: Josep Torra <n770galaxy gmail com>
Date:   Fri Apr 20 16:06:37 2012 +0200

    video-player: don't use the deprecated clutter_stage_get_default()

 examples/video-player.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/examples/video-player.c b/examples/video-player.c
index ee656c9..124d42b 100644
--- a/examples/video-player.c
+++ b/examples/video-player.c
@@ -233,7 +233,7 @@ input_cb (ClutterStage *stage,
             break;
           case CLUTTER_q:
           case CLUTTER_Escape:
-            clutter_main_quit ();
+            clutter_actor_destroy (app->stage);
             break;
 
           case CLUTTER_e:
@@ -384,7 +384,7 @@ main (int argc, char *argv[])
       return EXIT_FAILURE;
     }
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   clutter_actor_set_size (stage, 768, 576);
   clutter_stage_set_minimum_size (CLUTTER_STAGE (stage), 640, 480);
@@ -417,6 +417,11 @@ main (int argc, char *argv[])
                     G_CALLBACK (on_stage_allocation_changed),
                     app);
 
+  g_signal_connect (stage,
+                    "destroy",
+                    G_CALLBACK (clutter_main_quit),
+                    NULL);
+
   /* Handle it ourselves so can scale up for fullscreen better */
   g_signal_connect_after (CLUTTER_TEXTURE (app->vtexture),
                           "size-change",



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