Hi,

I'm trying to make the clutter-toy woohaa work with clutter 0.5.

I think I changed the functions in the right way, but the resulting
program does not behave the same.

Can anybody look at the attached patch and tell me what I'm doing wrong?

Thanks

Jaap
Index: wh-busy.c
===================================================================
--- wh-busy.c	(revision 1784)
+++ wh-busy.c	(working copy)
@@ -21,9 +21,10 @@
 {
   WHBusyPrivate *priv  = BUSY_PRIVATE(busy);
 
-  clutter_actor_rotate_z(priv->texture, (float)frame_num * 4.0, 
-			 clutter_actor_get_width (priv->texture)/2, 
-			 clutter_actor_get_height (priv->texture)/2);
+  clutter_actor_set_rotation (priv->texture, CLUTTER_Z_AXIS, (float)frame_num * 4.0, 
+			      clutter_actor_get_width (priv->texture)/2, 
+			      clutter_actor_get_height (priv->texture)/2,
+			      0);
 }
 
 static void
Index: wh-screen-video.c
===================================================================
--- wh-screen-video.c	(revision 1784)
+++ wh-screen-video.c	(working copy)
@@ -49,10 +49,11 @@
 {
   WHScreenVideoPrivate *priv  = SCREEN_VIDEO_PRIVATE(screen);
 
-  clutter_actor_rotate_y (priv->video,
-			  frame_num * 12,
-			  CLUTTER_STAGE_WIDTH()/2,
-			  0);
+  clutter_actor_set_rotation (priv->video, CLUTTER_Y_AXIS,
+			      frame_num * 12,
+			      CLUTTER_STAGE_WIDTH()/2,
+			      0,
+			      0);
 }
 
 static void
@@ -93,9 +94,9 @@
 
   // util_actor_fade_in (CLUTTER_ACTOR(screen), NULL, NULL);
 
+  clutter_actor_set_opacity (CLUTTER_ACTOR(screen), 0);
   clutter_effect_fade (priv->fadein_effect_tmpl,
 		       CLUTTER_ACTOR(screen),
-		       0,
 		       0xff,
 		       NULL,
 		       NULL);
@@ -191,9 +192,9 @@
 
   if (priv->video_controls_visible)
     {
+      clutter_actor_set_opacity (priv->video_controls, 0xff);
       clutter_effect_fade (priv->controls_effect_tmpl,
 			   priv->video_controls,
-			   0xff,
 			   0,
 			   (ClutterEffectCompleteFunc)clutter_actor_hide,
 			   NULL);
@@ -224,9 +225,9 @@
 
       printf("showing video controls\n");
 
+      clutter_actor_set_opacity (priv->video_controls, 0);
       clutter_effect_fade (priv->controls_effect_tmpl,
 			   priv->video_controls,
-			   0,
 			   0xff,
 			   NULL,
 			   NULL);
Index: configure.ac
===================================================================
--- configure.ac	(revision 1784)
+++ configure.ac	(working copy)
@@ -9,7 +9,7 @@
 AC_PROG_CC
 AC_STDC_HEADERS
 
-PKG_CHECK_MODULES(DEPS, clutter-0.4 gnome-vfs-2.0 clutter-gst-0.4 sqlite3 gdk-2.0 gconf-2.0)
+PKG_CHECK_MODULES(DEPS, clutter-0.5 gnome-vfs-2.0 clutter-gst-0.5 sqlite3 gdk-2.0 gconf-2.0)
 AC_SUBST(DEPS_CFLAGS)
 AC_SUBST(DEPS_LIBS)
 
Index: wh-video-view.c
===================================================================
--- wh-video-view.c	(revision 1784)
+++ wh-video-view.c	(working copy)
@@ -110,7 +110,7 @@
 			      -clutter_actor_get_width (priv->selector),
 			      clutter_actor_get_y (priv->rows));
 
