[gnome-chess] A couple of fixups for sensitivity of Save [As]



commit c9429d5baa5b984e2821b124e650b9282110664b
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Jan 6 17:38:47 2014 -0600

    A couple of fixups for sensitivity of Save [As]

 src/gnome-chess.vala |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 4930114..e04b119 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -466,8 +466,6 @@ public class Application : Gtk.Application
 
         scene.game = game;
         info_bar.hide ();
-        disable_window_action (SAVE_GAME_ACTION_NAME);
-        disable_window_action (SAVE_GAME_AS_ACTION_NAME);
         update_history_panel ();
         update_action_status ();
 
@@ -543,13 +541,11 @@ public class Application : Gtk.Application
         {
             game_needs_saving = true;
             enable_window_action (SAVE_GAME_ACTION_NAME);
-            enable_window_action (SAVE_GAME_AS_ACTION_NAME);
         }
         else
         {
             game_needs_saving = false;
             disable_window_action (SAVE_GAME_ACTION_NAME);
-            disable_window_action (SAVE_GAME_AS_ACTION_NAME);
         }
 
         game.start ();
@@ -1925,6 +1921,7 @@ public class Application : Gtk.Application
         try
         {
             pgn_game.write (game_file);
+            disable_window_action (SAVE_GAME_ACTION_NAME);
         }
         catch (Error e)
         {
@@ -2010,6 +2007,8 @@ public class Application : Gtk.Application
         in_history = false;
         game_file = null;
 
+        disable_window_action (SAVE_GAME_AS_ACTION_NAME);
+
         pgn_game = new PGNGame ();
         var now = new DateTime.now_local ();
         pgn_game.date = now.format ("%Y.%m.%d");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]