[gnome-games] lightsoff, swell-foop: Don't try to manually iterate GLib main loop inside inner loop



commit 98b73ad020ba6e61f0a9243a938792cd94c337ed
Author: Edward Sheldrake <ejsheldrake gmail com>
Date:   Wed Oct 13 20:08:08 2010 +0100

    lightsoff, swell-foop: Don't try to manually iterate GLib main loop inside inner loop
    
    Fix swell-foop and lightsoff not working due to:
    TypeError Result of expression 'GLib.main_context_iteration' [undefined] is not a function.
    
    Comment out the GLib.main_context_ functions. I don't know what if anything
    these should be replaced with, but swell-foop and lightsoff appear to work
    without them.

 lightsoff/src/Board.js  |    2 +-
 swell-foop/src/Board.js |    8 ++++----
 swell-foop/src/Light.js |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/lightsoff/src/Board.js b/lightsoff/src/Board.js
index 2f02ab0..c04b579 100644
--- a/lightsoff/src/Board.js
+++ b/lightsoff/src/Board.js
@@ -100,7 +100,7 @@ BoardView = new GType({
 					lights[x][y] = l;
 					self.add_actor(l);
 					
-					GLib.main_context_iteration(null, false);
+					// GLib.main_context_iteration(null, false);
 				}
 			}
 		}
diff --git a/swell-foop/src/Board.js b/swell-foop/src/Board.js
index 0e44c78..84cff9d 100644
--- a/swell-foop/src/Board.js
+++ b/swell-foop/src/Board.js
@@ -40,8 +40,8 @@ Board = new GType({
 			
 			var con = [li];
 			
-			while(GLib.main_context_pending())
-				GLib.main_context_iteration();
+			// while(GLib.main_context_pending())
+			//	GLib.main_context_iteration();
 			
 			var a = [], b = [], c = [], d = [];
 			
@@ -232,10 +232,10 @@ Board = new GType({
 					if(!li.get_closed())
 						empty_col = false;
 					
-					GLib.main_context_iteration();
+					// GLib.main_context_iteration();
 				}
 				
-				GLib.main_context_iteration();
+				// GLib.main_context_iteration();
 				
 				if(!empty_col)
 					real_x++;
diff --git a/swell-foop/src/Light.js b/swell-foop/src/Light.js
index bd4ee74..b8dd5c8 100644
--- a/swell-foop/src/Light.js
+++ b/swell-foop/src/Light.js
@@ -48,7 +48,7 @@ Light = new GType({
 			
 			timeline.signal.completed.connect(this.hide_light, this);
 			
-			GLib.main_context_iteration();
+			// GLib.main_context_iteration();
 		};
 	
 		this.animate_to = function (new_x, new_y, timeline)
@@ -62,7 +62,7 @@ Light = new GType({
 				y: new_y
 			});
 			
-			GLib.main_context_iteration();
+			// GLib.main_context_iteration();
 		};
 	
 		this.get_closed = function ()



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