From 384ebe0120dfc5b786523ba7d3d125bdbe69547b Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Tue, 24 Apr 2018 11:45:57 -0500 Subject: [PATCH] Make it really obvious when an en passant capture is performed Let's change the window title. Should hopefully cut down on bug reports. https://bugzilla.gnome.org/show_bug.cgi?id=485246 --- src/gnome-chess.vala | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala index 12d40c5..40ba64a 100644 --- a/src/gnome-chess.vala +++ b/src/gnome-chess.vala @@ -1210,6 +1210,14 @@ Copyright © 2015–2016 Sahil Sareen"""; /* Window title on a Black human's turn if he is in check */ headerbar.set_title (_("Black is in Check")); } + else if (game.current_state.last_move != null && + game.current_state.last_move.en_passant) + { + if (game.current_player.color == Color.WHITE) + headerbar.set_title (_("Black performed an en passant capture")); + else + headerbar.set_title (_("White performed an en passant capture")); + } else if (game.current_player.color == Color.WHITE) { if (human_player == null || human_player.color == Color.WHITE)