[gnome-games] Use gtk_clutter_get_option_group() on clutter-gtk 0.90



commit 1610ec72955004aa68b243b9ce1fe086cfe02f1f
Author: Christian Persch <chpe gnome org>
Date:   Fri Mar 26 23:41:27 2010 +0100

    Use gtk_clutter_get_option_group() on clutter-gtk 0.90

 aisleriot/sol.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/aisleriot/sol.c b/aisleriot/sol.c
index b384b33..57dfc41 100644
--- a/aisleriot/sol.c
+++ b/aisleriot/sol.c
@@ -32,6 +32,10 @@
 #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
@@ -290,10 +294,14 @@ main_prog (void *closure, int argc, char *argv[])
 #ifdef WITH_SMCLIENT
   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)
   {
@@ -319,12 +327,14 @@ main_prog (void *closure, int argc, char *argv[])
   }
 
 #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 ());



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