GNOME Bugzilla – Bug 564202
use g_timeout_seconds where possible
Last modified: 2009-04-08 01:03:22 UTC
inspired by http://gould.cx/ted/blog/Saving_the_world_one__w_at_a_time I greped through gnome-games and the relevant calls from g_timeout_add to use g_timeout_add_seconds instead. The games involved are: aisleriot, gnibbles, mahjongg, and iagno.
Created attachment 124477 [details] [review] use g_timeout_add_seconds where possible The patch changes the behavior of gnibbles a bit by shortening the start delay from 1500 ms to 1 second. I played a bit and did not notice the shorter delay.
In aisleriot/window.c, please #ifdef GLIB_CHECK_VERSION(...) this, since I want to keep this compiling on maemo 3. In iagno, this doesn't look right. computer_speed is calculated as COMPUTER_MOVE_DELAY / 2 in the quick-moves case, which will be 0 now...
You're absolutely right Christian. How did I miss the iagno thing? It would have used COMPUTER_MOVE_DELAY directly otherwise :( I will update the patch during the holidays.
Created attachment 124752 [details] [review] Updated patch Updated patch with check for glib version in aisleriot and removed the changes to iagno
I have committed the updated patch to trunk to be included in 2.25.3. Iagno still needs to be converted so I am leaving this bug open.
Created attachment 132308 [details] [review] Use g_timeout_add_seconds when not in quick moves mode Committed to trunk: http://svn.gnome.org/viewvc/gnome-games?view=revision&revision=9008