xboard.git
12 years agoAdd -useBoardTexture and -usePieceFont options
H.G. Muller [Thu, 18 Aug 2011 08:29:35 +0000]
Add -useBoardTexture and -usePieceFont options

These options suppress the use of the given texture files or piece fonts
without relying on the kludge to disable them by prefixing an asterisk
to the file or font name. Checkboxes have been added to the Board dialog
to control them. The user can now set piece font in WB font dialog.
The sample text can be used to specify the -fontPieceToCharTable,
the font name itself the -renderPiecesWithFont value.

12 years agoFix crash on start without settings file
H.G. Muller [Tue, 16 Aug 2011 21:10:59 +0000]
Fix crash on start without settings file

A primordial -1 in currCurrent caused a crash when WinBoard was started
without ini filein game-viewer mode.

12 years agoFix generic-popup failure after empty engine-settings dialog
H.G. Muller [Fri, 12 Aug 2011 10:08:18 +0000]
Fix generic-popup failure after empty engine-settings dialog

The error exit ofthe Engine #N Settings dialog in case of an engine without
options forgot to clear currentCps, with as a result that the generic popup
thought every subsequent popup was an empty one, and kept repeating the
'engine has no options' error message for every dialog.

12 years agoAllow substitution of engines during tournament
H.G. Muller [Wed, 10 Aug 2011 09:27:22 +0000]
Allow substitution of engines during tournament

Two buttons are added in the tournament options dialog, for upgrading
and for replacing a tourney participant. Lots of tests on the validity
of the request are done, and if all are passed, the tourney file is
written with the new participants (and in case of replace) with the
results of the replaced engines erased from the -results string.

12 years agoFix up/down arrows in game list
H.G. Muller [Mon, 8 Aug 2011 09:00:12 +0000]
Fix up/down arrows in game list

12 years agoAdd key bindings for loading next/previous game of list
H.G. Muller [Mon, 8 Aug 2011 08:31:24 +0000]
Add key bindings for loading next/previous game of list

These bindings are set both for the game list and the board window.
To make them useful, focus has to be transferred to the board widget
after loading (it tends to transfer to the tags window), which now
seems to work, but not always. From the game list the shellWidget
seems to get focus rather than the board, which is bad as it is not
sensitive to the key bindings.

12 years agoAllow deletion of last book move
H.G. Muller [Mon, 8 Aug 2011 07:58:31 +0000]
Allow deletion of last book move

The book-edit function refused to delete the entiremove list,
for no good reason. This limitation now has been lifted.
Also the error message that the key for the current book entries
is different from that of the currentposition has been suppressed
if there were no entries found for the current position (so that the
book is positioned at the next key), so that it is possible to add
moves from scratch.

12 years agoSpeed up parser
H.G. Muller [Sun, 7 Aug 2011 22:19:53 +0000]
Speed up parser

Line numbers > 1, which are common, can exit already during move parsing,
to save lots of matching on resultsand castlings.

12 years agoFix missing files in file browser
H.G. Muller [Sun, 7 Aug 2011 13:13:00 +0000]
Fix missing files in file browser

The file browser was throwing away the first two files, assuming
they were "." and "..". Alas, this is no longer true on every Linux.
Now we actuallyc compare for these names, before skipping them.

12 years agoDelay file loading to allow expose event first
H.G. Muller [Sat, 6 Aug 2011 09:57:59 +0000]
Delay file loading to allow expose event first

12 years agoFix paging
H.G. Muller [Sat, 6 Aug 2011 07:29:22 +0000]
Fix paging

12 years agoBetter fix of crash on empty game list
H.G. Muller [Fri, 5 Aug 2011 20:39:41 +0000]
Better fix of crash on empty game list

An empty list is now replaced by a list containig a simple message.

12 years agoAdd plain arrows as key binding for stepping forward/backward
H.G. Muller [Fri, 5 Aug 2011 18:31:44 +0000]
Add plain arrows as key binding for stepping forward/backward

12 years agoDebug position selection
H.G. Muller [Fri, 5 Aug 2011 18:30:03 +0000]
Debug position selection

12 years agoPrint progress during load / selection of game
H.G. Muller [Thu, 4 Aug 2011 11:22:55 +0000]
Print progress during load / selection of game

The title bar of themain window is used to display a running count
of the number of games loaded / searched.

12 years agoParse PGN tags without allocating memory
H.G. Muller [Thu, 4 Aug 2011 10:44:45 +0000]
Parse PGN tags without allocating memory

