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 392284 - Make game history browsable
Make game history browsable
Status: RESOLVED INCOMPLETE
Product: gnome-games-superseded
Classification: Deprecated
Component: glchess
2.17.x
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-03 12:37 UTC by Robert Ancell
Modified: 2010-07-19 12:34 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Proposed UI as designed by Adrian (100.17 KB, image/png)
2009-01-25 02:09 UTC, Robert Ancell
  Details
Latest History Dialog Screenshot (29.54 KB, image/png)
2009-02-10 04:37 UTC, Adrian Strilchuk
  Details
History Dialog - Game History Tab (111.90 KB, image/png)
2009-02-18 03:57 UTC, Adrian Strilchuk
  Details
History Dialog - Player Statistics Tab (110.04 KB, image/png)
2009-02-18 03:59 UTC, Adrian Strilchuk
  Details
History Dialog Patch for glChess (69.17 KB, patch)
2009-02-25 01:52 UTC, Adrian Strilchuk
needs-work Details | Review

Description Robert Ancell 2007-01-03 12:37:58 UTC
Add a game history that stores games that have finished. Once a game is finished the user does not need to be asked if it is saved, it is automatically saved in ~/.gnome2/glchess/. Add a calendar widget that allows quick searching.
Comment 1 Robert Ancell 2007-06-03 06:06:43 UTC
Add a GtkRecent menu that uses this history.
Comment 2 Robert Ancell 2007-11-27 12:13:16 UTC
As raised in bug #476982, perhaps the save concept should be removed and replaced with export (with history no need to save, only export if want to give game to someone else).
Comment 3 Robert Ancell 2008-10-09 04:36:56 UTC
Updated title to "Make game history browsable" as the games are now saved but this is not visible in the UI.
Comment 4 Robert Ancell 2008-10-09 07:56:33 UTC
Making a Gnome love item. If you want to take this bug please write a new
comment and start working! If you need any help please ask.

To solve:
- Make a view->history menu by editing glade/glchess.glade with Glade 2
- Make a dialog for the history. I'd recommend just making a simple dialog that shows the number of games played/won/lost/drawn/unfinished.
- Make a new module src/lib/gtkui/history.py that controls this dialog.
- Modify src/lib/history.py to parse the appropriate information from the history
- Test and post the patch here

Future work:
- Consider elaborating the dialog to have more information such as
  - Having a calendar showing when the games are played
  - Having a preview showing the final state of the game
  - Allow a previous game to be loaded into the main scene and analysed/replayed (see also bug #388253).
Comment 5 Adrian Strilchuk 2008-12-08 23:56:59 UTC
I would like to take on this bug (feature).
Comment 6 Robert Ancell 2008-12-09 17:54:58 UTC
Great! Good luck.
Comment 7 Adrian Strilchuk 2008-12-10 00:12:01 UTC
What is the best way to communicate with you regarding questions?
Comment 8 Robert Ancell 2009-01-25 02:09:00 UTC
Created attachment 127178 [details]
Proposed UI as designed by Adrian
Comment 9 Thomas D Ahle 2009-01-25 10:06:45 UTC
Instead of some text, what about including an image of the board where it was left?
If performance permits it, small buttons for browsing the game in the history would be awesome :)
Comment 10 Adrian Strilchuk 2009-02-10 04:37:58 UTC
Created attachment 128350 [details]
Latest History Dialog Screenshot

This is the latest version of the History dialog for glChess.  It is 98% functional in it's current form.  You can use the calendar to browse game history by month.  The days which have a game played are bolded in the calendar.  The saved game directory structure is crawled to retrieve the games for the selected month and then displayed in the container to the right.  The event, result and date are shown in an expander label with the game details shown in the expander container as a table.

Some finishing touches I'd like to make are as follows:

1. If a calendar day is chosen, highlight the games played on that date by bolding the frame border.

2. Possibly add some statistics in the empty label below the calendar (probably will leave for a future version).

3. Display a game move table in the expander (also for a future version).

Comments on the dialog are more than welcome.
Comment 11 Thomas D Ahle 2009-02-10 08:58:48 UTC
>> 1. If a calendar day is chosen, highlight the games played on that date by
>> bolding the frame border.
If you have many games (and the right pane scrolls) bolding will probably not be enough. I think filtering is the way to go.
Have you thought about using a treeview? It makes it more easy to filter, I think it would look very good, and it would let you select e.g. 2-3 games and open them all, if you are unsure of what you need to see.
Comment 12 Robert Ancell 2009-02-12 07:44:46 UTC
I think the filtering power of a treeview is a good idea.  The use case that this achieves is "Show me all the games I played against AIs today" or "show me all the games I won today".  I'm not sure the current dialog can easily be modified for that functionality.

Some other points:
- Keep an eye on the number of borders, in particular note the 3 vertical lines between the expanded game and the calendar.  This can be visually distracting.
- Make it clear what the right pane contains.  Perhaps a title like "Games played on 25 January 2009"?
- Consider how this can be navigated using the keyboard.

Final point.  Don't worry too much about making it perfect - it can be always be reworked at a later date (and since this will be part of GNOME 2.27 there will be plenty of time for trying out ideas).

Comment 13 Adrian Strilchuk 2009-02-18 03:57:18 UTC
Created attachment 128946 [details]
History Dialog - Game History Tab

I have revamped the history dialog.  The dialog now has two tabs - 'Game History' and 'Player Statistics'.  I have incorporated the treeview widget into both tabs.  It should enable better navigation.  I hope to create a patch tomorrow.
Comment 14 Adrian Strilchuk 2009-02-18 03:59:08 UTC
Created attachment 128947 [details]
History Dialog - Player Statistics Tab

This attachment illustrates the Player Statistics tab changes.  Please see the 'Game History Tab' attachment for more details.
Comment 15 Robert Ancell 2009-02-18 04:19:30 UTC
Nice, it looks really tidy.
Comment 16 Adrian Strilchuk 2009-02-25 01:52:42 UTC
Created attachment 129452 [details] [review]
History Dialog Patch for glChess

This patch implements the history dialog functionality for glChess.  The history dialog has two tabs - a game history tab and a player statistics tab.  This is my very first patch so please be gentle.

There is one known bug in this patch - The close button on the history dialog does not uncheck the menu item in the main game window.  I will fix this issue along with any feedback in the next patch.
Comment 17 Robert Ancell 2009-05-04 02:44:04 UTC
Hi Adrian,

Sorry for this but could you rebuild this patch to work with the GtkBuilder changes?  It shouldn't be too hard to copy and paste with a new version of Glade - let me know if this is a problem for you.  I was going to apply this for 2.27.1 but it will now be in 2.27.2.  

Additionally can you make sure that getAllGames() handles IO exceptions?  It just has to not crash if a user has a weird/broken filesystem.

Thanks again
Comment 18 Tobias Mueller 2010-03-23 20:45:14 UTC
Andrian, Ping.
Comment 19 Tobias Mueller 2010-05-22 08:25:30 UTC
Well. Sadly closing due to inactivity which is a pity because we have a patch lying around. Please reopen if there are any news.
Comment 20 Tobias Mueller 2010-07-19 12:34:28 UTC
Marking as INCOMPLETE although we have patches lying around.