[gnome-nibbles/arnaudb/modernize-code] Fix end-of-game screen.



commit 588545be37ff1f74b51afe6d8f6df293737115b2
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed May 27 19:14:12 2020 +0200

    Fix end-of-game screen.
    
    The view was hiding it.

 src/nibbles-window.vala | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/nibbles-window.vala b/src/nibbles-window.vala
index 620c6a3..18e3a9d 100644
--- a/src/nibbles-window.vala
+++ b/src/nibbles-window.vala
@@ -846,7 +846,6 @@ private class NibblesWindow : ApplicationWindow
         overlay.add_overlay (label);
         overlay.add_overlay (button);
 
-        overlay.show ();
         overlay.grab_default ();
 
         Timeout.add (500, () => {
@@ -944,8 +943,7 @@ private class NibblesWindow : ApplicationWindow
             button.destroy ();
             msg_label.destroy ();
 
-            new_game_action.set_enabled (true);
-            pause_action.set_enabled (true);
+            view.show ();
 
             show_new_game_screen_cb ();
         });
@@ -962,6 +960,9 @@ private class NibblesWindow : ApplicationWindow
 
         button.grab_focus ();
 
-        overlay.show ();
+        view.hide ();
+        new_game_action.set_enabled (false);
+        pause_action.set_enabled (false);
+        back_action.set_enabled (false);
     }
 }


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