[gnome-chess/gnome-3-8] Game doesn't need saved after undo to the start



commit 46bd4b8e12d0b2f2516f2fc8572878e79cf55654
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.
    (cherry picked from commit 159c6f7e88bde75fe0365ee26e854f148908a1a3)

 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 71e8740..705d5ae 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -824,6 +824,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]