-  clutter_effect_move (priv->effect_template,
+  clutter_effect_path (priv->effect_template,
 		       priv->selector,
 		       knots,
 		       2,
@@ -126,7 +126,7 @@
 			      CSW(),
 			      clutter_actor_get_y (priv->rows));
 
-  clutter_effect_move (priv->effect_template,
+  clutter_effect_path (priv->effect_template,
 		       priv->rows,
 		       knots,
 		       2,
@@ -489,9 +489,9 @@
   if (priv->active_item_num > priv->pending_item_num)
     {
       clutter_behaviour_apply (priv->behave_down, priv->rows);
+      clutter_actor_set_opacity (priv->up, 0xff);
       clutter_effect_fade (priv->button_effect_temp,
 			   priv->up,
-			   0xff,
 			   0x99,
 			   (ClutterEffectCompleteFunc)clutter_actor_set_opacity,
 			   GINT_TO_POINTER(0xff));
@@ -499,9 +499,9 @@
   else
     {
       clutter_behaviour_apply (priv->behave_up, priv->rows);
+      clutter_actor_set_opacity (priv->down, 0xff);
       clutter_effect_fade (priv->button_effect_temp,
 			   priv->down,
-			   0xff,
 			   0x99,
 			   (ClutterEffectCompleteFunc)clutter_actor_set_opacity,
 			   GINT_TO_POINTER(0xff));
Index: wh-db.c
===================================================================
--- wh-db.c	(revision 1784)
+++ wh-db.c	(working copy)
@@ -147,6 +147,7 @@
   data_dir = g_get_user_data_dir ();
 
   db_filename = g_build_filename (data_dir, "woohaa", "db", NULL);
+  g_print ("%s\n", db_filename);
   path = g_path_get_dirname (db_filename);
   g_mkdir_with_parents (path, 0755);
 
@@ -192,6 +193,7 @@
   return (g_str_has_suffix(uri, ".avi")
 	  || g_str_has_suffix(uri, ".mpeg")
 	  || g_str_has_suffix(uri, ".wmv")
+	  || g_str_has_suffix(uri, ".ogg")
 	  || g_str_has_suffix(uri, ".mov")
 	  || g_str_has_suffix(uri, ".mpg"));
 }
Index: woohaa.c
===================================================================
--- woohaa.c	(revision 1784)
+++ woohaa.c	(working copy)
@@ -207,25 +207,29 @@
 {
   clutter_actor_raise_top (wh->screen_video);
 
+  clutter_actor_set_anchor_point_from_gravity (wh->screen_browse, CLUTTER_GRAVITY_CENTER);
+  clutter_actor_set_scale (wh->screen_browse, 0.7,  0.7);
+
   clutter_effect_scale (wh->video_effect_tmpl,
 			wh->screen_browse,
-			0.7,
 			0.1,
 			CLUTTER_GRAVITY_CENTER,
 			NULL,
 			NULL);
 
+  clutter_actor_set_opacity (wh->screen_browse, 0xff);
+
   clutter_effect_fade (wh->video_effect_tmpl,
 		       wh->screen_browse,
-		       0xff,
 		       0,
 		       NULL,
 		       NULL);
 
   /*
+  clutter_actor_set_opacity (wh->screen_video, 0);
+
   clutter_effect_fade (wh->video_effect_tmpl,
 		       wh->screen_video,
-		       0,
 		       0xff,
 		       NULL,
 		       NULL);
@@ -233,10 +237,10 @@
 
   wh_video_view_enable_animation (WH_VIDEO_VIEW(wh->view), FALSE);
 
+  clutter_actor_set_opacity (wh->busy, 0xff);
   /* Stop the busy 'cursor' */
   clutter_effect_fade (wh->video_effect_tmpl,
 		       wh->busy,
-		       0xff,
 		       0,
 		       (ClutterEffectCompleteFunc)clutter_actor_hide,
 		       NULL);
@@ -263,24 +267,25 @@
   
   clutter_actor_show (wh->screen_browse);
 
+  clutter_actor_set_opacity (wh->screen_browse, 0);
   clutter_effect_fade (wh->video_effect_tmpl,
 		       wh->screen_browse,
-		       0,
 		       0xff,
 		       NULL,
 		       NULL);
 
+  clutter_actor_set_anchor_point_from_gravity (wh->screen_browse, CLUTTER_GRAVITY_CENTER);
+  clutter_actor_set_scale (wh->screen_browse, 0.5, 0.5);
   clutter_effect_scale (wh->video_effect_tmpl,
 			wh->screen_browse,
-			0.5,
 			1.0,
 			CLUTTER_GRAVITY_CENTER,
 			NULL,
 			NULL);
 
+  clutter_actor_set_opacity (wh->screen_video, 0xff);
   clutter_effect_fade (wh->video_effect_tmpl,
 		       wh->screen_video,
-		       0xff,
 		       0,
 		       (ClutterEffectCompleteFunc)playback_finish_complete,
 		       wh);
@@ -321,17 +326,18 @@
 	  wh_screen_video_activate (WH_SCREEN_VIDEO(wh->screen_video), 
 				    WH_VIDEO_VIEW(wh->view));
 
+          clutter_actor_set_anchor_point_from_gravity (wh->screen_browse, CLUTTER_GRAVITY_CENTER);
+	  clutter_actor_set_scale (wh->screen_browse, 1.0, 1.0);
 	  clutter_effect_scale (wh->video_effect_tmpl,
 				wh->screen_browse,
-				1.0,
 				0.7,
 				CLUTTER_GRAVITY_CENTER,
 				NULL,
 				NULL);
 
+          clutter_actor_set_opacity (wh->busy, 0x00);
 	  clutter_effect_fade (wh->video_effect_tmpl,
 			       wh->busy,
-			       0x00,
 			       0xff,
 			       NULL,
 			       NULL);
@@ -748,31 +754,32 @@
 
   clutter_actor_show_all (screen_start);
 
+  clutter_actor_set_opacity (screen_start, 0);
   clutter_effect_fade (effect_template,
 		       screen_start,
-		       0,
 		       0xff,
 		       NULL,
 		       NULL);
-
+  clutter_actor_set_anchor_point_from_gravity (screen_start, CLUTTER_GRAVITY_CENTER);
+  clutter_actor_set_scale (screen_start, 0.2, 0.2);
   clutter_effect_scale (effect_template,
 			screen_start,
-			0.2,
 			1.0,
 			CLUTTER_GRAVITY_CENTER,
 			NULL,
 			NULL);
 
+  clutter_actor_set_opacity (desktop, 0xff);
   clutter_effect_fade (effect_template,
 		       desktop,
-		       0xff,
 		       0,
 		       NULL,
 		       NULL);
 
+  clutter_actor_set_anchor_point_from_gravity (desktop, CLUTTER_GRAVITY_CENTER);
+  clutter_actor_set_scale (desktop, 1.0, 1.0);
   clutter_effect_scale (effect_template,
 			desktop,
-			1.0,
 			0.1,
 			CLUTTER_GRAVITY_CENTER,
 			NULL,
@@ -825,16 +832,17 @@
 
   clutter_actor_raise_top (screen_start);
 
+  clutter_actor_set_opacity (screen_start, 0xff);
   clutter_effect_fade (effect_template,
 		       screen_start,
-		       0xff,
 		       0,
 		       (ClutterEffectCompleteFunc)clutter_actor_hide,
 		       screen_start);
 
+  clutter_actor_set_anchor_point_from_gravity (screen_start, CLUTTER_GRAVITY_CENTER);
+  clutter_actor_set_scale (screen_start, 1.0, 1.0);
   clutter_effect_scale (effect_template,
 			screen_start,
-			1.0,
 			0.2,
 			CLUTTER_GRAVITY_CENTER,
 			(ClutterEffectCompleteFunc)screen_fadeout_complete,
Index: wh-video-row-renderer.c
===================================================================
--- wh-video-row-renderer.c	(revision 1784)
+++ wh-video-row-renderer.c	(working copy)
@@ -63,9 +63,9 @@
 
       clutter_actor_set_opacity (priv->thumbnail_image, 0);
       clutter_actor_show (priv->thumbnail_image);
+      clutter_actor_set_opacity (priv->thumbnail_image, 0);
       clutter_effect_fade (effect,
 			   priv->thumbnail_image,
-			   0,
 			   0xff,
 			   NULL,
 			   NULL);

Reply via email to