Commit 12158fe0 authored by Arnaud Bonatti's avatar Arnaud Bonatti

Focus fix.

Now that there is no more undo
button, give focus to board on
an undo call, unconditionally.
parent e9742d1b
......@@ -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)
{
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment