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 437309 - support comments
support comments
Status: RESOLVED OBSOLETE
Product: gnome-chess
Classification: Applications
Component: General
git master
Other All
: Normal enhancement
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-09 23:24 UTC by miguel huerta
Modified: 2013-11-07 17:33 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
implement pgn comment (136.97 KB, patch)
2007-05-09 23:25 UTC, miguel huerta
none Details | Review
pgn game with comments (316 bytes, application/x-chess-pgn)
2007-05-09 23:26 UTC, miguel huerta
  Details
chess_view.glade and glchess.glade (60.00 KB, application/x-tar)
2007-05-12 02:54 UTC, miguel huerta
  Details
pgnview widget (14.46 KB, image/png)
2007-05-18 16:32 UTC, miguel huerta
  Details
sync whit gnome-games (151.75 KB, patch)
2007-05-22 01:23 UTC, miguel huerta
none Details | Review
chess_view.glade (16.56 KB, application/x-glade)
2007-05-24 18:19 UTC, miguel huerta
  Details
another aproach (13.61 KB, patch)
2007-06-02 02:41 UTC, miguel huerta
rejected Details | Review
Changes to synchronise panel usage (14.94 KB, patch)
2007-06-03 05:58 UTC, Robert Ancell
committed Details | Review

Description miguel huerta 2007-05-09 23:24:09 UTC
First, I'm mexican, so my english could be approximate...    
I attempt to implement pgn comments.
Comment 1 miguel huerta 2007-05-09 23:25:36 UTC
Created attachment 87919 [details] [review]
implement pgn comment
Comment 2 miguel huerta 2007-05-09 23:26:42 UTC
Created attachment 87920 [details]
pgn game with comments

a simple game with a comment
Comment 3 Robert Ancell 2007-05-11 00:17:46 UTC
Thanks Miguel, I'll look at this this weekend
Comment 4 Robert Ancell 2007-05-12 02:15:43 UTC
Hi Miguel,

Can you send me your versions of glade/chess_view.glade and glade/glchess.glade as they haven't diffed properly.

Thanks
Comment 5 miguel huerta 2007-05-12 02:54:48 UTC
Created attachment 88053 [details]
chess_view.glade and glchess.glade
Comment 6 miguel huerta 2007-05-12 03:04:43 UTC
This is a very simple pathc, I want to improve comments like ??(error) or !(good move) maybe change the icon dialog. And show the icon for the piece, like a bishop, when the comment conten some like Bb5.
I expect to get time in the next days to do this.
Comment 7 Robert Ancell 2007-05-18 15:19:21 UTC
Hi Miguel,

Just an update about your patch:

- I've committed the GUI changes to subversion but disabled them for now. This should make an updated patch easier
- I'm going to update pgn.py to have a PGNMove object - this way the comments will be attached to the move and not require your comment dictionary.
- Did you make this patch against the sourceforge.net version of glChess? If so can you please check out the latest version from svn://svn.gnome.org/svn/gnome-games/trunk/glchess and make the patch from this.

Thanks,
--Robert
Comment 8 miguel huerta 2007-05-18 16:32:11 UTC
Created attachment 88404 [details]
pgnview widget
Comment 9 miguel huerta 2007-05-18 16:36:06 UTC
hi,
oh, yes, I use the sourcefoge version, sorry I don't see that.

well, in this moment work around the PGNMove, and have some like this:
class PGNMove:
    comment = None
    NAG = None #Numeric Annotation Glyphs
    number = None
    move = None

And rework another widget, attach a screenshot.
Let sync with gnome subversion and send another patch, maybe in the weekend  

By the way, what is the form that I can run glchess (from the svn) if i don't have all gnome-games?

And again, sorry for my poor English.
Comment 10 Robert Ancell 2007-05-20 05:22:12 UTC
I wrote a blog post on how to install and run gnome games:
http://bobthegnome.blogspot.com/2007/04/beginners-guide-to-gnome-python-games.html

It is more complex than the sourceforge.net version however, let me know if you have any problems.
Comment 11 miguel huerta 2007-05-22 01:23:22 UTC
Created attachment 88574 [details] [review]
sync whit gnome-games

hi,

