[gnome-games] aisleriot: Adapt to GamesClock API changes



commit c8f98b27cb875d48e0843448759c9111b89bc6e2
Author: Christian Persch <chpe gnome org>
Date:   Sun Jul 12 21:19:24 2009 +0200

    aisleriot: Adapt to GamesClock API changes
    
    Inhibit clock updates while the statusbar is hidden. Use
    games_clock_reset().

 aisleriot/window.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/aisleriot/window.c b/aisleriot/window.c
index d78d855..cf351e7 100644
--- a/aisleriot/window.c
+++ b/aisleriot/window.c
@@ -1039,6 +1039,9 @@ statusbar_toggled_cb (GtkToggleAction *action,
 
   g_object_set (priv->statusbar, "visible", state, NULL);
 
+  /* Only update the clock continually if it's visible */
+  games_clock_set_update (GAMES_CLOCK (priv->clock), state);
+
   priv->statusbar_visible = state != FALSE;
 
   games_conf_set_boolean (NULL, aisleriot_conf_get_key (CONF_SHOW_STATUSBAR), state);
@@ -1860,7 +1863,7 @@ game_type_changed_cb (AisleriotGame *game,
 #ifdef HAVE_HILDON
   gtk_label_set_text (priv->game_message_label, NULL);
 #else
-  games_clock_set_seconds (GAMES_CLOCK (priv->clock), 0);
+  games_clock_reset (GAMES_CLOCK (priv->clock));
 
   gtk_statusbar_pop (priv->statusbar, priv->game_message_id);
 
@@ -1882,7 +1885,7 @@ game_new_cb (AisleriotGame *game,
 #ifdef HAVE_HILDON
   gtk_label_set_text (priv->game_message_label, NULL);
 #else
-  games_clock_set_seconds (GAMES_CLOCK (priv->clock), 0);
+  games_clock_reset (GAMES_CLOCK (priv->clock));
 
   gtk_statusbar_pop (priv->statusbar, priv->game_message_id);
 #endif



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