[gnome-games] [lightsoff] Further code cleanup, commenting



commit 1892da5c3c922b4674cf1fd0e16d90ac3ad44b79
Author: Tim Horton <hortont424 gmail com>
Date:   Sat Aug 1 21:42:13 2009 -0400

    [lightsoff] Further code cleanup, commenting

 lightsoff/src/Board.js    |    3 +++
 lightsoff/src/Game.js     |    2 +-
 lightsoff/src/Settings.js |    2 +-
 lightsoff/src/main.js     |    7 ++++---
 4 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/lightsoff/src/Board.js b/lightsoff/src/Board.js
index 74e4fd3..c654507 100644
--- a/lightsoff/src/Board.js
+++ b/lightsoff/src/Board.js
@@ -207,6 +207,9 @@ BoardView = new GType({
 			loading_level = false;
 		}
 		
+		// Set whether or not clicks on the gameboard should respond;
+		// this is used to prevent clicks from registering while the board is
+		// animating.
 		this.set_playable = function(p)
 		{
 			playable = p;
diff --git a/lightsoff/src/Game.js b/lightsoff/src/Game.js
index 1b89814..3355adb 100644
--- a/lightsoff/src/Game.js
+++ b/lightsoff/src/Game.js
@@ -48,7 +48,7 @@ GameView = new GType({
 			board_view = new_board_view;
 			board_view.set_playable(true);
 			keycursor_view.raise_top();
-			timeline = 0;
+			new_board_view = timeline = 0;
 		}
 		
 		// The player won the game; create a new board, update the level count,
diff --git a/lightsoff/src/Settings.js b/lightsoff/src/Settings.js
index 316e79d..ca87dec 100644
--- a/lightsoff/src/Settings.js
+++ b/lightsoff/src/Settings.js
@@ -75,7 +75,7 @@ handlers = {
 function show_settings()
 {
 	b = new Gtk.Builder();
-	b.add_from_file(main.file_prefix + "/settings.ui");
+	b.add_from_file(imports.Path.file_prefix + "/settings.ui");
 	b.connect_signals(handlers);
 
 	populate_theme_selector(b.get_object("theme-selector"));
diff --git a/lightsoff/src/main.js b/lightsoff/src/main.js
index 4f44560..63f3228 100755
--- a/lightsoff/src/main.js
+++ b/lightsoff/src/main.js
@@ -1,7 +1,5 @@
 #!/usr/bin/env seed
 
-file_prefix = imports.Path.file_prefix;
-
 GtkClutter = imports.gi.GtkClutter;
 Clutter = imports.gi.Clutter;
 Gtk = imports.gi.Gtk;
@@ -33,7 +31,7 @@ handlers = {
 };
 
 b = new Gtk.Builder();
-b.add_from_file(file_prefix + "/lightsoff.ui");
+b.add_from_file(imports.Path.file_prefix + "/lightsoff.ui");
 b.connect_signals(handlers);
 
 var window = b.get_object("game_window");
@@ -59,3 +57,6 @@ stage.signal.key_release_event.connect(game.update_keyboard_selection);
 window.show_all();
 
 Gtk.main();
+
+GnomeGamesSupport.runtime_shutdown();
+



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