gnome-games r7936 - in trunk: blackjack/src glines gnect/src gnibbles gnobots2 gnometris gnomine gnotravex gnotski gtali iagno mahjongg same-gnome



Author: chpe
Date: Sat Sep 27 13:11:46 2008
New Revision: 7936
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7936&view=rev

Log:
Initialise the games runtime support.

Modified:
   trunk/blackjack/src/blackjack.cpp
   trunk/glines/glines.c
   trunk/gnect/src/main.c
   trunk/gnibbles/main.c
   trunk/gnobots2/gnobots.c
   trunk/gnometris/main.cpp
   trunk/gnomine/gnomine.c
   trunk/gnotravex/gnotravex.c
   trunk/gnotski/gnotski.c
   trunk/gtali/gyahtzee.c
   trunk/iagno/gnothello.c
   trunk/mahjongg/mahjongg.c
   trunk/mahjongg/solubility.c
   trunk/same-gnome/same-gnome.c

Modified: trunk/blackjack/src/blackjack.cpp
==============================================================================
--- trunk/blackjack/src/blackjack.cpp	(original)
+++ trunk/blackjack/src/blackjack.cpp	Sat Sep 27 13:11:46 2008
@@ -27,6 +27,7 @@
 #include <gtk/gtk.h>
 #include <games-conf.h>
 #include <games-stock.h>
+#include <games-runtime.h>
 
 #ifdef HAVE_GNOME
 #include <gnome.h>
@@ -675,6 +676,9 @@
   g_thread_init (NULL);
 #endif
 
+        if (!games_runtime_init ("blackjack"))
+                return 1;
+
         context = g_option_context_new (NULL);
 #if GLIB_CHECK_VERSION (2, 12, 0)
         g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
@@ -727,5 +731,7 @@
         g_object_unref (program);
 #endif
 
+        games_runtime_shutdown ();
+
         return 0;
 }

Modified: trunk/glines/glines.c
==============================================================================
--- trunk/glines/glines.c	(original)
+++ trunk/glines/glines.c	Sat Sep 27 13:11:46 2008
@@ -41,6 +41,7 @@
 #include <games-preimage.h>
 #include <games-stock.h>
 #include <games-conf.h>
+#include <games-runtime.h>
 
 #ifdef HAVE_GNOME
 #include <gnome.h>
@@ -1810,6 +1811,9 @@
   g_thread_init (NULL);
 #endif
 
+  if (!games_runtime_init ("glines"))
+    return 1;
+
   setgid_io_init ();
 
   rgen = g_rand_new ();
@@ -1979,5 +1983,7 @@
   g_object_unref (program);
 #endif /* HAVE_GNOME */
 
+  games_runtime_shutdown ();
+
   return 0;
 }

Modified: trunk/gnect/src/main.c
==============================================================================
--- trunk/gnect/src/main.c	(original)
+++ trunk/gnect/src/main.c	Sat Sep 27 13:11:46 2008
@@ -22,8 +22,6 @@
  * USA
  */
 
-
-
 #include "config.h"
 #include <gnome.h>
 
@@ -31,6 +29,7 @@
 #include <games-stock.h>
 #include <games-sound.h>
 #include <games-conf.h>
+#include <games-runtime.h>
 
 #include "connect4.h"
 #include "main.h"
@@ -1488,6 +1487,10 @@
   textdomain (GETTEXT_PACKAGE);
 
   g_thread_init (NULL);
+  
+  if (!games_runtime_init ("gnect"))
+    return 1;
+
   context = g_option_context_new (NULL);
   games_sound_add_option_group (context);
 
@@ -1525,5 +1528,7 @@
 
   g_object_unref (program);
 
+  games_runtime_shutdown ();
+
   return 0;
 }

Modified: trunk/gnibbles/main.c
==============================================================================
--- trunk/gnibbles/main.c	(original)
+++ trunk/gnibbles/main.c	Sat Sep 27 13:11:46 2008
@@ -30,6 +30,7 @@
 #include <games-scores.h>
 #include <games-sound.h>
 #include <games-conf.h>
+#include <games-runtime.h>
 
 #include "main.h"
 #include "properties.h"
@@ -1038,6 +1039,10 @@
   textdomain (GETTEXT_PACKAGE);
 
   g_thread_init (NULL);
+  
+  if (!games_runtime_init ("gnibbles"))
+    return 1;
+
   context = g_option_context_new (NULL);
   games_sound_add_option_group (context);
 
