[iagno] Don't remove the view when restarting.



commit 7ee6cbb7e2c0a3321afdeb5b71e315a0319c48c0
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Oct 7 11:42:36 2014 +0200

    Don't remove the view when restarting.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=664976

 src/iagno.vala |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/src/iagno.vala b/src/iagno.vala
index 46acb14..c6e5224 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -40,7 +40,6 @@ public class Iagno : Gtk.Application
     private Gtk.Label light_score_label;
     private Gtk.Dialog propbox;
     private Gtk.Stack main_stack;
-    private Gtk.Box game_box;
 
     private Gtk.Button back_button;
     private Gtk.Button undo_button;
@@ -202,7 +201,7 @@ public class Iagno : Gtk.Application
         view.halign = Gtk.Align.FILL;
         view.show ();
 
-        game_box = builder.get_object ("game-box") as Gtk.Box;
+        var game_box = builder.get_object ("game-box") as Gtk.Box;
         game_box.pack_start (view);
 
         /* Information widgets */
@@ -314,16 +313,11 @@ public class Iagno : Gtk.Application
         if (computer != null)
             computer.cancel_move ();
 
-        if (view != null)
-            game_box.remove (view);
-
         show_game_board ();
 
         game = new Game (alternative_start, size);
         game.turn_ended.connect (turn_ended_cb);
         view.game = game;
-        view.show ();
-        game_box.pack_start (view);
 
         var mode = settings.get_string ("play-as");
         if (mode == "two-players")


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