gnome-games r8699 - in trunk: . gnometris



Author: jclinton
Date: Tue Feb 10 23:49:02 2009
New Revision: 8699
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8699&view=rev

Log:
Bump the min. Clutter version to 0.8.7 and require Clutter-Gtk 0.8.2

Clutter 0.8.6 has a critical Behaviour bug where Behaviours with no
associated actors or knots will cause a segmentation fault. We use this
type of Behaviour to avoid constantly alloc and decallocing Behaviours
for use for moving the pieces around on the board and also to avoid a
flood of callbacks when movement is completed. (They all share a common
timeline.)

Our in-tree Clutter-Gtk also appears to be incompatible, so it is
deprecated with at least Gnometris. Might need to do this for Aisleriot,
as well.

Modified:
   trunk/configure.in
   trunk/gnometris/Makefile.am
   trunk/gnometris/blockops.cpp
   trunk/gnometris/preview.cpp
   trunk/gnometris/preview.h

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Feb 10 23:49:02 2009
@@ -572,20 +572,20 @@
   fi
   AC_MSG_RESULT([$CLUTTER_API_VERSION])
 
-  CLUTTER_REQUIRED=0.8.0
-  CLUTTER_GTK_REQUIRED=0.8.0
-  CLUTTER_CAIRO_REQUIRED=0.8.0
+  CLUTTER_REQUIRED=0.8.7
+  CLUTTER_GTK_REQUIRED=0.8.2
+  CLUTTER_CAIRO_REQUIRED=0.8.2
 
   PKG_CHECK_MODULES([CLUTTER],[
-     clutter-$CLUTTER_API_VERSION >= $CLUTTER_REQUIRED
-     clutter-cairo-$CLUTTER_API_VERSION >= $CLUTTER_CAIRO_REQUIRED])
+    clutter-$CLUTTER_API_VERSION >= $CLUTTER_REQUIRED
+    clutter-cairo-$CLUTTER_API_VERSION >= $CLUTTER_CAIRO_REQUIRED])
   AC_SUBST([CLUTTER_CFLAGS])
   AC_SUBST([CLUTTER_LIBS])
 
-  # PKG_CHECK_MODULES([CLUTTER_GTK],[
-  #   clutter-gtk-$CLUTTER_API_VERSION  >= $CLUTTER_GTK_REQUIRED])
-  # AC_SUBST([CLUTTER_GTK_CFLAGS])
-  # AC_SUBST([CLUTTER_GTK_LIBS])
+  PKG_CHECK_MODULES([CLUTTER_GTK],[
+    clutter-gtk-$CLUTTER_API_VERSION  >= $CLUTTER_GTK_REQUIRED])
+  AC_SUBST([CLUTTER_GTK_CFLAGS])
+  AC_SUBST([CLUTTER_GTK_LIBS])
 fi
 
 AM_CONDITIONAL([HAVE_CLUTTER],[test "$enable_clutter" = "yes"])

Modified: trunk/gnometris/Makefile.am
==============================================================================
--- trunk/gnometris/Makefile.am	(original)
+++ trunk/gnometris/Makefile.am	Tue Feb 10 23:49:02 2009
@@ -87,8 +87,8 @@
 #gnometris_noclutter_CXXFLAGS = $(gnometris_CXXFLAGS) -UHAVE_CLUTTER
 #gnometris_noclutter_LDADD = $(gnometris_LDADD)
 gnometris_CPPFLAGS += -DHAVE_CLUTTER
-gnometris_CXXFLAGS += $(CLUTTER_CFLAGS)
-gnometris_LDADD += $(CLUTTER_LIBS)
+gnometris_CXXFLAGS += $(CLUTTER_CFLAGS) $(CLUTTER_GTK_CFLAGS)
+gnometris_LDADD += $(CLUTTER_LIBS) $(CLUTTER_GTK_LIBS)
 endif
 
 pixmapdir = $(pkgdatadir)/gnometris/pixmaps