@@ -1087,5 +1092,7 @@
 
   g_object_unref (program);
 
+  games_runtime_shutdown ();
+
   return 0;
 }

Modified: trunk/gnobots2/gnobots.c
==============================================================================
--- trunk/gnobots2/gnobots.c	(original)
+++ trunk/gnobots2/gnobots.c	Sat Sep 27 13:11:46 2008
@@ -29,6 +29,7 @@
 #include <games-sound.h>
 #include <games-gridframe.h>
 #include <games-conf.h>
+#include <games-runtime.h>
 
 #include "gbdefs.h"
 #include "statusbar.h"
@@ -200,6 +201,9 @@
  
   g_thread_init (NULL);
 
+  if (!games_runtime_init ("gnobots"))
+    return 1;
+
   gettimeofday (&tv, NULL);
   srand (tv.tv_usec);
 
@@ -351,6 +355,8 @@
 
   g_object_unref (program);
 
+  games_runtime_shutdown ();
+
   return 0;
 }
 

Modified: trunk/gnometris/main.cpp
==============================================================================
--- trunk/gnometris/main.cpp	(original)
+++ trunk/gnometris/main.cpp	Sat Sep 27 13:11:46 2008
@@ -23,12 +23,16 @@
 #include <games-scores.h>
 #include <games-sound.h>
 #include <games-conf.h>
+#include <games-runtime.h>
 
 int
 main(int argc, char *argv[])
 {
         g_thread_init (NULL);
 
+        if (!games_runtime_init ("gnometris"))
+                return 1;
+
 	setgid_io_init ();
 
 	bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR);
@@ -69,5 +73,7 @@
 
 	g_object_unref (program);
 
+        games_runtime_shutdown ();
+
 	return 0;
 }

Modified: trunk/gnomine/gnomine.c
==============================================================================
--- trunk/gnomine/gnomine.c	(original)
+++ trunk/gnomine/gnomine.c	Sat Sep 27 13:11:46 2008
@@ -36,6 +36,7 @@
 #include <games-scores-dialog.h>
 #include <games-stock.h>
 #include <games-conf.h>
+#include <games-runtime.h>
 
 #define APP_NAME "gnomine"
 #define APP_NAME_LONG N_("Mines")
@@ -977,7 +978,10 @@
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
 
-  context = g_option_context_new ("");
+  if (!games_runtime_init ("gnomine"))
+    return 1;
+
+  context = g_option_context_new (NULL);
   g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
 
   program = gnome_program_init (APP_NAME, VERSION, LIBGNOMEUI_MODULE,
@@ -1155,5 +1159,7 @@
 
   g_object_unref (program);
 
+  games_runtime_shutdown ();
+
   return 0;
 }

Modified: trunk/gnotravex/gnotravex.c
==============================================================================
--- trunk/gnotravex/gnotravex.c	(original)
+++ trunk/gnotravex/gnotravex.c	Sat Sep 27 13:11:46 2008
@@ -35,6 +35,7 @@
 #include <games-scores.h>
 #include <games-scores-dialog.h>
 #include <games-conf.h>
+#include <games-runtime.h>
 
 #ifdef HAVE_GNOME
 #include <gnome.h>
@@ -426,6 +427,9 @@
   g_thread_init (NULL);
 #endif
 
+  if (!games_runtime_init ("gnotravex"))
+    return 1;
+
   setgid_io_init ();
 
   bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
@@ -543,6 +547,8 @@
   g_object_unref (program);
 #endif /* HAVE_GNOME */
 
+  games_runtime_shutdown ();
+
   return 0;
 }
 

Modified: trunk/gnotski/gnotski.c
==============================================================================
--- trunk/gnotski/gnotski.c	(original)
+++ trunk/gnotski/gnotski.c	Sat Sep 27 13:11:46 2008
@@ -34,6 +34,7 @@
 #include <games-scores.h>
 #include <games-scores-dialog.h>
 #include <games-conf.h>
+#include <games-runtime.h>
 
 #ifdef HAVE_GNOME
 #include <gnome.h>
@@ -498,6 +499,9 @@
   g_thread_init (NULL);
 #endif
 
+  if (!games_runtime_init ("gnotski"))
+    return 1;
+
   setgid_io_init ();
 
   bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
@@ -590,6 +594,8 @@
   g_object_unref (program);
 #endif /* HAVE_GNOME */
 
