gnome-games r8368 - in trunk: aisleriot gnibbles mahjongg
- From: thomashpa svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8368 - in trunk: aisleriot gnibbles mahjongg
- Date: Mon, 15 Dec 2008 20:34:40 +0000 (UTC)
Author: thomashpa
Date: Mon Dec 15 20:34:40 2008
New Revision: 8368
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8368&view=rev
Log:
use g_timeout_add_seconds where possible
Modified:
trunk/aisleriot/window.c
trunk/gnibbles/main.c
trunk/mahjongg/mahjongg.c
Modified: trunk/aisleriot/window.c
==============================================================================
--- trunk/aisleriot/window.c (original)
+++ trunk/aisleriot/window.c Mon Dec 15 20:34:40 2008
@@ -716,7 +716,12 @@
delayed_move_to_next_screen_cb (GtkAction *action,
GtkWidget *widget)
{
+#if GLIB_CHECK_VERSION (2, 14, 0)
+ g_timeout_add_seconds (10, (GSourceFunc) delayed_move_to_next_screen_timeout_cb, widget);
+#else
g_timeout_add (10 * 1000, (GSourceFunc) delayed_move_to_next_screen_timeout_cb, widget);
+#endif /* GLIB 2.14.0 */
+
}
static void
Modified: trunk/gnibbles/main.c
==============================================================================
--- trunk/gnibbles/main.c (original)
+++ trunk/gnibbles/main.c Mon Dec 15 20:34:40 2008
@@ -474,7 +474,7 @@
if (dummy_id)
g_source_remove (dummy_id);
- dummy_id = g_timeout_add (1500, (GSourceFunc) new_game_2_cb, NULL);
+ dummy_id = g_timeout_add_seconds (1, (GSourceFunc) new_game_2_cb, NULL);
network_gui_update ();
@@ -614,7 +614,7 @@
gnibbles_add_bonus (1);
- dummy_id = g_timeout_add (1500, (GSourceFunc) new_game_2_cb, NULL);
+ dummy_id = g_timeout_add_seconds (1, (GSourceFunc) new_game_2_cb, NULL);
restart_id = 0;
@@ -675,7 +675,7 @@
g_source_remove (add_bonus_id);
}
add_bonus_id = 0;
- erase_id = g_timeout_add (3000,
+ erase_id = g_timeout_add_seconds (3,
(GSourceFunc) erase_worms_cb,
(gpointer) ERASESIZE);
gnibbles_log_score (window);
@@ -696,7 +696,7 @@
g_source_remove (add_bonus_id);
}
add_bonus_id = 0;
- erase_id = g_timeout_add (3000,
+ erase_id = g_timeout_add_seconds (3,
(GSourceFunc) erase_worms_cb,
(gpointer) ERASESIZE);
gnibbles_log_score (window);
@@ -727,7 +727,7 @@
erase_id = g_timeout_add (ERASETIME / ERASESIZE,
(GSourceFunc) erase_worms_cb,
(gpointer) ERASESIZE);
- restart_id = g_timeout_add (1000, (GSourceFunc) restart_game, NULL);
+ restart_id = g_timeout_add_seconds (1, (GSourceFunc) restart_game, NULL);
return (FALSE);
}
@@ -756,7 +756,7 @@
tmp = rand () % MAXLEVEL + 1;
current_level = tmp;
}
- restart_id = g_timeout_add (1000, (GSourceFunc) restart_game, NULL);
+ restart_id = g_timeout_add_seconds (1, (GSourceFunc) restart_game, NULL);
return (FALSE);
}
Modified: trunk/mahjongg/mahjongg.c
==============================================================================
--- trunk/mahjongg/mahjongg.c (original)
+++ trunk/mahjongg/mahjongg.c Mon Dec 15 20:34:40 2008
@@ -422,7 +422,7 @@
gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "flash");
flashid =
gtk_statusbar_push (GTK_STATUSBAR (statusbar), context_id, message);
- g_timeout_add (5000, (GSourceFunc) message_flash_remove,
+ g_timeout_add_seconds (5, (GSourceFunc) message_flash_remove,
GUINT_TO_POINTER (flashid));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]