cookbook: Begin porting examples to the new API

Start dropping the usage of deprecated classes and API.
This commit is contained in:
Emmanuele Bassi
2012-01-24 15:01:00 +00:00
parent 75549456fd
commit 1c01554e6a
7 changed files with 68 additions and 60 deletions

View File

@ -96,7 +96,7 @@ main (int argc, char *argv[])
NULL);
/* the viewport which the box is scrolled within */
viewport = clutter_group_new ();
viewport = clutter_actor_new ();
/* viewport is shorter than the stage */
clutter_actor_set_size (viewport, STAGE_WIDTH, STAGE_HEIGHT * 0.5);
@ -111,10 +111,10 @@ main (int argc, char *argv[])
clutter_actor_set_clip_to_allocation (viewport, TRUE);
/* put the texture inside the viewport */
clutter_container_add_actor (CLUTTER_CONTAINER (viewport), texture);
clutter_actor_add_child (viewport, texture);
/* add the viewport to the stage */
clutter_container_add_actor (CLUTTER_CONTAINER (stage), viewport);
clutter_actor_add_child (stage, viewport);
g_signal_connect (viewport,
"scroll-event",