Now acept a multiline comment (need change gtkentry) and $1 to $6 NAG, changed clicking in the icon image.
Maybe need some love to icon image, I use the gtk stock and not represent at all the intention of NAG.
Comment 12 Robert Ancell 2007-05-24 11:21:12 UTC
Hi Miguel,

I've committed the PGN part of the patch with a few minor changes.

Again please attach the Glade files as they aren't making good diffs - The GUI editor you are using is changing the whitespace/layout.

I don't like the idea of the separate widget you're suggesting. glChess is a simple chess UI, I much prefer the original idea. Other chess programs (e.g. Pychess pychess.sourceforge.net) are aiming to provide more advanced analysis/editing tools.

I've committed some changes to make multi-line comment editing possible in the display area (see svn for details).

There are some details that must work before this change can be fully used:
- Comments must be enabled/disabled from the menu (disabled by default so first time users have the simplest interface)
- The comments must work with the end game information, i.e. when the game ends the usual game result (e.g. "Checkmate") must be displayed.
- If a player moves while a comment is being edited the board must not move and but the player informed their opponent has moved.

Keep up the good work!
Comment 13 miguel huerta 2007-05-24 18:17:54 UTC
hi Robert,

I use glade-3, what editor use you?

Yes that widget see ugly and complex, I use them like the AI window, to test my pgn advance work.

I agree with put by default disable the comments, I think that is better put out of gcong and only use the value that have the check menu.

The game result sould append (but not save) to the last comment if exist, you have a better idea?

Why do you use the tab?, is not enough with a TextView (instead the label) in editable on/off?, I never have used that  widget, but i think is more complex  than a simple label, but may be, in the future it could represent the king color that win or another information in a grafical form.

The last point is more complex, you have a variable __inCallback, Do you use for pause the game? or Do you use for stop it waiting for some event?

By the way I use this info about pgn standar:
http://www.very-best.de/pgn-spec.htm
Comment 14 miguel huerta 2007-05-24 18:19:31 UTC
Created attachment 88749 [details]
chess_view.glade
Comment 15 Robert Ancell 2007-05-28 10:26:40 UTC
The existing files have been done with Glade-2. I tried using Glade-3 a while ago but it caused some corruption with the files (it may work better now). If possible use Glade-2 for now.

If only a text view was used when comments were being edited there would be the white background and black border around the TextView. Switching between a label and a TextView means there is the minimum of visual clutter. (See how Nautilus renames files)

__inCallback is to stop event loops, for example an AI player moving while in the move notification callback (which could cause the other AI player to move... stack overflow)

Comment 16 Robert Ancell 2007-05-28 10:37:11 UTC
About the end-game information:

panel_description_label, panel_title_label and the information panel visibility are modified by both the comment system and the end-game event. These two systems need to be synchronised so they don't fight for the labels.

e.g.
comments are disabled. The game ends and the information panel appears showing "White Wins". Comments are enabled. The information panel is replaced with comment info. The end game information will never be redisplayed.

So we need to modify __changeInfoPanel to have knowledge of the end game information too.

p.s. I hope that my English is not too slang. I'm trying to be as readable as possible :)
Comment 17 miguel huerta 2007-06-02 02:41:31 UTC
Created attachment 89216 [details] [review]
another aproach

hi Robert,

Thanks a lot for that (for be readable and the effort to read me). I think that this patch complete all the requeriments, but I don't know if I use the appropriate methods.

I probe this patch only with 2D rendering, I put a method to do the board darker when starter a comment, I don't know if occur the same in 3D

P.D. I use glade-2, tell me if you found a problem
Comment 18 Robert Ancell 2007-06-03 05:56:37 UTC
The .glade files diff well now, thanks.

The patch still didn't work with the end-game information. I've made the changes on svn head so it will be easier for you. See GtkView.updateInfoPanel() in chessview.py.

Also editing the comments shouldn't pause the game - it should just stop the view from changing. See what stops this in GtkView.addMove().

I'll attach the diff so you can see the changes I made. You will need to add in the NAG information etc.
Comment 19 Robert Ancell 2007-06-03 05:58:07 UTC
Created attachment 89268 [details] [review]
Changes to synchronise panel usage

Changes to synchronise panel usage
Comment 20 Michael Catanzaro 2013-11-07 17:33:41 UTC
We can track comments/annotations in Bug #523368.