[gnome-games/gnome-2-32] aisleriot: Remove sol/clutter from 2.32 branch



commit 7212c538f31c2e0e5ff517595509d57e08714652
Author: Christian Persch <chpe gnome org>
Date:   Wed Aug 18 12:40:05 2010 +0200

    aisleriot: Remove sol/clutter from 2.32 branch
    
    sol/clutter is experimental, and buggy, and distributions should never
    ship it to end users. (Yes, that means you, Debian!)
    
    It still exists on master.

 aisleriot/Makefile.am                  |   65 -
 aisleriot/ar-clutter-embed.c           |  271 ---
 aisleriot/ar-clutter-embed.h           |   61 -
 aisleriot/ar-style-gtk.c               |   19 -
 aisleriot/ar-style-private.h           |   12 -
 aisleriot/ar-style.c                   |  103 -
 aisleriot/ar-style.h                   |    4 -
 aisleriot/baize.c                      |   91 -
 aisleriot/baize.h                      |   65 -
 aisleriot/board.c                      | 3537 --------------------------------
 aisleriot/board.h                      |   99 -
 aisleriot/card.c                       |  364 ----
 aisleriot/card.h                       |   79 -
 aisleriot/game.c                       |   55 -
 aisleriot/game.h                       |    4 -
 aisleriot/lib/Makefile.am              |   12 -
 aisleriot/lib/ar-card-textures-cache.c |  374 ----
 aisleriot/lib/ar-card-textures-cache.h |   74 -
 aisleriot/prop-editor.c                |   95 -
 aisleriot/slot-renderer.c              |  691 -------
 aisleriot/slot-renderer.h              |  101 -
 aisleriot/sol.c                        |   28 -
 aisleriot/window.c                     |  156 +--
 configure.in                           |   19 +-
 po/POTFILES.in                         |    2 -
 25 files changed, 5 insertions(+), 6376 deletions(-)
---
diff --git a/aisleriot/Makefile.am b/aisleriot/Makefile.am
index ba1d8e5..2835cd8 100644
--- a/aisleriot/Makefile.am
+++ b/aisleriot/Makefile.am
@@ -109,71 +109,6 @@ if PLATFORM_WIN32_NATIVE
 sol_LDFLAGS += -mwindows
 endif
 
-if HAVE_CLUTTER
-if ENABLE_AISLERIOT_CLUTTER
-
-noinst_PROGRAMS = sol-clutter
-
-sol_clutter_SOURCES = \
-	ar-clutter-embed.c \
-	ar-clutter-embed.h \
-	ar-cursor.c	\
-	ar-cursor.h	\
-	ar-game-chooser.c \
-	ar-game-chooser.h \
-	ar-style.c	\
-	ar-style.h	\
-	ar-style-private.h \
-	ar-style-gtk.c	\
-	ar-style-gtk.h	\
-	baize.c		\
-	baize.h		\
-	board.c		\
-	board.h		\
-	card.c          \
-	card.h          \
-	conf.c		\
-	conf.h		\
-	game.c		\
-	game.h		\
-	sol.c		\
-	slot-renderer.c	\
-	slot-renderer.h \
-	stats-dialog.c	\
-	stats-dialog.h	\
-	util.c		\
-	util.h		\
-	window.c	\
-	window.h	\
-	$(NULL)
-
-if HAVE_MAEMO_5
-sol_clutter_SOURCES += \
-	ar-fullscreen-button.c \
-	ar-fullscreen-button.h \
-	$(NULL)
-endif
-
-if !HAVE_GUILE_1_8
-sol_clutter_SOURCES += guile16-compat.h
-endif
-		
-if ENABLE_DEBUG_UI
-sol_clutter_SOURCES += \
-	prop-editor.c	\
-	prop-editor.h	\
-	$(NULL)
-endif
-
-sol_clutter_CPPFLAGS = $(sol_CPPFLAGS) -DHAVE_CLUTTER
-sol_clutter_CFLAGS = $(sol_CFLAGS) $(CLUTTER_CFLAGS) $(CLUTTER_GTK_CFLAGS)
-sol_clutter_LDFLAGS = $(sol_LDFLAGS)
-sol_clutter_LDADD = $(sol_LDADD) $(CLUTTER_LIBS) $(CLUTTER_GTK_LIBS)
-
-
-endif # ENABLE_AISLERIOT_CLUTTER
-endif # HAVE_CLUTTER
-
 desktop_in_files = \
 	sol.desktop.in.in
 
diff --git a/aisleriot/ar-style-gtk.c b/aisleriot/ar-style-gtk.c
index edfe917..a1b9b0c 100644
--- a/aisleriot/ar-style-gtk.c
+++ b/aisleriot/ar-style-gtk.c
@@ -269,24 +269,6 @@ style_set_cb (GtkWidget *widget,
     g_object_notify (style_object, AR_STYLE_PROP_CARD_STEP);
   }
 
-#ifdef HAVE_CLUTTER
-{
-  ClutterColor selection_color;
-
-  if (color != NULL) {
-    _ar_clutter_color_from_gdk_color (&selection_color, color);
-    gdk_color_free (color);
-  } else {
-    _ar_clutter_color_from_gdk_color (&selection_color, &default_selection_color);
-  }
-
-  if (!clutter_color_equal (&style_priv->selection_color, &selection_color)) {
-    style_priv->selection_color = selection_color;
-
-    g_object_notify (style_object, AR_STYLE_PROP_SELECTION_COLOR);
-  }
-}
-#else
 {
   GdkColor selection_color;
 
@@ -303,7 +285,6 @@ style_set_cb (GtkWidget *widget,
     g_object_notify (style_object, AR_STYLE_PROP_SELECTION_COLOR);
   }
 }
