[gnome-chess] Game doesn't need saved after undo to the start
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] Game doesn't need saved after undo to the start
- Date: Sun, 12 May 2013 18:14:38 +0000 (UTC)
commit 159c6f7e88bde75fe0365ee26e854f148908a1a3
Author: Michael Catanzaro <mike catanzaro gmail com>
Date: Sun May 12 11:20:48 2013 -0500
Game doesn't need saved after undo to the start
Save and save as should not be sensitive after undoing past the first
move in the game. Also, the game doesn't need to be autosaved in this
situation.
src/gnome-chess.vala | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 6561f2f..e9b7854 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -822,6 +822,18 @@ public class Application : Gtk.Application
view.queue_draw ();
}
+ if (game.n_moves > 0)
+ {
+ game_needs_saving = true;
+ save_menu.sensitive = true;
+ }
+ else
+ {
+ game_needs_saving = false;
+ save_menu.sensitive = false;
+ save_as_menu.sensitive = false;
+ }
+
update_history_panel ();
update_control_buttons ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]