+  games_runtime_shutdown ();
+
   return 0;
 }
 

Modified: trunk/gtali/gyahtzee.c
==============================================================================
--- trunk/gtali/gyahtzee.c	(original)
+++ trunk/gtali/gyahtzee.c	Sat Sep 27 13:11:46 2008
@@ -44,6 +44,7 @@
 #include <games-scores.h>
 #include <games-scores-dialog.h>
 #include <games-conf.h>
+#include <games-runtime.h>
 
 #include "yahtzee.h"
 #include "gyahtzee.h"
@@ -873,6 +874,9 @@
 
   g_thread_init (NULL);
 
+  if (!games_runtime_init ("gtali"))
+    return 1;
+
   setgid_io_init ();
   bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -1009,6 +1013,8 @@
 
   g_object_unref (program);
 
+  games_runtime_shutdown ();
+
   exit(0);
 }
 

Modified: trunk/iagno/gnothello.c
==============================================================================
--- trunk/iagno/gnothello.c	(original)
+++ trunk/iagno/gnothello.c	Sat Sep 27 13:11:46 2008
@@ -30,6 +30,7 @@
 #include <games-stock.h>
 #include <games-sound.h>
 #include <games-conf.h>
+#include <games-runtime.h>
 
 #ifdef GGZ_CLIENT
 #include <games-dlg-chat.h>
@@ -880,6 +881,9 @@
 
   g_thread_init (NULL);
 
+  if (!games_runtime_init ("gnothello"))
+    return 1;
+
   context = g_option_context_new (NULL);
   g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
   games_sound_add_option_group (context);
@@ -930,5 +934,7 @@
 
   g_object_unref (program);
 
+  games_runtime_shutdown ();
+
   return 0;
 }

Modified: trunk/mahjongg/mahjongg.c
==============================================================================
--- trunk/mahjongg/mahjongg.c	(original)
+++ trunk/mahjongg/mahjongg.c	Sat Sep 27 13:11:46 2008
@@ -32,6 +32,7 @@
 #include <libgames-support/games-stock.h>
 #include <libgames-support/games-scores.h>
 #include <libgames-support/games-scores-dialog.h>
+#include <libgames-support/games-runtime.h>
 
 #ifdef HAVE_GNOME
 #include <gnome.h>
@@ -1413,7 +1414,6 @@
   GOptionContext *context;
 
 #ifdef HAVE_GNOME
-  GnomeClient *client;
   GnomeProgram *program;
 #else
   gboolean retval;
@@ -1427,6 +1427,9 @@
   g_thread_init (NULL);
 #endif
 
+  if (!games_runtime_init ("mahjongg"))
+    return 1;
+
   setgid_io_init ();
 
   bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
@@ -1572,5 +1575,7 @@
   g_object_unref (program);
 #endif /* HAVE_GNOME */
 
+  games_runtime_shutdown ();
+
   return 0;
 }

Modified: trunk/mahjongg/solubility.c
==============================================================================
--- trunk/mahjongg/solubility.c	(original)
+++ trunk/mahjongg/solubility.c	Sat Sep 27 13:11:46 2008
@@ -48,6 +48,7 @@
 #include <config.h>
 
 #include <string.h>
+#include <stdlib.h>
 
 #include "mahjongg.h"
 #include "solubility.h"

Modified: trunk/same-gnome/same-gnome.c
==============================================================================
--- trunk/same-gnome/same-gnome.c	(original)
+++ trunk/same-gnome/same-gnome.c	Sat Sep 27 13:11:46 2008
@@ -22,6 +22,7 @@
 #include <libgames-support/games-gridframe.h>
 #include <libgames-support/games-stock.h>
 #include <libgames-support/games-scores.h>
+#include <libgames-support/games-runtime.h>
 
 #include "same-gnome.h"
 
@@ -143,7 +144,6 @@
   };
 
 #ifdef HAVE_GNOME
-  GnomeClient *client;
   GnomeProgram *program;
 #else
   gboolean retval;
@@ -157,6 +157,9 @@
   g_thread_init (NULL);
 #endif
 
+  if (!games_runtime_init ("same-gnome"))
+    return 1;
+
   setgid_io_init ();
 
   /* Initialise i18n. */
@@ -213,5 +216,7 @@
   g_object_unref (program);
 #endif /* HAVE_GNOME */
 
+  games_runtime_shutdown ();
+
   return 0;
 }



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