[gnome-games] lightsoff, swell-foop: Print error if Clutter fails to initialize



commit cba9f995d40e66c028f3f2a10c8de819d75f171c
Author: Tim Horton <hortont424 gmail com>
Date:   Mon Jan 11 17:48:46 2010 -0500

    lightsoff, swell-foop: Print error if Clutter fails to initialize

 lightsoff/src/main.js  |   12 +++++++++++-
 swell-foop/src/main.js |   10 +++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/lightsoff/src/main.js b/lightsoff/src/main.js
index 63f3228..71fc986 100755
--- a/lightsoff/src/main.js
+++ b/lightsoff/src/main.js
@@ -7,7 +7,17 @@ GtkBuilder = imports.gtkbuilder;
 GnomeGamesSupport = imports.gi.GnomeGamesSupport;
 
 Gtk.init(Seed.argv);
-GtkClutter.init(Seed.argv);
+
+try
+{
+	GtkClutter.init_with_args(Seed.argv.length, Seed.argv);
+}
+catch(e)
+{
+	print("Failed to initialise clutter: " + e.message);
+	Seed.quit(1);
+}
+
 GnomeGamesSupport.runtime_init("lightsoff");
 GnomeGamesSupport.stock_init();
 
diff --git a/swell-foop/src/main.js b/swell-foop/src/main.js
index 473540b..2d23dce 100755
--- a/swell-foop/src/main.js
+++ b/swell-foop/src/main.js
@@ -12,7 +12,15 @@ Clutter = imports.gi.Clutter;
 GnomeGamesSupport = imports.gi.GnomeGamesSupport;
 _ = imports.gettext.gettext;
 
-GtkClutter.init(Seed.argv);
+try
+{
+	GtkClutter.init_with_args(Seed.argv.length, Seed.argv);
+}
+catch(e)
+{
+	print("Failed to initialise clutter: " + e.message);
+	Seed.quit(1);
+}
 
 if(GnomeGamesSupport.setgid_io_init)
 	GnomeGamesSupport.setgid_io_init();



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