[gnome-chess/gnome-3-10] Do not enable pause action when browsing history
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess/gnome-3-10] Do not enable pause action when browsing history
- Date: Wed, 25 Jun 2014 19:47:07 +0000 (UTC)
commit 9221f29c8e687a35b24ab71e605a9149be556372
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Wed Jun 25 14:18:43 2014 -0500
Do not enable pause action when browsing history
If a game is already completed, moving around in history could cause the
pause button to become sensitive.
src/gnome-chess.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 34571d8..f0717ce 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -741,10 +741,13 @@ public class Application : Gtk.Application
private void game_turn_cb (ChessGame game, ChessPlayer player)
{
+ if (!game.is_started)
+ return;
+
if (game.clock != null)
pause_button.sensitive = true;
- if (game.is_started && opponent_engine != null && player == opponent)
+ if (opponent_engine != null && player == opponent)
opponent_engine.request_move ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]