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 695092 - Chess history doesn't work
Chess history doesn't work
Status: RESOLVED FIXED
Product: gnome-chess
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-chess-maint
gnome-chess-maint
: 691637 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-03-03 23:13 UTC by Michael Catanzaro
Modified: 2013-05-01 20:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed history patch (2.43 KB, patch)
2013-03-03 23:15 UTC, Michael Catanzaro
committed Details | Review
Chess history doesn't work very well (2.43 KB, patch)
2013-04-15 04:31 UTC, Jason Clinton
committed Details | Review

Description Michael Catanzaro 2013-03-03 23:13:04 UTC
The game that is "autoloaded" at the start of the game is not the last game you played, but the first game that was ever autosaved. Games that are autosaved in the future will never be autoloaded, only the originally-autosaved game will be.  Basically the autosave feature only works "once", after which GNOME Chess will never open to a blank board; if the game ends, the history won't be properly updated and so the same file will be autoloaded again from the same point in the future. No way around this without deleting the cached PGN.

Furthermore the titlebar incorrectly displays the path to the autosaved PGN as if the PGN had been opened manually; when a file is autoloaded the titlebar should just say "Chess".  This is all broken since v3.6.1; it was fine in the v3.4 branch.

I'll attach a proposed patch for these issues.  I also found a bug where the game was not autosaved if it was manually loaded from a PGN (probably put in place to not override the original PGN, but it should still be autosaved!); that's included in this patch since it affects the same lines of code.
Comment 1 Michael Catanzaro 2013-03-03 23:15:46 UTC
Created attachment 237916 [details] [review]
proposed history patch
Comment 2 Jason Clinton 2013-04-15 04:28:37 UTC
Comment on attachment 237916 [details] [review]
proposed history patch

LGTM
Comment 3 Jason Clinton 2013-04-15 04:31:53 UTC
The following fix has been pushed:
55f896d Chess history doesn't work very well
Comment 4 Jason Clinton 2013-04-15 04:31:58 UTC
Created attachment 241543 [details] [review]
Chess history doesn't work very well

* Autoload the most recent autosaved game instead of the least recent
* Update history upon completing a game, so it's not autoloaded forever
* Autosave even if game was manually loaded from a PGN
Comment 5 Michael Catanzaro 2013-05-01 20:33:37 UTC
*** Bug 691637 has been marked as a duplicate of this bug. ***