-#endif /* HAVE_CLUTTER */
 
   g_object_thaw_notify (style_object);
 }
diff --git a/aisleriot/ar-style-private.h b/aisleriot/ar-style-private.h
index 6ff4917..3faa85f 100644
--- a/aisleriot/ar-style-private.h
+++ b/aisleriot/ar-style-private.h
@@ -49,13 +49,8 @@ struct _ArStylePrivate
 {
   ArCardTheme* card_theme;
 
-#ifdef HAVE_CLUTTER
-  ClutterColor selection_color;
-  ClutterColor baize_color;
-#else
   GdkColor selection_color;
   GdkColor baize_color;
-#endif
 
   double card_slot_ratio;
   double card_overhang;
@@ -84,16 +79,9 @@ struct _ArStylePrivate
   guint show_highlight          : 1;
   guint show_seleccion          : 1;
 
-#ifndef HAVE_CLUTTER
   guint pixbuf_drawing          : 1;
-#endif
 };
 
-#ifdef HAVE_CLUTTER
-void _ar_clutter_color_from_gdk_color (ClutterColor *clutter_color,
-                                       const GdkColor *gdk_color);
-#endif
-
 G_END_DECLS
 
 #endif /* __AR_STYLE_PRIVATE_H__ */
diff --git a/aisleriot/ar-style.c b/aisleriot/ar-style.c
index 3a074df..2e4998a 100644
--- a/aisleriot/ar-style.c
+++ b/aisleriot/ar-style.c
@@ -39,9 +39,6 @@ enum
   PROP_FOCUS_LINE_WIDTH,
   PROP_FOCUS_PADDING,
   PROP_INTERIOR_FOCUS,
-#ifndef HAVE_CLUTTER
-  PROP_PIXBUF_DRAWING,
-#endif
   PROP_RTL,
   PROP_SELECTION_COLOR,
   PROP_SHOW_TOOLTIPS,
@@ -62,13 +59,8 @@ ar_style_init (ArStyle *style)
 
   priv = style->priv = G_TYPE_INSTANCE_GET_PRIVATE (style, AR_TYPE_STYLE, ArStylePrivate);
 
-#ifdef HAVE_CLUTTER
-  _ar_clutter_color_from_gdk_color (&priv->selection_color, &default_selection_color);
-  _ar_clutter_color_from_gdk_color (&priv->baize_color, &default_baize_color);
-#else
   priv->selection_color = default_selection_color;
   priv->baize_color = default_baize_color;
-#endif
 
   priv->card_slot_ratio = DEFAULT_CARD_SLOT_RATIO;
   priv->card_overhang = DEFAULT_CARD_OVERHANG;
@@ -88,8 +80,6 @@ ar_style_init (ArStyle *style)
   priv->enable_tooltips = DEFAULT_SHOW_TOOLTIPS;
   priv->enable_status_messages = DEFAULT_SHOW_STATUS_MESSAGES;
 
-#ifndef HAVE_CLUTTER
-
 #ifdef HAVE_HILDON
   priv->pixbuf_drawing = FALSE;
 #else
@@ -106,8 +96,6 @@ ar_style_init (ArStyle *style)
   _games_debug_print (GAMES_DEBUG_GAME_STYLE,
                       "[ArStyle %p] Using %s drawing\n",
                       style, priv->pixbuf_drawing ? "pixbuf" : "pixmap");
-
-#endif /* !HAVE_CLUTTER */
 }
 
 static void
