[gnome-games] Fix pause/resume with the pause key
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
 
- To: svn-commits-list gnome org
 
- Subject: [gnome-games] Fix pause/resume with the pause key
 
- Date: Mon,  4 May 2009 16:04:59 -0400 (EDT)
 
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]