In WinBoard malloc/free did not seem to work when preparing the game list,
leading to a huge memory list when ParsePGNTag was used. The added code
parses the required tags in an alternative way as a work-around.

12 years agoImplement searching games in Game List for a position
H.G. Muller [Tue, 2 Aug 2011 20:58:34 +0000]
Implement searching games in Game List for a position

For this it was needed to reconstruct all positions of the games
without loading them, so they could be compared to the currently
displayed position. A new routine GameContainsPosition is made for that.
 In Disambiguate, when the global quickFlag is set, we now do the
disambiguation ignoring check,and only if this leads to an ambiguous
move, we repeat it taking check into account to see if that resolves
the ambiguity. This causes us to miss if unambiguous moves are illegal
because they put their King in check, but who cares?
 We now do not make game-list line when not needed. If we do not filter
by text, but by position, there is no need for preparing the game-list
line for games that are not selected. All for efficiency.

12 years agoAllow entry of variations in PlayFromGameFile mode
H.G. Muller [Thu, 28 Jul 2011 18:47:35 +0000]
Allow entry of variations in PlayFromGameFile mode

Adding variations is more like editing a comment,and not really editing
the game. Therefore we allow it on loaded games. As soon as we are in a
variation, we temporarily switch to a (hidden) EditGame mode, restoring
the original mode when we revert to the main line.
  We now also stay in PlayFromGameFile mode after loading a game,
And opening variation (fromtheComment window) in PlayFromGameFile mode
is also allowed.

12 years agoForce Move History refresh after loading/reverting variation
H.G. Muller [Wed, 27 Jul 2011 16:47:45 +0000]
Force Move History refresh after loading/reverting variation

The Move History window was not refreshed after switching to or from
a variation if that variation happened to have the same length as
the main line. Now a change in storedGames since the previous refresh will
force a full refresh to avoid this. For this to work, storedGames
did have to be decremented after ToNrEvent in PopInner, because ToNrEvent
calls HistorySet before the history is restored, so we don't want
it to snatch away the full refresh. A call to HistorySet had to be
added after PopInner is done restoring the move history.

12 years agoPopdown Comment window on new game
H.G. Muller [Wed, 27 Jul 2011 15:45:12 +0000]
Popdown Comment window on new game

What is in this window cannot possibly remain valid, and can even be harmful.

12 years agoAllow null move in analysis and edit-game mode
H.G. Muller [Wed, 19 Jan 2011 10:46:41 +0000]
Allow null move in analysis and edit-game mode

In some games it is allowed to pass your turn. The internal
representation picked for such a null move is the drop of an empty
square, (EmptySquare,DROP_RANK,0,0). Computer-algebraic form is "@@@@",
SAN form is "--", (for compatibility with ChessBase / SCID), and the
non-compliant forms "null", "pass"and "Z0" are recognized in
the parser as well. ApplyMove() has to test for this special case
(to not actually clear a1), and a way to enter the pass for the user had
to be found (clicking the opponent clock, like in EditPosition mode).
 The null move is made move irreversible to prevent repetition draws
spanning null moves being adjudicated.
  Such entry of null move is now allowed in AnalyzeMode and EditGame mode.
Because Chess engines will not accept null moves, SendMoveToProgram had
to be adapted to send not the move, but the position after it in
case of a null move. This erases the move history in the engine,
so it will not react to 'undo' for that null move, so BackwardInner
had to be adapted to test for intervening null moves, and if one is
found, approach the target from the other side after loading the
earliest position before it not crossing another null move, and
then loading the moves upto the target.
  XBoard clock clicks had to be fixed, to pay attention to the shift key.

12 years agoGive WinBoard Game List its own font
H.G. Muller [Mon, 25 Jul 2011 19:58:58 +0000]
Give WinBoard Game List its own font

The font fort he Game List used to be shared with the Engine Output and
Move History windows, but this made it impossible to use a figurine font
in the latter two (which displays piece symbols for capitals) without
messing up the Game List. An option -gameListFont has been added to specify
the font for the Game List(and save it in the settings file), while a
control for it is added in the fonts dialog.

12 years agoFix crash on OK after Save Changes in Tags and Comment popup.
H.G. Muller [Thu, 21 Jul 2011 17:02:01 +0000]
Fix crash on OK after Save Changes in Tags and Comment popup.