Modified: trunk/gnometris/blockops.cpp
==============================================================================
--- trunk/gnometris/blockops.cpp	(original)
+++ trunk/gnometris/blockops.cpp	Tue Feb 10 23:49:02 2009
@@ -22,7 +22,7 @@
 #include <config.h>
 #include "blockops.h"
 #include "blocks.h"
-#include <libgames-support/games-clutter-embed.h>
+#include <clutter-gtk/gtk-clutter-embed.h>
 
 #define FONT "Sans Bold"
 
@@ -156,15 +156,14 @@
 	for (int i = 0; i < COLUMNS; ++i)
 		field[i] = new Block[LINES];
 
-	w = games_clutter_embed_new ();
+	w = gtk_clutter_embed_new ();
 
-	g_signal_connect (w, "configure_event", G_CALLBACK (configure), this);
 	g_signal_connect (w, "size_allocate", G_CALLBACK (resize), this);
 
 	gtk_widget_set_size_request (w, COLUMNS*190/LINES, 190);
 
 	ClutterActor *stage;
-	stage = games_clutter_embed_get_stage (GAMES_CLUTTER_EMBED (w));
+	stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (w));
 
 	playingField = clutter_group_new ();
 	clutter_group_add (CLUTTER_GROUP(stage), CLUTTER_ACTOR(playingField));
@@ -558,12 +557,6 @@
 }
 
 gboolean
-BlockOps::configure(GtkWidget *widget, GdkEventConfigure *event, BlockOps *field)
-{
-	return FALSE;
-}
-
-gboolean
 BlockOps::resize(GtkWidget *widget, GtkAllocation *allocation, BlockOps *field)
 {
 	field->width = allocation->width;
@@ -596,7 +589,7 @@
 BlockOps::rescaleField ()
 {
 	ClutterActor *stage;
-	stage = games_clutter_embed_get_stage (GAMES_CLUTTER_EMBED (w));
+	stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (w));
 
 	cairo_t *bg_cr;
 

Modified: trunk/gnometris/preview.cpp
==============================================================================
--- trunk/gnometris/preview.cpp	(original)
+++ trunk/gnometris/preview.cpp	Tue Feb 10 23:49:02 2009
@@ -43,7 +43,7 @@
 		blocks[i] = new Block [PREVIEW_HEIGHT];
 	}
 
-	w = games_clutter_embed_new();
+	w = gtk_clutter_embed_new();
 
 	g_signal_connect (w, "configure_event", G_CALLBACK (configure), this);
 
@@ -53,7 +53,7 @@
 	gtk_widget_set_size_request (w, PREVIEW_SIZE * 20,
 				     PREVIEW_SIZE * 20);
 	ClutterActor *stage;
-	stage = games_clutter_embed_get_stage (GAMES_CLUTTER_EMBED (w));
+	stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (w));
 
 	ClutterColor stage_color = { 0x0, 0x0, 0x0, 0xff };
 	clutter_stage_set_color (CLUTTER_STAGE (stage),
@@ -119,7 +119,7 @@
 Preview::previewBlock(gint bnr, gint bcol)
 {
 	ClutterActor *stage;
-	stage = games_clutter_embed_get_stage (GAMES_CLUTTER_EMBED (w));
+	stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (w));
 
 	int x, y;
 

Modified: trunk/gnometris/preview.h
==============================================================================
--- trunk/gnometris/preview.h	(original)
+++ trunk/gnometris/preview.h	Tue Feb 10 23:49:02 2009
@@ -28,7 +28,7 @@
 #include "blocks.h"
 
 #include <clutter/clutter.h>
-#include <libgames-support/games-clutter-embed.h>
+#include <clutter-gtk/gtk-clutter-embed.h>
 
 class Preview {
 public:
@@ -45,7 +45,7 @@
 	void regenerateRenderer ();
 
 private:
-	GtkWidget * w;
+	GtkWidget *w;
 	gint width;
 	gint height;
 	gint blocknr;



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