After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 564202 - use g_timeout_seconds where possible
use g_timeout_seconds where possible
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: general
2.25.x
Other Linux
: Normal enhancement
: ---
Assigned To: Thomas Andersen
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2008-12-12 01:44 UTC by Thomas Andersen
Modified: 2009-04-08 01:03 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
use g_timeout_add_seconds where possible (4.74 KB, patch)
2008-12-12 01:46 UTC, Thomas Andersen
needs-work Details | Review
Updated patch (2.80 KB, patch)
2008-12-15 20:07 UTC, Thomas Andersen
committed Details | Review
Use g_timeout_add_seconds when not in quick moves mode (2.30 KB, patch)
2009-04-08 01:00 UTC, Thomas Andersen
committed Details | Review

Description Thomas Andersen 2008-12-12 01:44:31 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.
Comment 1 Thomas Andersen 2008-12-12 01:46:42 UTC
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.
Comment 2 Christian Persch 2008-12-12 11:51:39 UTC
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...
Comment 3 Thomas Andersen 2008-12-12 12:31:16 UTC
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.
Comment 4 Thomas Andersen 2008-12-15 20:07:19 UTC
Created attachment 124752 [details] [review]
Updated patch

Updated patch with check for glib version in aisleriot and removed the changes to iagno
Comment 5 Thomas Andersen 2008-12-15 21:11:09 UTC
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.
Comment 6 Thomas Andersen 2009-04-08 01:00:55 UTC
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