[gnome-nibbles] Clean up end game code, makes it more likely you will know when the games is over



commit de59529571f24d5669c6d2ec61671ed7a8bafe39
Author: Bryan Quigley <bryanquigs src gnome org>
Date:   Sun Jan 5 01:05:22 2014 -0500

    Clean up end game code, makes it more likely you will know when the games is over

 src/main.c |   30 +-----------------------------
 1 files changed, 1 insertions(+), 29 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 794886b..1de2eca 100644
--- a/src/main.c
+++ b/src/main.c
@@ -469,42 +469,14 @@ main_loop (gpointer data)
     if (winner == -1)
       return FALSE;
 
-    str = g_strdup_printf (_("Game over! The game has been won by %s!"),
-                             names[winner]);
-    g_free (str);
-
-    if (keyboard_id) {
-      g_signal_handler_disconnect (G_OBJECT (stage), keyboard_id);
-      keyboard_id = 0;
-    }
-    if (main_id) {
-      g_source_remove (main_id);
-      main_id = 0;
-    }
-    if (add_bonus_id)
-      g_source_remove (add_bonus_id);
-
-    add_bonus_id = 0;
-
-    animate_end_game ();
     gnibbles_log_score (window);
 
     return FALSE;
   }
 
   if (status == GAMEOVER) {
+    end_game ();
 
-    if (keyboard_id) {
-      g_signal_handler_disconnect (G_OBJECT (stage), keyboard_id);
-      keyboard_id = 0;
-    }
-    main_id = 0;
-    if (add_bonus_id)
-      g_source_remove (add_bonus_id);
-
-    add_bonus_id = 0;
-
-    animate_end_game ();
     gnibbles_log_score (window);
 
     return FALSE;


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