[gnome-games] Fix pause/resume with the pause key



commit a920b9159e27776c492b147bb8d31879caae3bc3
Author: Ying-Chun Liu <grandpaul gmail com>
Date:   Mon May 4 22:00:41 2009 +0200

    Fix pause/resume with the pause key
    
    Sets the widget as sensitive as well as visible.
    
    Patch by Ying-Chun Liu. Fixes GNOME Bug #580840
---
 gnomine/gnomine.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/gnomine/gnomine.c b/gnomine/gnomine.c
index 79c1061..8fe457e 100644
--- a/gnomine/gnomine.c
+++ b/gnomine/gnomine.c
@@ -348,7 +348,11 @@ pause_callback (GtkWidget * widget, GdkEventFocus * event, gpointer data)
     games_clock_stop (GAMES_CLOCK (clk));
 
     gtk_action_set_visible (pause_action, FALSE);
+    gtk_action_set_sensitive (pause_action, FALSE);
+
     gtk_action_set_visible (resume_action, TRUE);
+    gtk_action_set_sensitive (resume_action, TRUE);
+
     game_paused = TRUE;
   }
 }
@@ -362,7 +366,10 @@ resume_game_cb (GtkButton * widget, gpointer data)
   games_clock_start (GAMES_CLOCK (clk));
 
   gtk_action_set_visible (pause_action, TRUE);
+  gtk_action_set_sensitive(pause_action, TRUE);
   gtk_action_set_visible (resume_action, FALSE);
+  gtk_action_set_sensitive(resume_action, FALSE);
+
   game_paused = FALSE;
 }
 



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