The global variables tagsText and commentText were used to pass
a string obtained from a widget (and thus not malloc'ed), which
caused a crash when the GenericReadout tried to use those variables
for the new value. Fixed by using GenericReadout (which does malloc)
to read out the text,in stead of GetWidgetText.

12 years agoRevert "fixed segfault in xengineoutput", fixed in the backend now (from HGM)
Arun Persaud [Sat, 16 Jul 2011 16:31:12 +0000]
Revert "fixed segfault in xengineoutput", fixed in the backend now (from HGM)

This reverts commit 33a0e73843115ff6d4eacaf963a38f2e8b20b295.

12 years agoSuppress some XBoard warnings
H.G. Muller [Sat, 16 Jul 2011 12:53:14 +0000]
Suppress some XBoard warnings

12 years agofixed segfault in xengineoutput
Arun Persaud [Fri, 15 Jul 2011 18:21:29 +0000]
fixed segfault in xengineoutput

12 years agoDisable -showTargetSquares in ICS mode
H.G. Muller [Mon, 11 Jul 2011 18:04:57 +0000]
Disable -showTargetSquares in ICS mode

Help like this is considered cheating on FICS, so it is disabled for
all 'classical' ICS variants. (For variants eyont Shogi we don't care.)

12 years agoPut grab on sweep-selecting in Edit Position
H.G. Muller [Sun, 10 Jul 2011 19:20:49 +0000]
Put grab on sweep-selecting in Edit Position

A right down-click starting a sweep-selection event did not grab the
mouse events, so that an up-click outside the window would go
unnoticed, and the pointer motion stayed coupled to selecting the
piece until the next click. By returning 2 from the RightClick back-end
routine we request the grab.

12 years agoWrite more labels on score axis of eval graph
H.G. Muller [Sat, 9 Jul 2011 11:50:58 +0000]
Write more labels on score axis of eval graph

The labels for +/-1 and +/-3 are now also written, provided there is
enough space.

12 years agoImprove Eval Graph with -evalZoom and -evalThreshold
H.G. Muller [Sat, 9 Jul 2011 11:28:08 +0000]
Improve Eval Graph  with -evalZoom and -evalThreshold

The score range between -1 and +1 can now be blown up by a factor
specified through -evalZoom. The threshold below which histogram bars
are no longer printed (wich used to e hard-coded 25 centi-Pawn) can now
be set through the -evalThreshold option.

12 years agoPrint reversible plies done in stead of plies to go
H.G. Muller [Sat, 9 Jul 2011 11:18:07 +0000]
Print reversible plies done in stead of plies to go

Printing the number of plies left to the draw-adjudication point was
confusing when the N-move rule was set to a non-standard value.
In stead we now print the number of plies since the last irreversible
move, so the user can compare it to both the engine claim point (100)
and the adjudication point he set (which might be beyond 100).

12 years agoLet WB eval graph react ot single left-click
H.G. Muller [Sat, 9 Jul 2011 11:13:49 +0000]
Let WB eval graph react ot single left-click

Unlike in XBoard, the WinBoard eval graph awatys had required double-
clicking to go the the corresponding move, while there really is no
reason for this, as it is no text edit, and single-clicks have no function
(like select).

12 years agoAdd -scoreWhite option
H.G. Muller [Thu, 7 Jul 2011 17:37:12 +0000]
Add -scoreWhite option

This is similar to -absoluteAnalysisScores, except that it works in
all modes, and flips the score given by the engines in the engine-output
window when black is to move.

12 years agoPrint 50-move counter in Engine-Output title
H.G. Muller [Thu, 7 Jul 2011 17:28:04 +0000]
Print 50-move counter in Engine-Output title

12 years agoDisplay score/depth in Eval Graph title
H.G. Muller [Thu, 7 Jul 2011 16:50:56 +0000]
Display score/depth in Eval Graph title

No longer print it in the comment window.

12 years agoLet -sweepPromotions also work for click-click moves
H.G. Muller [Mon, 4 Jul 2011 09:06:12 +0000]
Let -sweepPromotions also work for click-click moves

A click-click promotion no longer causes auto-queening, but the down-click
on the to-square causes a Queen to stick to the mouse pointer, and then
allows the user to change it through dragging backwards before releasing it
with an up-click.
  In WinBoard this required a slight change in DragPieceBegin, because
the dragged piece there only was made visible when the mouse pointer
actually started moving (and dragInfo.pos was set), presumably under the
assumption that before mouse move the piece was already on the clicked
square. Which in the case of a to-square was of course not true. (Because
a piece jumps to the mouse pointer when the click is not centered on a
square, this gives less jittery static clicks.) So DragPieceBegin has
been given an extra argument now, to indicate whether it should attach
the piece to the mouse pointer immediately.
  To make the click-click sweepPromotions work in Shogi (for which the
drag-drop sweepPromotions could never work, because it is not clear the
piece has a posibility to promote when you pick it up), translation of
the sweep-selected piece to a Shogi promoChar had to e added.

12 years agoImprove -showTargetSquares on click-click moves
H.G. Muller [Mon, 4 Jul 2011 08:45:04 +0000]
Improve -showTargetSquares on click-click moves

The markers on move targets are now kept when a first click merely
selects a piece, rather than dragging it elsewhere. The second click
(by definition on the to-square) then clears the markers.

12 years agoLet PGN parser accept lower-case piece in drop moves
H.G. Muller [Mon, 4 Jul 2011 09:23:05 +0000]
Let PGN parser accept lower-case piece in drop moves

The @ sign prevents amiguity with other notations anyway.

12 years agoFix parser.c line endings
H.G. Muller [Mon, 4 Jul 2011 10:42:12 +0000]
Fix parser.c line endings

12 years agoFix writing searchTime in tourneyFile
H.G. Muller [Wed, 29 Jun 2011 18:29:12 +0000]
Fix writing searchTime in tourneyFile

This had to be derived from the variable searchTime, which gives it
in seconds, as appData.searchTime (a string in minutes) is not reliable,
as it contains the command-line value, which might have been altered
through the time-control dialog.

12 years agoFix resetting searchTime if other TC mode is chosen (XB)
H.G. Muller [Wed, 29 Jun 2011 18:25:00 +0000]
Fix resetting searchTime if other TC mode is chosen (XB)

This fixes a bug in the new time-control dialog.

12 years agoFix coords display on large boards
H.G. Muller [Wed, 29 Jun 2011 12:32:43 +0000]
Fix coords display on large boards

The file indicators can now run upto 'w'. Only the lowest digit
of the rank number is printed, from a table that is valid to 22.

12 years agoFix crash on making too-long FEN
H.G. Muller [Wed, 29 Jun 2011 11:53:00 +0000]
Fix crash on making too-long FEN

The buffer for in PositionToFEN was only 128 bytes, which was not enough
for large boards such as 19x19 Go. It is enlarged to MSG_SIZ(512) now.
There also is some approximate overflow checking added (but it is not
fool proof in case there are holdings...)

12 years agoFix drop moves on boards with more than 10 ranks
H.G. Muller [Wed, 29 Jun 2011 11:36:26 +0000]
Fix drop moves on boards with more than 10 ranks

The internal encoding for rank 16 is '@', and thus ambiguous with drop
moves. They were always printed as 16, breaking drop games on large
boards. The ambiguity is now solved (for boards with more than 16 ranks)
by checking if the preceeding letter is upper case, in which case it
cannot be a fileindicator, but must be a piece, and thus a drop.

12 years agoDon't one-click move when legality testing is off
H.G. Muller [Wed, 29 Jun 2011 11:29:38 +0000]
Don't one-click move when legality testing is off

12 years agoReorder controls in Engine Setings dialog WB
H.G. Muller [Thu, 23 Jun 2011 19:18:11 +0000]
Reorder controls in Engine Setings dialog WB

To get tabbing through the controls in left-to-right order, they are
now added to the template structure in that order. Also add a tabstop
to Label options, so that JAWS will read those.

12 years agoAdd tab stops in WB generic popup
H.G. Muller [Thu, 23 Jun 2011 12:02:50 +0000]
Add tab stops in WB generic popup

The WinBoard generic popup did not put tab stops on push buttons,
including the OK and cancel button, with as a consequence that these were
skipped when tabbing through the dialog controls. In addition the tabbing
could not begin before the user selected one of the controls with the mouse.
  Now all buttons have tab stops, and the cancel button is given focus
when the dialog pops up.

12 years agoImplement Grand Chess
H.G. Muller [Thu, 10 Mar 2011 19:06:39 +0000]
Implement Grand Chess

Grand Chess requires a lot of exceptional handling similar to Superchess
and Great Shatran, because it also allows only promotion to a captured
piece. In addition it shares the enlarged promotion zone with Makruk and
Shogi, as well as the fact that promotion can be deferred. The 10-rank
board furthermore required a better generalization of double-pushes and
e.p. captures. On such a board double puhes are now allowed from 2nd and
3rd rank, e.p. capture from 5th and 4th.

12 years agoAllow promotion to Pawn with legality testing off
H.G. Muller [Fri, 28 Jan 2011 18:20:38 +0000]
Allow promotion to Pawn with legality testing off

In stead of ImpossibleMove promotionto Pawn now merely is an
IllegalMove, so it can be played with legality testing off.

12 years agoCreate some space in WB New Variant dialog
H.G. Muller [Mon, 24 Jan 2011 14:06:17 +0000]
Create some space in WB New Variant dialog

12 years agoAllow double-digit rank numbers
H.G. Muller [Mon, 20 Jun 2011 21:53:49 +0000]
Allow double-digit rank numbers

The parser already understood double-digit numbers on input, and
CoordsToAlgebraic produced them on otput. This patch also fixes sending
of the moves to the computer, for which the moveList was used. The latter
stored 10 as ':', etc,to always get a 4-char move, the characters of which
were frequently being converted to fromY or toY by adding/subtracting ONE.
To not break that the one-character encoding of rank number is kept in
moveList, but in SendMoveToProgram, characters > '9' are converted to
double digits.

12 years agoAdd Absolute Analysis Scores in Genral Options dialog XB
H.G. Muller [Thu, 23 Jun 2011 09:26:48 +0000]
Add Absolute Analysis Scores in Genral Options dialog XB

12 years agoFix texi file, and update it further
H.G. Muller [Thu, 23 Jun 2011 09:16:34 +0000]
Fix texi file, and update it further

12 years agoModified po
H.G. Muller [Mon, 20 Jun 2011 10:15:14 +0000]
Modified po

12 years agoUpdate texi file
H.G. Muller [Wed, 22 Jun 2011 15:51:51 +0000]
Update texi file

12 years agoRestore echo after ^C in ICS password
H.G. Muller [Wed, 22 Jun 2011 09:02:45 +0000]
Restore echo after ^C in ICS password

12 years agoFix some warnings
H.G. Muller [Wed, 22 Jun 2011 08:45:27 +0000]
Fix some warnings

12 years agoIncrease efficiency of SAN generation / disambiguation
H.G. Muller [Sun, 19 Jun 2011 18:30:09 +0000]
Increase efficiency of SAN generation / disambiguation

**************** Risky patch! **********************
The algorithm used for disambiguating and generating SAN was extremely
inefficient, because it generated all pseudo-legal moves from the relevant
position, and then for each of those did a check test (involving generation
of all moves of the opponent), before determining if the move matched the
(proposed or given) SAN move. While it is pointless to generate moves
with a piece that does not match (let alone checking them for legality).
And for a piece that matches, it is pointless to test legality of moves
that do not match the to-square.
  To speed up the process GenLegal and GenPseudoLegal have been equiped
with an argument that can indicate the piece type of the required move,
so they can skip generating moves with other pieces. TestLegality,
Disambiguate and CoordsToAlgebraic make use of this facility, and set also
(through global variables rFilter and fFilter) a to-square filter to be
applied in the GenLegalCallback before it tests the move for legality.
  This patch is especially tricky for Crazyhouse, where the piece indicated
in the move might not be the piece actually on the board, because the latter
is a promoted Pawn, and has to be demoted toits base type before the
comparison.

12 years agoFix compile errors WinBoard
H.G. Muller [Sun, 19 Jun 2011 14:18:15 +0000]
Fix compile errors WinBoard

The patch to make non-existing options non-fatal broke WinBoard. All calls
to ExitArgError from it now supply a third argument TRUE to fix it.

12 years agoAdd -fSAN / -sSAN options
H.G. Muller [Sun, 19 Jun 2011 12:28:09 +0000]
Add -fSAN / -sSAN options

These options force the PV of the applicable engine to be converted to SAN.
They make use of the existing ParsePV routine, after shelfing a possible
PV (from user PV walking) to free the space after the last move.
Could be costly in terms of CPU usage.

12 years agoCure flicker in Move History window, fix highlighting
H.G. Muller [Sun, 19 Jun 2011 08:56:25 +0000]
Cure flicker in Move History window, fix highlighting

The highlighting of the current move in the Move List window by selecting
it did not always work, because some other windows were clearing their text
widgets by selecting the contents and killing it, thus snatching the
selection away. This has been changed to setting XtNstring to an empty
string as a method for clearing without side effects on the selection.
As a bonus the Engine Output window now also no longer has the black flicker
on clearing it.
  In addition, triggering a scroll by setting the insertion point to the
end of the text caused excessive flicker in the Move List window, apparently
clearing it and redrawing from scratch, (even if there was no scroll motion),
to the point where on my slow laptop the move history stayed entirely blank
during a rapid succession of moves. This has been combatted by using the
end-of-line action procedure (which does not seem to suffer from this) to put
the insertion point at the end, when we need to scroll to close to the end.

12 years agoFix crash on clearing new Move List window
H.G. Muller [Sat, 18 Jun 2011 21:48:13 +0000]
Fix crash on clearing new Move List window

When a new game started and a previous game had filled the Move List
window, a crash occurred because an attempt was made to undo the
highlighting of a no-longer-existing move, and then scrolling to it.

12 years agoUse sound for ICS tells also with engine telluser popups
H.G. Muller [Sat, 18 Jun 2011 18:46:57 +0000]
Use sound for ICS tells also with engine telluser popups

The telluser and tellusererror commands now can be assigned a sound.

12 years agoAdd Score in Move List option to general options dialog XB
H.G. Muller [Sat, 18 Jun 2011 18:45:12 +0000]
Add Score in Move List option to general options dialog XB

Now that we have a WinBoard-style Move History window, this option is
no longer a no-op in XBoard.

12 years agonew developer release
Arun Persaud [Sat, 18 Jun 2011 19:42:41 +0000]
new developer release

12 years agoupdated Changelog, NEWS, etc.
Arun Persaud [Sat, 18 Jun 2011 19:38:32 +0000]
updated Changelog, NEWS, etc.

12 years agoUpdate window itle after last game of match
H.G. Muller [Sat, 18 Jun 2011 10:51:10 +0000]
Update window itle after last game of match

The result printed behind player names during a match would still be the one
without the game, differing from what the popup would show, which looked
sloppy enough for people to complain about it.
.

12 years agoMake WB generic popup translatable
H.G. Muller [Sat, 18 Jun 2011 08:26:31 +0000]
Make WB generic popup translatable

When used for internal settings (as in the Load Engine and Tournament
Options dialogs), the option names are now subectto translation.

12 years agoRedo Move History with generic popup in WinBoard style
H.G. Muller [Fri, 17 Jun 2011 19:05:00 +0000]
Redo Move History with generic popup in WinBoard style

The use of color and boldness to make the move list more readable
unfortunately cannot work in Xaw; reverse video by selection is used as an alternative to highlight the current move.

12 years agoRemove stray else
H.G. Muller [Fri, 17 Jun 2011 19:19:41 +0000]
Remove stray else

Due to an erroneous else, the window parameters of Move History were
not retreived (and thus incorrectly saved) when the Engine Output was up.

12 years agoMake non-existing opton in settings file non-fatal
H.G. Muller [Tue, 14 Jun 2011 16:47:30 +0000]
Make non-existing opton in settings file non-fatal

It is rather difficult to recover from a situaton where the settings
file contains an unknown option (e.g. because you downgraded to a
previous version that had fewer options), especially in WinBoard, where
the user settings file is in a hidden folder, and people might not be
able to find it, let alone edit it. By just skipping the line with the
offending option, rather than generating a fatal error, when reading
from a settings file, such options will be automatically purged from the
file as soon as you save settings.
  Small problem is that the user cannot be warned, as the initialization
has not progressed far enough at this point to generate error popups. In
XBoard we can at least print to the console, but in WinBoard there is no
warning at all. But the worst thing that can happen is that new options
in a settings file of a more advanced version will revert to their
defaults.

12 years agoChange long form of -tf option to -tourneyFile
H.G. Muller [Tue, 14 Jun 2011 16:20:37 +0000]
Change long form of -tf option to -tourneyFile

This is a more logical name, and in the WinBoard docs it was already
described as such. Also remove the -processes option, which in the
current design of the tourney manager is no longer used.

12 years agoFix default of -remoteUser
H.G. Muller [Tue, 14 Jun 2011 16:17:08 +0000]
Fix default of -remoteUser

This has to be an empty string, rather than NULL, to prevent XBoard from
segfaulting when the -gateway option is used.

12 years agoAdd -at and -opt options as alternative for @
H.G. Muller [Tue, 14 Jun 2011 11:32:38 +0000]
Add -at and -opt options as alternative for @

Windows XP and Vista shortcuts do not display command lines with @ in
them correctly, and these optionsprovide a work-around for that.

12 years agoFix empty-string option values in XBoard
H.G. Muller [Tue, 14 Jun 2011 10:46:36 +0000]
Fix empty-string option values in XBoard

12 years agoFix crash on switching sound in Vista
H.G. Muller [Tue, 14 Jun 2011 10:40:11 +0000]
Fix crash on switching sound in Vista

When choosing a new sound the wave form of the old one was free'ed, but
because built-in sounds are not really malloc'ed, this led to a crash.

12 years agoUpdate WB docs for tourney manager
H.G. Muller [Tue, 14 Jun 2011 10:36:16 +0000]
Update WB docs for tourney manager

12 years agoAdd icon to WB for tournament files
H.G. Muller [Tue, 14 Jun 2011 10:35:01 +0000]
Add icon to WB for tournament files

12 years agoRedo Time Control dialog with generic popup
H.G. Muller [Fri, 10 Jun 2011 14:52:01 +0000]
Redo Time Control dialog with generic popup

As poor-man's disabling of the unneeded input fields, we print the word
"Unused" in them.

12 years agoSome refactoring in xoptions.c to separate out front-end
H.G. Muller [Fri, 10 Jun 2011 12:14:45 +0000]
Some refactoring in xoptions.c to separate out front-end

12 years agoRedo New Shuffle Game dialog with generic popup
H.G. Muller [Fri, 10 Jun 2011 10:38:08 +0000]
Redo New Shuffle Game dialog with generic popup

The buttons are slightly renamed, and in stead of having an 'off'
button to clear it, shuffleOpenings now has its own checkbox, which is
ticked when a fixed or dynamic random is chosen with the buttons.

12 years agoFix type of shuffleOpenings
H.G. Muller [Fri, 10 Jun 2011 09:58:17 +0000]
Fix type of shuffleOpenings

This was a Boolean option, and thus accessed by the args.h code as such,
while it was declared as an int (and used in backend.c as such). This
could have led to problems with different endianness.

12 years agoInternationalize the file browser.
Tim Mann [Fri, 10 Jun 2011 06:57:43 +0000]
Internationalize the file browser.

The file browser was missed in the previous round of
internationalization and had gotten broken by setting international =
True in its widgets.  I got nothing but segfaults trying to set
international to False in the file browser widget subtree when it was
True in the main window, so I gave up and did the
internationalization.  It turned out to be pretty easy.

As a tiny bonus fix, I removed some ../'s from includes, and you can
now configure and build xboard in a subdirectory again.  This was
useful for building both --enable-nls and --disable-nls from the same
sources to compare functionality and make sure both still work.

12 years agoFix crash at end of Swiss tourney
H.G. Muller [Wed, 8 Jun 2011 18:26:28 +0000]
Fix crash at end of Swiss tourney

12 years agoFix display of logos
H.G. Muller [Wed, 8 Jun 2011 15:33:34 +0000]
Fix display of logos

The logo files are now sought relative to the WinBoard install
directory. Non-existing logos cause clearing of the logo, rather than
letting the logo of the prevous engine hang. Logo change is requested
explicitly from the back-end (when an engine is initialized for a new
game), rather than using the kludge in StartChileProcess. This required
a dummy UpdateLogos routine in the XBoard front-end.

12 years agoFix parameter handling in adapter command
H.G. Muller [Wed, 8 Jun 2011 16:02:31 +0000]
Fix parameter handling in adapter command

A backslash was not considered the end of an option name, which was
fatal for UCCI2WB, which needs %fd\\%fcp in its command line.

12 years agoClear Engine-Output pane when initializing engine
H.G. Muller [Wed, 8 Jun 2011 15:16:54 +0000]
Clear Engine-Output pane when initializing engine

This to prevent output from the previous game hanging there during the
next game, when the engine that is really playing is in book and
doesn't produce thinking output there.

12 years agoFix display of last move of last match game
H.G. Muller [Wed, 8 Jun 2011 15:20:01 +0000]
Fix display of last move of last match game

When a game was adjudicated (e.g. because XBoard detected mate) GameEnds
would trigger an exit if it was the last game of the match, and thus
never returned, while the ShowMove was called only after return from
Adjudicate. An extra ToNrEvent is now used in GameEnd in this case to
cause ShowMove to be called before exiting. (Ugly kludge...)

12 years agoFix concurrency in Swiss tourneys
H.G. Muller [Wed, 8 Jun 2011 15:38:43 +0000]
Fix concurrency in Swiss tourneys

The pairing engine was consulted for the next round before all games of
the previous round were finished, if other XBoard instances were still
playing games. This caused the instances finishing early to stall
indefinitely. This is fixed by moving the Swiss pairing code to after
the syncInterval code. The normal pairing code (the call to Pairing)
must stay before it, because it determines the syncInterval. So ther is
a bit of tourneyType dependence cluttering up the code here. :-(

12 years agoGive error popup when pairing engine fails
H.G. Muller [Wed, 8 Jun 2011 15:27:01 +0000]
Give error popup when pairing engine fails

An invalid pairing now produces an error popup to inform the user, so he
knows why the tourney stagnates.

12 years agoFix clock mode in tourney starting from -ncp mode
H.G. Muller [Wed, 8 Jun 2011 15:24:41 +0000]
Fix clock mode in tourney starting from -ncp mode

When a tourney started from -ncp mode, which was allowed in MatchEvent,
because the tourney loads its own engines anyway, the menu enablings and
clockmode where not restored to their 'GNUMode' state.

12 years agoFix round-robin schedule
H.G. Muller [Wed, 8 Jun 2011 15:11:31 +0000]
Fix round-robin schedule

The first round was played twice, and the formulas used to derive the
pairing were not even-odd resistant anyway. Both even and odd number of
participants should work now.

12 years agoFix interrupting tournament
H.G. Muller [Wed, 8 Jun 2011 15:08:55 +0000]
Fix interrupting tournament

Stopping a tourney by using the Machine Match menu item did not wor
properly.

12 years agoImprove quoting of engine name on install
H.G. Muller [Wed, 8 Jun 2011 14:57:09 +0000]
Improve quoting of engine name on install

Rather than always using double quotes for the engine command, the
engine filename is now double-quoted if it contains spaces (and no
double-quotes), and the comand is single-quoted if it contains
double-quotes (and double-quoted otherwise).

12 years agoPrint sensible window title during tourneys
H.G. Muller [Wed, 8 Jun 2011 14:49:18 +0000]
Print sensible window title during tourneys

Rather than the "(W-L-D)" in the title we now print game number and
total games, plus indication of the tourney type (rr, gt or sw).

12 years agoLet XBoard propose name of tourney file
H.G. Muller [Wed, 8 Jun 2011 14:44:16 +0000]
Let XBoard propose name of tourney file

Add an option -defaultTourneyName to configure the name that will be
proposed in the Tournament Options dialog's tournament-file field. The
option can contain %y, %M, %d, %h, %m, %s for year, month, day, hour,
mintes, seconds of the curret time in %02d format, or %Y for the year in
%04d format. Any tournament -file name is ignored when no participants
are given. Participants without a tourney file remains an error.

12 years agoImprove Tournament dialog layout WB
H.G. Muller [Wed, 8 Jun 2011 14:30:34 +0000]
Improve Tournament dialog layout WB

12 years agoFix -matchGames option
H.G. Muller [Wed, 8 Jun 2011 15:05:02 +0000]
Fix -matchGames option

The new MatchEvent code had broken the -mg option, and used always
-defaultMatchGames in stead.

12 years agoFixed small bugs in several .po files, enabling these translations to
Tim Mann [Tue, 31 May 2011 02:55:13 +0000]
Fixed small bugs in several .po files, enabling these translations to
be used.  They all probably need more work from the translation team.
I don't speak any of these languages, but I did some spot checks
either from my own knowledge or using Google Translate, and they
generally look sane.

- Several files were in utf8 but needed to be marked as such (that is,
  "CHARSET" changed to "UTF-8").  Affected es.po, it.po, ru.po, vi.po,
  zh_CN.po, zh_TW.po.

- it.po was missing a \n at the end of one translation.

- ru.po had unescaped double-quote marks in one translation.

- vi.po needed to be normalized to Unicode normalization form C.  With
  this fix, more characters display correctly, though at least one is
  still missing in the X core fonts that xboard is able to use.
  See http://vietunicode.sourceforge.net/ for more about Vietnamese.

- zh_HK.po was written in big5 and then utf8-encoded on top of that,
  making it unusable.  I stripped off the spurious utf8 encoding and
  then used recode to convert the file to Unicode properly encoded as
  utf8.

Unfortunately, I wasn't able to test any of the Chinese translations,
as I haven't been able to get XCreateFontSet to work in Chinese
locales with any of the fonts I have installed, even after adding the
Ubuntu language support packages for both simplified and traditional
Chinese.  I did spot check a bunch of the translations using Google
Translate.

I've checked in a couple of tiny Perl scripts that I used to do part
of the fixups on vi.po and zh_HK.po in case we need them again.

12 years agoThe empty string can't be translated and it causes the gettext
Tim Mann [Mon, 30 May 2011 21:12:53 +0000]
The empty string can't be translated and it causes the gettext
utilities to complain, so change _("") to "".