XBoard interactive help

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard interactive help

Post by hgm »

I pushed a fix to hgm.nubati now. That code is a bit dirty, as it also contains changes I made in dialogs.c for an auto-hiding menu bar, but without the accompanying changes in xoptions.c (which I did not commit) these changes should be no-ops.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: XBoard interactive help

Post by JoshPettus »

I'll give it a try, thanks!
I guess the menubar wouldn't effect osx anyway, since the macintegration library and OSX handle the osx menubar (I hope :))
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: XBoard interactive help

Post by JoshPettus »

Good news and bad news

Good news is that manDir now works and gives the appropriate directory
Bad news is that now dataDir now doesn't update dynamically and only has the compiled value of DATADIR.
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard interactive help

Post by hgm »

I don't see how that is possible. The word DATADIR doesn't apear anywhere in the source anymore, except for initializing the array dataDir[]. (And for responding to the --show-config argument; I probably should change it there too.) And the OSXAPP startup code at the top of main() in gtk/xboard.c overwrites the content of dataDir before it gets ever used. Are you sure there cannot be any mixup?
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: XBoard interactive help

Post by JoshPettus »

Ah, I just did a quick test, the apple script launch command for man and info uses the varable dataDir (as of now). And it works perfectly fine, so you are correct. The issue is that ~~/ no longer expands to dataDir or isn't getting a new value past the compiled value of DATADIR.
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard interactive help

Post by hgm »

OK, my bad. I seem to have overlooked occurences of DATADIR in args.h. These were responsible for the ~~ expansion. I have pushed the fully corrected version to hgm.nubati now.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: XBoard interactive help

Post by JoshPettus »

Works great now. Thanks!

The new message however isn't very effective. It pops up for half a second and is basically unreadable. Plus I can't say it looks great. Even if it worked would be annoying to see every time you opened xboard. I get the intent but I'm not sure the idea could be implemented in a not annoying way.

[EDIT]
Now it's displaying until I clicked on the board, must have been how I was clicking on the board, but still..
[/EDIT]

Image

I don't know. It's a tough question to answer. fortunately it's easy enough to trigger the help clicks that people might just discover it on their own if they didn't read it on the download page. What does other software do to announce a new feature?
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard interactive help

Post by hgm »

Well, this is an idea I discussed with Arun. It draws the message with each board during the first second of running. But seeing it in action I agree that it is a bit intrusive.

I could do the following, though:

Have a volatile option -startMessage, which we configure in the master settings file to whatever we want to broadcast. And a persistent option -oldMessage, by default an empty string. And then display the startup message only when the two are different. And copy the value of -startMessage to that of -oldMessage when a help-click is processed.

Then the message display would automatically be revived if a new install altered the message, despite the fact that the install did not alter user settings.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: XBoard interactive help

Post by JoshPettus »

I think that would be fine. :)
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard interactive help

Post by hgm »

It seems that in most distros the man files are gzipped, however. :(

So it would need a whole lot more complexity to extract texts from them. The good news is that "man -w xboard" would print the path to the manual. And that this facility is actually smart enough to reply to "man -w maxqi" with "/usr/share/man/man6/fairymax.6.gz".