GNOME Bugzilla – Bug 392284
Make game history browsable
Last modified: 2010-07-19 12:34:28 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.
Add a GtkRecent menu that uses this history.
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).
Updated title to "Make game history browsable" as the games are now saved but this is not visible in the UI.
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).
I would like to take on this bug (feature).
Great! Good luck.
What is the best way to communicate with you regarding questions?
Created attachment 127178 [details] Proposed UI as designed by Adrian
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 :)
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.
>> 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.
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).
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.
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.
Nice, it looks really tidy.
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.
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
Andrian, Ping.
Well. Sadly closing due to inactivity which is a pity because we have a patch lying around. Please reopen if there are any news.
Marking as INCOMPLETE although we have patches lying around.