[gnome-taquin] Focus fix.



commit 12158fe09480836fde0aea5a757eb879593232c5
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Feb 16 17:05:23 2019 +0100

    Focus fix.
    
    Now that there is no more undo
    button, give focus to board on
    an undo call, unconditionally.

 src/game-headerbar.vala | 5 -----
 src/game-window.vala    | 9 +++------
 2 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/src/game-headerbar.vala b/src/game-headerbar.vala
index 38ec29a..8d64ab9 100644
--- a/src/game-headerbar.vala
+++ b/src/game-headerbar.vala
@@ -185,11 +185,6 @@ private class GameHeaderBar : BaseHeaderBar
         new_game_button.grab_focus ();
     }
 
-    internal bool new_game_button_is_focus ()
-    {
-        return new_game_button.is_focus;
-    }
-
     private uint last_moves_count = 0;
     internal void set_moves_count (ref uint moves_count)
     {
diff --git a/src/game-window.vala b/src/game-window.vala
index 88aff99..0da2ae1 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -229,8 +229,7 @@ private class GameWindow : BaseWindow, AdaptativeWidget
         game_finished = false;
         hide_notification ();
 
-        if (headerbar.new_game_button_is_focus ())
-            game_view.show_game_content (/* grab focus */ true);
+        game_view.show_game_content (/* grab focus */ true);
         redo_action.set_enabled (true);
 
         undo ();
@@ -243,8 +242,7 @@ private class GameWindow : BaseWindow, AdaptativeWidget
         if (!game_view.game_content_visible_if_true ())
             return;
 
-        if (headerbar.new_game_button_is_focus ())
-            game_view.show_game_content (/* grab focus */ true);
+        game_view.show_game_content (/* grab focus */ true);
         restart_action.set_enabled (true);
         undo_action.set_enabled (true);
 
@@ -284,8 +282,7 @@ private class GameWindow : BaseWindow, AdaptativeWidget
         game_finished = false;
         hide_notification ();
 
-        if (headerbar.new_game_button_is_focus ())
-            game_view.show_game_content (/* grab focus */ true);
+        game_view.show_game_content (/* grab focus */ true);
         redo_action.set_enabled (true);
         restart_action.set_enabled (false);
 


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