@@ -185,12 +173,6 @@ ar_style_get_property (GObject    *object,
       g_value_set_boolean (value, ar_style_get_interior_focus (style));
       break;
 
-#ifndef HAVE_CLUTTER
-    case PROP_PIXBUF_DRAWING:
-      g_value_set_boolean (value, ar_style_get_pixbuf_drawing (style));
-      break;
-#endif
-
     case PROP_RTL:
       g_value_set_boolean (value, ar_style_get_rtl (style));
       break;
@@ -227,15 +209,6 @@ ar_style_set_property (GObject      *object,
 
   switch (property_id) {
     case PROP_BAIZE_COLOR: {
-#ifdef HAVE_CLUTTER
-      ClutterColor *color;
-
-      if ((color = g_value_get_boxed (value)) != NULL) {
-        priv->baize_color = *color;
-      } else {
-        _ar_clutter_color_from_gdk_color (&priv->baize_color, &default_baize_color);
-      }
-#else
       GdkColor *color;
 
       if ((color = g_value_get_boxed (value)) != NULL) {
@@ -243,7 +216,6 @@ ar_style_set_property (GObject      *object,
       } else {
         priv->baize_color = default_baize_color;
       }
-#endif
       break;
     }
 
@@ -291,25 +263,11 @@ ar_style_set_property (GObject      *object,
       priv->interior_focus = g_value_get_boolean (value) != FALSE;
       break;
 
-#ifndef HAVE_CLUTTER
-    case PROP_PIXBUF_DRAWING:
-      priv->pixbuf_drawing = g_value_get_boolean (value) != FALSE;
-#endif
-
     case PROP_RTL:
       priv->rtl = g_value_get_boolean (value) != FALSE;
       break;
 
     case PROP_SELECTION_COLOR: {
-#ifdef HAVE_CLUTTER
-      ClutterColor *color;
-
-      if ((color = g_value_get_boxed (value)) != NULL) {
-        priv->selection_color = *color;
-      } else {
-        _ar_clutter_color_from_gdk_color (&priv->selection_color, &default_selection_color);
-      }
-#else
       GdkColor *color;
 
       if ((color = g_value_get_boxed (value)) != NULL) {
@@ -317,7 +275,6 @@ ar_style_set_property (GObject      *object,
       } else {
         priv->selection_color = default_selection_color;
       }
-#endif
       break;
     }
 
@@ -346,9 +303,6 @@ static void
 ar_style_class_init (ArStyleClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
-#ifdef HAVE_CLUTTER
-  ClutterColor color;
-#endif
 
   g_type_class_add_private (klass, sizeof (ArStylePrivate));
 
@@ -361,16 +315,6 @@ ar_style_class_init (ArStyleClass *klass)
    *
    * The board baize color.
    */
-#ifdef HAVE_CLUTTER
-  _ar_clutter_color_from_gdk_color (&color, &default_baize_color);
-  g_object_class_install_property
-    (object_class,
-     PROP_BAIZE_COLOR,
-     clutter_param_spec_color (AR_STYLE_PROP_BAIZE_COLOR, NULL, NULL,
-                               &color,
-                               G_PARAM_READWRITE |
-                               G_PARAM_STATIC_STRINGS));
-#else
   g_object_class_install_property
     (object_class,
      PROP_BAIZE_COLOR,
@@ -378,7 +322,6 @@ ar_style_class_init (ArStyleClass *klass)
                          GDK_TYPE_COLOR,
                          G_PARAM_READWRITE |
                          G_PARAM_STATIC_STRINGS));
-#endif /* HAVE_CLUTTER */
 
   g_object_class_install_property
     (object_class,
@@ -488,16 +431,6 @@ ar_style_class_init (ArStyleClass *klass)
                            G_PARAM_READWRITE |
                            G_PARAM_STATIC_STRINGS));
 
-#ifndef HAVE_CLUTTER
-  g_object_class_install_property
-    (object_class,
-     PROP_PIXBUF_DRAWING,
-     g_param_spec_boolean (AR_STYLE_PROP_PIXBUF_DRAWING, NULL, NULL,
-                           DEFAULT_PIXBUF_DRAWING,
-                           G_PARAM_READWRITE |
-                           G_PARAM_STATIC_STRINGS));
-#endif /* !HAVE_CLUTTER */
-
   g_object_class_install_property
     (object_class,
      PROP_RTL,
@@ -506,16 +439,6 @@ ar_style_class_init (ArStyleClass *klass)
                            G_PARAM_READWRITE |
                            G_PARAM_STATIC_STRINGS));
 
-#ifdef HAVE_CLUTTER
-  _ar_clutter_color_from_gdk_color (&color, &default_selection_color);
-  g_object_class_install_property
-    (object_class,
-     PROP_SELECTION_COLOR,
-     clutter_param_spec_color (AR_STYLE_PROP_SELECTION_COLOR, NULL, NULL,
-                               &color,
-                               G_PARAM_READWRITE |
-                               G_PARAM_STATIC_STRINGS));
-#else
   g_object_class_install_property
     (object_class,
      PROP_SELECTION_COLOR,
@@ -523,7 +446,6 @@ ar_style_class_init (ArStyleClass *klass)
                          GDK_TYPE_COLOR,
                          G_PARAM_READWRITE |
                          G_PARAM_STATIC_STRINGS));
-#endif /* HAVE_CLUTTER */
 
   /**
    * ArStyle:show-tooltips:
@@ -562,20 +484,6 @@ ar_style_class_init (ArStyleClass *klass)
 
 /* private API */
 
-#ifdef HAVE_CLUTTER
-
-void
-_ar_clutter_color_from_gdk_color (ClutterColor *clutter_color,
-                                  const GdkColor *gdk_color)
-{
-  clutter_color->red   = gdk_color->red   >> 8;
-  clutter_color->green = gdk_color->green >> 8;
-  clutter_color->blue  = gdk_color->blue  >> 8;
-  clutter_color->alpha = 0xff;
-}
-
-#endif /* HAVE_CLUTTER */
-
 /* public API */
 
 /**
@@ -897,11 +805,7 @@ ar_style_get_card_step (ArStyle *style)
  */
 void
 ar_style_get_selection_color (ArStyle *style,
-#ifdef HAVE_CLUTTER
-                              ClutterColor * const color)
-#else
                               GdkColor * const color)
-#endif
 {
   ArStylePrivate *priv = style->priv;
 
@@ -916,11 +820,7 @@ ar_style_get_selection_color (ArStyle *style,
  */
 void
 ar_style_get_baize_color (ArStyle *style,
-#ifdef HAVE_CLUTTER
-                               ClutterColor * const color)
-#else
                                GdkColor * const color)
-#endif
 {
   ArStylePrivate *priv = style->priv;
 
@@ -956,7 +856,6 @@ ar_style_check_dnd_drag_threshold (ArStyle *style,
           ABS (y2 - y1) > priv->dnd_drag_threshold);
 }
 
-#ifndef HAVE_CLUTTER
 /**
  * ar_style_get_pixbuf_drawing:
  * @style:
@@ -970,5 +869,3 @@ ar_style_get_pixbuf_drawing (ArStyle *style)
 
   return priv->pixbuf_drawing;
 }
-
-#endif /* !HAVE_CLUTTER */
diff --git a/aisleriot/ar-style.h b/aisleriot/ar-style.h
index db7dec8..e543d4c 100644
--- a/aisleriot/ar-style.h
+++ b/aisleriot/ar-style.h
@@ -20,11 +20,7 @@
 
 #include <glib-object.h>
 
-#ifdef HAVE_CLUTTER
-#include <clutter/clutter.h>
-#else
 #include <gdk/gdk.h>
-#endif
 
 #include "ar-card-theme.h"
 
diff --git a/aisleriot/game.c b/aisleriot/game.c
index e42c88c..a51b9c8 100644
--- a/aisleriot/game.c
+++ b/aisleriot/game.c
@@ -31,10 +31,6 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 
-#ifdef HAVE_CLUTTER
-#include <clutter/clutter.h>
-#endif
-
 #include <libgames-support/games-debug.h>
 #include <libgames-support/games-glib-compat.h>
 #include <libgames-support/games-runtime.h>
@@ -236,16 +232,7 @@ clear_slots (AisleriotGame *game,
   for (i = 0; i < n_slots; ++i) {
     ArSlot *slot = game->slots->pdata[i];
 
-#ifdef HAVE_CLUTTER
-    if (slot->slot_renderer) {
-      clutter_actor_destroy (slot->slot_renderer);
-      g_object_unref (slot->slot_renderer);
-    }
-
-    g_byte_array_free (slot->old_cards, TRUE);
-#else
     g_ptr_array_free (slot->card_images, TRUE);
-#endif /* HAVE_CLUTTER */
     g_byte_array_free (slot->cards, TRUE);
 
     g_slice_free (ArSlot, slot);
@@ -641,11 +628,7 @@ cscmi_add_slot (SCM slot_data)
   slot->expanded_down = expanded_down != FALSE;
   slot->expanded_right = expanded_right != FALSE;
 
-#ifdef HAVE_CLUTTER
-  slot->old_cards = g_byte_array_sized_new (SLOT_CARDS_N_PREALLOC);
-#else
   slot->card_images = g_ptr_array_sized_new (SLOT_CARDS_N_PREALLOC);
-#endif
 
   slot->needs_update = TRUE;
 
@@ -2482,41 +2465,3 @@ aisleriot_game_deal_cards (AisleriotGame *game)
   aisleriot_game_end_move (game);
   aisleriot_game_test_end_of_game (game);
 }
-
-#ifdef HAVE_CLUTTER
-
-void
-aisleriot_game_get_card_offset (ArSlot *slot,
-                                guint card_num,
-                                gboolean old_cards,
-                                gint *xoff, gint *yoff)
-{
-  gint n_cards, exposed;
-
-  if (old_cards) {
-    n_cards = (gint) slot->old_cards->len;
-    exposed = (gint) slot->old_exposed;
-  } else {
-    n_cards = (gint) slot->cards->len;
-    exposed = (gint) slot->exposed;
-  }
-
-  if (card_num >= n_cards - exposed) {
-    gint idx = card_num + exposed - n_cards;
-    *xoff = slot->pixeldx * idx;
-    *yoff = slot->pixeldy * idx;
-  } else {
-    *xoff = 0;
-    *yoff = 0;
-  }
-}
-
-void
-aisleriot_game_reset_old_cards (ArSlot *slot)
-{
-  g_byte_array_set_size (slot->old_cards, 0);
-  g_byte_array_append (slot->old_cards, slot->cards->data, slot->cards->len);
-  slot->old_exposed = slot->exposed;
-}
-
-#endif /* HAVE_CLUTTER */
diff --git a/aisleriot/game.h b/aisleriot/game.h
index 6d4a0a1..ffe21fc 100644
--- a/aisleriot/game.h
+++ b/aisleriot/game.h
@@ -22,10 +22,6 @@
 
 #include "ar-card.h"
 
-#ifdef HAVE_CLUTTER
-#include <clutter/clutter.h>
-#endif
-
 G_BEGIN_DECLS
 
 /* A slot */
diff --git a/aisleriot/lib/Makefile.am b/aisleriot/lib/Makefile.am
index 833daba..a1aa528 100644
--- a/aisleriot/lib/Makefile.am
+++ b/aisleriot/lib/Makefile.am
@@ -28,13 +28,6 @@ libaisleriot_la_SOURCES += \
 	ar-card-surface-cache.h \
 	$(NULL)
 
-if HAVE_CLUTTER
-libaisleriot_la_SOURCES += \
-	ar-card-textures-cache.c \
-	ar-card-textures-cache.h \
-	$(NULL)
-endif # HAVE_CLUTTER
-
 if HAVE_RSVG
 libaisleriot_la_SOURCES += ar-card-theme-preimage.c
 
@@ -86,11 +79,6 @@ libaisleriot_la_CFLAGS += $(RSVG_CFLAGS)
 libaisleriot_la_LIBADD += $(RSVG_LIBS)
 endif # HAVE_RSVG
 
-if HAVE_CLUTTER
-libaisleriot_la_CFLAGS += $(CLUTTER_CFLAGS)
-libaisleriot_la_LIBADD += $(CLUTTER_LIBS)
-endif # HAVE_CLUTTER
-
 if HAVE_HILDON
 libaisleriot_la_CFLAGS += $(HILDON_CFLAGS)
 libaisleriot_la_LIBADD += $(HILDON_LIBS)
diff --git a/aisleriot/prop-editor.c b/aisleriot/prop-editor.c
index 38f60d5..afd175d 100644
--- a/aisleriot/prop-editor.c
+++ b/aisleriot/prop-editor.c
@@ -27,10 +27,6 @@
 
 #include "prop-editor.h"
 
-#ifdef HAVE_CLUTTER
-#include <clutter/clutter.h>
-#endif
-
 #ifdef HAVE_MAEMO_5
 #include <hildon/hildon-gtk.h>
 #include <hildon/hildon-pannable-area.h>
@@ -715,81 +711,6 @@ color_changed (GObject *object, GParamSpec *pspec, gpointer data)
   g_value_unset (&val);
 }
 
-#ifdef HAVE_CLUTTER
-
-static void
-_clutter_color_from_gdk_color (ClutterColor *clutter_color,
-                               const GdkColor *gdk_color)
-{
-  clutter_color->red   = gdk_color->red   >> 8;
-  clutter_color->green = gdk_color->green >> 8;
-  clutter_color->blue  = gdk_color->blue  >> 8;
-  clutter_color->alpha = 0xff;
-}
-
-static void
-_clutter_color_to_gdk_color (GdkColor *gdk_color,
-                             const ClutterColor *clutter_color)
-{
-  gdk_color->red   = clutter_color->red   << 8;
-  gdk_color->green = clutter_color->green << 8;
-  gdk_color->blue  = clutter_color->blue  << 8;
-  gdk_color->pixel = 0;
-}
-
-static void
-cluttercolor_modified (GtkColorButton *cb, gpointer data)
-{
-  ObjectProperty *p = data;
-  GdkColor color;
-  ClutterColor ccolor;
-
-  gtk_color_button_get_color (cb, &color);
-  _clutter_color_from_gdk_color (&ccolor, &color);
-
-  if (is_child_property (p->spec))
-    {
-      GtkWidget *widget = GTK_WIDGET (p->obj);
-      GtkWidget *parent = gtk_widget_get_parent (widget);
-
-      gtk_container_child_set (GTK_CONTAINER (parent),
-			       widget, p->spec->name, &ccolor, NULL);
-    }
-  else
-    g_object_set (p->obj, p->spec->name, &ccolor, NULL);
-}
-
-static void
-cluttercolor_changed (GObject *object, GParamSpec *pspec, gpointer data)
-{
-  GtkColorButton *cb = GTK_COLOR_BUTTON (data);
-  GValue val = { 0, };
-  GdkColor cb_color;
-  ClutterColor *color;
-  ClutterColor cb_ccolor;
-
-  g_assert (G_PARAM_SPEC_VALUE_TYPE (pspec) == CLUTTER_TYPE_COLOR);
-
-  g_value_init (&val, CLUTTER_TYPE_COLOR);
-  get_property_value (object, pspec, &val);
-  color = g_value_get_boxed (&val);
-
-  gtk_color_button_get_color (cb, &cb_color);
-  _clutter_color_from_gdk_color (&cb_ccolor, &cb_color);
-
-  if (color != NULL && !clutter_color_equal (color, &cb_ccolor))
-    {
-      block_controller (G_OBJECT (cb));
-      _clutter_color_to_gdk_color (&cb_color, color);
-      gtk_color_button_set_color (cb, &cb_color);
-      unblock_controller (G_OBJECT (cb));
-    }
-
-  g_value_unset (&val);
-}
-
-#endif /* HAVE_CLUTTER */
-
 static GtkWidget *
 property_widget (GObject    *object, 
 		 GParamSpec *spec, 
@@ -1019,22 +940,6 @@ property_widget (GObject    *object,
 	connect_controller (G_OBJECT (prop_edit), "color-set",
 			    object, spec, G_CALLBACK (color_modified));
     }
-#ifdef HAVE_CLUTTER
-  else if ((type == G_TYPE_PARAM_BOXED &&
-            G_PARAM_SPEC_VALUE_TYPE (spec) == CLUTTER_TYPE_COLOR) ||
-           type == CLUTTER_TYPE_PARAM_COLOR)
-    {
-      prop_edit = gtk_color_button_new ();
-      
-      g_object_connect_property (object, spec, 
-				 G_CALLBACK (cluttercolor_changed),
-				 prop_edit, G_OBJECT (prop_edit));
-      
-      if (can_modify)
-	connect_controller (G_OBJECT (prop_edit), "color-set",
-			    object, spec, G_CALLBACK (cluttercolor_modified));
-    }
-#endif /* HAVE_CLUTTER */
   else
     {  
       msg = g_strdup_printf ("uneditable property type: %s",
diff --git a/aisleriot/sol.c b/aisleriot/sol.c
index cd3aa06..46967a9 100644
--- a/aisleriot/sol.c
+++ b/aisleriot/sol.c
@@ -28,16 +28,6 @@
 
 #include <gtk/gtk.h>
 
-#ifdef HAVE_CLUTTER
-#include <cogl/cogl.h>
-#include <clutter/clutter.h>
-#include <clutter-gtk/clutter-gtk.h>
-
-#ifndef CLUTTER_GTK_CHECK_VERSION
-#define CLUTTER_GTK_CHECK_VERSION(a,b,c) (0)
-#endif
-#endif
-
 #ifdef HAVE_HILDON
 #include <libosso.h>
 
@@ -273,14 +263,6 @@ main_prog (void *closure, int argc, char *argv[])
   g_option_context_add_group (option_context, egg_sm_client_get_option_group ());
 #endif /* WITH_SMCLIENT */
 
-#ifdef HAVE_CLUTTER
-  g_option_context_add_group (option_context, cogl_get_option_group ());
-  g_option_context_add_group (option_context, clutter_get_option_group_without_init ());
-#if CLUTTER_GTK_CHECK_VERSION (0, 90, 0)
-  g_option_context_add_group (option_context, gtk_clutter_get_option_group ());
-#endif
-#endif /* HAVE_CLUTTER */
-
 #if defined(HAVE_HILDON) && defined(HAVE_MAEMO_5)
   {
     char *rc_file;
@@ -304,16 +286,6 @@ main_prog (void *closure, int argc, char *argv[])
     goto cleanup;
   }
 
-#ifdef HAVE_CLUTTER
-#if !CLUTTER_GTK_CHECK_VERSION (0, 90, 0)
-  if (gtk_clutter_init_with_args (NULL, NULL, NULL, NULL, NULL, &error) != CLUTTER_INIT_SUCCESS) {
-    g_printerr ("Failed to initialise clutter: %s\n", error->message);
-    g_error_free (error);
-    goto cleanup;
-  }
-#endif
-#endif /* HAVE_CLUTTER */
-
 #ifdef HAVE_MAEMO
   data.program = HILDON_PROGRAM (hildon_program_get_instance ());
 
diff --git a/aisleriot/window.c b/aisleriot/window.c
index aeefbe3..57a9b62 100644
--- a/aisleriot/window.c
+++ b/aisleriot/window.c
@@ -50,14 +50,7 @@
 #include <libgames-support/games-atk-utils.h>
 #endif
 
-#ifdef HAVE_CLUTTER
-#include "ar-clutter-embed.h"
-#include "ar-style.h"
-#include "baize.h"
-#include "board.h"
-#else
 #include "board-noclutter.h"
-#endif
 
 #include "ar-card-theme.h"
 #include "ar-card-themes.h"
@@ -124,13 +117,7 @@ struct _AisleriotWindowPrivate
 {
   AisleriotGame *game;
   ArStyle *board_style;
-#ifdef HAVE_CLUTTER
-  ArClutterEmbed *board;
-  ClutterActor *baize_actor;
-  ClutterActor *board_actor;
-#else
   AisleriotBoard *board;
-#endif
 
   ArCardThemes *theme_manager;
   ArCardTheme *theme;
@@ -372,11 +359,7 @@ undo_cb (GtkAction *action,
   AisleriotWindowPrivate *priv = window->priv;
 
   /* If a move is in progress, cancel it before changing the game! */
-#ifdef HAVE_CLUTTER
-  aisleriot_board_abort_move (AISLERIOT_BOARD (priv->board_actor));
-#else
   aisleriot_board_abort_move (priv->board);
-#endif
 
   aisleriot_game_undo_move (priv->game);
 }
@@ -387,11 +370,7 @@ redo_cb (GtkAction *action,
 {
   AisleriotWindowPrivate *priv = window->priv;
 
-#ifdef HAVE_CLUTTER
-  aisleriot_board_abort_move (AISLERIOT_BOARD (priv->board_actor));
-#else
   aisleriot_board_abort_move (priv->board);
-#endif
 
   aisleriot_game_redo_move (priv->game);
 }
@@ -1007,24 +986,6 @@ sound_toggle_cb (GtkToggleAction *action,
 
 #endif /* ENABLE_SOUND */
 
-#ifdef HAVE_CLUTTER
-
-static void
-animations_toggle_cb (GtkToggleAction *action,
-                      AisleriotWindow *window)
-{
-  AisleriotWindowPrivate *priv = window->priv;
-  gboolean enabled;
-
-  enabled = gtk_toggle_action_get_active (action);
-
-  ar_style_set_enable_animations (priv->board_style, enabled);
-  
-  games_conf_set_boolean (NULL, aisleriot_conf_get_key (CONF_ANIMATIONS), enabled);
-}
-
-#endif /* HAVE_CLUTTER */
-
 static void
 show_hint_cb (GtkAction *action,
               AisleriotWindow *window)
@@ -1911,7 +1872,7 @@ game_exception_cb (AisleriotGame *game,
   gtk_widget_show (dialog);
 }
 
-#if defined(HAVE_CLUTTER) || (defined(ENABLE_SOUND) && GTK_CHECK_VERSION (2, 14, 0))
+#if defined(ENABLE_SOUND) && GTK_CHECK_VERSION (2, 14, 0)
 
 static void
 settings_changed_cb (GtkSettings *settings,
@@ -1928,23 +1889,12 @@ settings_changed_cb (GtkSettings *settings,
   else
     name = NULL;
 
-#ifdef HAVE_CLUTTER
-  if (name == NULL || strcmp (name, "gtk-enable-animations") == 0) {
-    g_object_get (settings, "gtk-enable-animations", &enabled, NULL);
-
-    action = gtk_action_group_get_action (priv->action_group, "Animations");
-    gtk_action_set_visible (action, enabled);
-  }
-#endif /* HAVE_CLUTTER */
-
-#if defined(ENABLE_SOUND) && GTK_CHECK_VERSION (2, 14, 0)
   if (name == NULL || strcmp (name, "gtk-enable-event-sounds") == 0) {
     g_object_get (settings, "gtk-enable-event-sounds", &enabled, NULL);
 
     action = gtk_action_group_get_action (priv->action_group, "Sound");
     gtk_action_set_visible (action, enabled);
   }
-#endif /* ENABLE_SOUND && GTK >= 2.14 */
 }
 
 static void
@@ -1972,17 +1922,11 @@ screen_changed_cb (GtkWidget *widget,
 
   settings = gtk_widget_get_settings (widget);
   settings_changed_cb (settings, NULL, window);
-#ifdef HAVE_CLUTTER
-  g_signal_connect (settings, "notify::gtk-enable-animations",
-                    G_CALLBACK (settings_changed_cb), window);
-#endif
-#if defined (ENABLE_SOUND) && GTK_CHECK_VERSION (2, 14, 0)
   g_signal_connect (settings, "notify::gtk-enable-event-sounds",
                     G_CALLBACK (settings_changed_cb), window);
-#endif
 }
 
-#endif /* HAVE_CLUTTER || ENABLE_SOUND && GTK+ >= 2.14.0 */
+#endif /* ENABLE_SOUND && GTK+ >= 2.14.0 */
 
 /*
  * aisleriot_window_set_freecell_mode:
@@ -2032,37 +1976,6 @@ board_status_message_cb (AisleriotBoard *board,
 
 #endif /* !HAVE_HILDON */
 
-#ifdef HAVE_CLUTTER
-
-static void
-board_cursor_cb (AisleriotBoard *board,
-                 int cursor_type,
-                 ArClutterEmbed *embed)
-{
-  ar_clutter_embed_set_cursor (embed, (ArCursorType) cursor_type);
-}
-
-static void
-board_error_bell_cb (AisleriotBoard *board,
-                     ArClutterEmbed *embed)
-{
-#if GTK_CHECK_VERSION (2, 12, 0) || (defined (HAVE_HILDON) && !defined(HAVE_MAEMO_3))
-  gtk_widget_error_bell (GTK_WIDGET (embed));
-#endif
-}
-
-static void
-embed_size_allocate_cb (ArClutterEmbed *embed,
-                        GtkAllocation *allocation,
-                        AisleriotWindow *window)
-{
-  AisleriotWindowPrivate *priv = window->priv;
-
-  clutter_actor_set_size (priv->board_actor, allocation->width, allocation->height);
-}
-
-#endif /* HAVE_CLUTTER */
-
 /* Class implementation */
 
 #ifdef HAVE_HILDON
@@ -2291,12 +2204,6 @@ aisleriot_window_init (AisleriotWindow *window)
       G_CALLBACK (sound_toggle_cb),
       FALSE /* not active by default */ },
 #endif /* ENABLE_SOUND */
-#ifdef HAVE_CLUTTER
-   { "Animations", NULL, N_("_Animations"), NULL,
-      ACTION_TOOLTIP (N_("Whether or not to animate card moves")),
-      G_CALLBACK (animations_toggle_cb),
-      FALSE /* not active by default */ },
-#endif /* HAVE_CLUTTER */
   };
 
   static const char names[][16] = {
@@ -2393,9 +2300,6 @@ aisleriot_window_init (AisleriotWindow *window)
 #ifdef ENABLE_SOUND
           "<menuitem action='Sound'/>"
 #endif
-#ifdef HAVE_CLUTTER
-          "<menuitem action='Animations'/>"
-#endif
         "</menu>"
         "<menu action='OptionsMenu'/>"
         "<menu action='HelpMenu'>"
@@ -2459,9 +2363,6 @@ aisleriot_window_init (AisleriotWindow *window)
   GtkStatusbar *statusbar;
   GtkWidget *statusbar_hbox, *label, *time_box;
 #endif
-#ifdef HAVE_CLUTTER
-  ClutterContainer *stage;
-#endif
 
   g_assert (G_N_ELEMENTS (names) == LAST_ACTION);
 
@@ -2475,34 +2376,7 @@ aisleriot_window_init (AisleriotWindow *window)
 
   priv->board_style = ar_style_new ();
 
-#ifdef HAVE_CLUTTER
-  priv->board = ar_clutter_embed_new (priv->board_style);
-
-  priv->baize_actor = aisleriot_baize_new ();
-
-  stage = CLUTTER_CONTAINER (gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (priv->board)));
-  clutter_container_add (stage, priv->baize_actor, NULL);
-  /* FIXMEchpe: how to ensure this is ALWAYS the lowest actor? */
-  clutter_actor_lower_bottom (priv->baize_actor);
-
-  priv->board_actor = aisleriot_board_new (priv->board_style, priv->game);
-  clutter_container_add (stage, priv->board_actor, NULL);
-
-  /* FIXMEchpe */
-  clutter_stage_set_key_focus (CLUTTER_STAGE (stage), priv->board_actor);
-
-  g_signal_connect_after (priv->board, "size-allocate",
-                          G_CALLBACK (embed_size_allocate_cb), window);
-
-  g_signal_connect (priv->board_actor, "request-cursor",
-                    G_CALLBACK (board_cursor_cb), priv->board);
-  g_signal_connect (priv->board_actor, "error-bell",
-                    G_CALLBACK (board_error_bell_cb), priv->board);
-
-  /* FIXMEchpe: unref baize & board_actor here? */
-#else
   priv->board = AISLERIOT_BOARD (aisleriot_board_new (priv->board_style, priv->game));
-#endif /* HAVE_CLUTTER */
 
   theme_name = games_conf_get_string (NULL, aisleriot_conf_get_key (CONF_THEME), NULL);
   theme = ar_card_themes_get_theme_by_name (priv->theme_manager, theme_name);
@@ -2554,13 +2428,8 @@ aisleriot_window_init (AisleriotWindow *window)
 
   priv->game_message_id = gtk_statusbar_get_context_id (priv->statusbar, "board-message");
 
-#ifdef HAVE_CLUTTER
-  g_signal_connect (priv->board_actor, "status-message",
-                    G_CALLBACK (board_status_message_cb), window);
-#else
   g_signal_connect (priv->board, "status-message",
                     G_CALLBACK (board_status_message_cb), window);
-#endif
 
 #if GTK_CHECK_VERSION (2, 11, 0)
   gtk_statusbar_set_has_resize_grip (priv->statusbar, TRUE);
@@ -2698,19 +2567,12 @@ aisleriot_window_init (AisleriotWindow *window)
 
   set_fullscreen_actions (window, FALSE);
 
-#ifdef HAVE_CLUTTER
-  action = gtk_action_group_get_action (priv->action_group, "Animations");
-  gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
-                                games_conf_get_boolean (NULL, aisleriot_conf_get_key (CONF_ANIMATIONS), NULL));
-
-#endif /* HAVE_CLUTTER */
-
-#if defined(HAVE_CLUTTER) || (defined(ENABLE_SOUND) && GTK_CHECK_VERSION (2, 14, 0))
+#if defined(ENABLE_SOUND) && GTK_CHECK_VERSION (2, 14, 0)
   /* Set the action visibility and listen for animation and sound mode changes */
   screen_changed_cb (GTK_WIDGET (window), NULL, window);
   g_signal_connect (window, "screen-changed",
                     G_CALLBACK (screen_changed_cb), window);
-#endif /* HAVE_CLUTTER || ENABLE_SOUND && GTK+ >= 2.14.0 */
+#endif /* ENABLE_SOUND && GTK+ >= 2.14.0 */
 
   /* Now set up the widgets */
   main_vbox = gtk_vbox_new (FALSE, 0);
@@ -2792,12 +2654,6 @@ aisleriot_window_dispose (GObject *object)
   AisleriotWindow *window = AISLERIOT_WINDOW (object);
   AisleriotWindowPrivate *priv = window->priv;
   
-#ifdef HAVE_CLUTTER
-  g_signal_handlers_disconnect_by_func (gtk_widget_get_settings (GTK_WIDGET (window)),
-                                        G_CALLBACK (settings_changed_cb),
-                                        window);
-#endif /* HAVE_CLUTTER */
-
 #ifndef HAVE_HILDON
   if (priv->hint_dialog) {
     gtk_widget_destroy (priv->hint_dialog);
@@ -2838,10 +2694,6 @@ aisleriot_window_finalize (GObject *object)
   AisleriotWindow *window = AISLERIOT_WINDOW (object);
   AisleriotWindowPrivate *priv = window->priv;
 
-#ifdef HAVE_CLUTTER
-  g_object_unref (priv->board_style);
-#endif /* HAVE_CLUTTER */
-
   if (priv->theme) {
     g_object_unref (priv->theme);
   }
diff --git a/configure.in b/configure.in
index 66c4c48..53a2b54 100644
--- a/configure.in
+++ b/configure.in
@@ -391,27 +391,10 @@ fi
 # Clutter
 # *******
 
-# We're using need_guile as a quick way to check whether building aisleriot
-if test "$need_guile" = "yes"; then
-  AC_MSG_CHECKING([whether to enable aisleriot/clutter])
-  AC_ARG_ENABLE([aisleriot-clutter],
-    [AS_HELP_STRING([--enable-aisleriot-clutter],[Whether to enable the clutter version of aisleriot (default: disabled)])],
-    [],[enable_aisleriot_clutter=no])
-  AC_MSG_RESULT([$enable_aisleriot_clutter])
-
-  if test "$enable_aisleriot_clutter" = "yes"; then
-    # Distro packagers: DO NOT ENABLE AISLERIOT/CLUTTER IN YOUR DISTRO PACKAGES, OR ELSE!
-    AC_MSG_NOTICE([Aisleriot/Clutter is experimental; do not enable this for distribution packages!])
-    need_clutter=yes
-  fi
-fi
-
-AM_CONDITIONAL([ENABLE_AISLERIOT_CLUTTER],[test "$enable_aisleriot_clutter" = "yes"])
-
 case "$with_platform" in
   gnome|gtk-only) ;;
   hildon) if test "$need_clutter" = "yes"; then
-            AC_MSG_ERROR([Clutter is not supported on hildon; disable Gnometris, Lights Off and Aisleriot/Clutter])
+            AC_MSG_ERROR([Clutter is not supported on hildon; disable Gnometris, Lights Off])
           fi
           ;;
 esac
diff --git a/po/POTFILES.in b/po/POTFILES.in
index d8fd8c5..a91da88 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,9 +2,7 @@
 # Please keep this file in alphabetical order.
 [encoding: UTF-8]
 aisleriot/aisleriot.schemas.in
-aisleriot/ar-clutter-embed.c
 aisleriot/ar-game-chooser.c
-aisleriot/board.c
 aisleriot/board-noclutter.c
 aisleriot/conf.c
 aisleriot/freecell.desktop.in.in



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