H.G. Muller [Wed, 4 May 2011 11:43:06 +0000]
Load new logo on engine change WinBoard
Picking the logo for the first engine is made into a subroutine. The
code for picking the logo of the first engine was made into a subrroutne
for this. We use the kludge to recognize the engine by its command line
when starting a new engine process.
H.G. Muller [Wed, 4 May 2011 11:36:27 +0000]
Allow switching off match mode through menu
The Machine Match menu item is now checkmarked, and no longer grayed
during a match, and clicking it while a match is running will terminate
the match after the current game. To not be left with hanging
checkmarks, the checkmark is already removed duringthe last match game
(which is logically equivalent to ordinary Two Machines mode anyway).
H.G. Muller [Mon, 2 May 2011 22:14:22 +0000]
Calculate and display tourney result
H.G. Muller [Wed, 4 May 2011 16:42:13 +0000]
Implement Tournament Manager
New command-line options are added to specify the tourney: -tourneyType
(-tt), -tourneyCycles (-cy), -participants, -syncAfterRound,
-syncAfterCycle, -results, to be saved on a -tourneyFile (-tf), but
otherwise volatile. When a tourneyFile is specified during a match,
a new routine NextTourneyGame is called from NextMatchGame before every
game, to decide the pairing, and unload and redefine the engines, when
needed. The XBoard Match Options dialog can be used to set the options
and create the tournament file.
Actual loading of new engines is done by TwoMachinesEvent, which is
now modified to also wait for the feature timeout of the first engine.
Waiting for the matchPause is now also implemented there, after waiting
for the engines (so they can be started during the pause).
Pairings and color assignment is now all done in an absolute
(non-incremental) way, based on a new global game-number variable
nextGame, which takes over the function of matchGame in a tourney. The
latter is now used to count games between the same players, so it can be
still used to derive the load-file indexes (again in absolute fashion).
The next game to play is already picked in GameEnd, so it can be
decided if there is a game to be scheduled, or if we can terminate.
H.G. Muller [Wed, 4 May 2011 13:42:26 +0000]
Display note in stead of empty engine-settings dialog XB
H.G. Muller [Sun, 24 Apr 2011 16:02:20 +0000]
Fix crash on empty Engine Settings dialog
The generic popup was not foolproof against this.
H.G. Muller [Fri, 22 Apr 2011 10:47:24 +0000]
Refactor code for loading games and positions in match
The code in NextMatchGame and MatchEvent was nearly the same,
(MatchEvent did a little more error checking, but that is never
harmful), and could be combined. In stead of determining the load index
incrementally, it is now calculated in an absolute way from the game
number, so it can be used more easily in tournament mode.
H.G. Muller [Thu, 21 Apr 2011 20:37:56 +0000]
Add callback possibility to combobox selection
H.G. Muller [Sun, 24 Apr 2011 15:15:23 +0000]
Lock game an position file during writing
The use of flock() on the file desctiptor of the opened stream should
guarantee multiple XBoard instances, saving on the same file, will not
interleave their PGN games or FEN positions.
H.G. Muller [Wed, 27 Apr 2011 15:05:06 +0000]
Remove building rule for parser.c from WB makefiles
H.G. Muller [Fri, 29 Apr 2011 14:58:49 +0000]
Fix Engine Settings buttons in WinBoard
This was broken by a leftover statement from debugging the -file/-path
patch.
H.G. Muller [Mon, 2 May 2011 11:38:14 +0000]
Implement flock in WinBoard
This system function seems unknown in a MinGW compile, so it is
implemented with the aid of file byte-range locking, using a lock on the
first 1024 bytes of the file as a semaphore.
H.G. Muller [Fri, 29 Apr 2011 21:06:43 +0000]
Fix grayout XB Match Options in ICS mode
H.G. Muller [Mon, 2 May 2011 22:22:40 +0000]
Delay loading of second engine until it is used
H.G. Muller [Mon, 2 May 2011 13:00:03 +0000]
Fix zippy bughouse partner bug
The patchs to subject Zippy messages to coloriation was faulty, because
there were messages recognized by zippy that were not colorized, and
such messages would then not be 'read away' after zippy recognition
(except for the first character). As a result the messages were
processed over and over again.
H.G. Muller [Wed, 4 May 2011 08:59:43 +0000]
Silence more rpm warnings
H.G. Muller [Sun, 1 May 2011 18:33:50 +0000]
Fix warnings XBoard file browser
All the prototypes have been moved to selfile.h, to force uniformity.
The order of the #include files xstat.h and selfile.h had to be
swapped, to make sure 'struct stat' is a nown type atthe time of
prototype declaration. The event handler SFmotionList is considered
wrong type because of its third argument (XMotionEvent in stead of
XEvent), and had to be casted to (XtEventHandler) when passed to
XtAddEventHandler.
H.G. Muller [Wed, 4 May 2011 08:56:05 +0000]
Fix some warnings and header-file improvement
Ther were lot of 'extern' declarations in the x-files, so called
'imports from xboard.c', (sometimes backend.c) which logically belonged
in xboard.h (backend.h) to ensure their uniform definition. These have
now been moved there. Some prototypes have been added in xboard.h as
well, for functions that needed calling from xoptions.c.
H.G. Muller [Wed, 4 May 2011 08:50:12 +0000]
Create conversion tools for language files
A shell script "lng2po.sh" is provided, to apply the translation given
in a WinBoard .lng file to "xboard.pot", in order to generate a
"language.po" file containing translations for all strings for which
the .lng file had a translation. It makes use of a file "metascript",
which is the ed script used to turn the .lng file in an ed script to
turn the .pot into .po. For example, the command "./lng2po.sh
espa?ol.lng" will create a file "language.po", which can be renamed to
"es.po".
****************************** WARNING ********************************
Note that the lng2po script does a "recode" that assumes the given
.lng file is encoded in latin-1. This means it canot be used without
modification for the Vietnamese and Chinese translation; you would have
to replace latin-1 by the applicable encoding first (CP1258 / BG2312 /
BIG5).
H.G. Muller [Wed, 27 Apr 2011 20:04:38 +0000]
Put gettext markers in generic dialog creator
This is done by adding extra XtNstring argumentsto the widget gcreaton,
so the displayed name can be different fromthe widget name.
Tim Mann [Mon, 2 May 2011 02:56:38 +0000]
Use getaddrinfo instead of gethostbyname. Hopefully this makes us compatible with IPv6 and with hosts that have more than one IP address. However, I don't know of any chess servers that have either of those properties, so I couldn't test that. I did test that xboard still works with freechess.org and chessclub.com and that it gives an error message for invalid host names.
Arun Persaud [Sun, 24 Apr 2011 18:18:28 +0000]
updated German translation
Arun Persaud [Sun, 24 Apr 2011 18:17:43 +0000]
replaced hardcoded email address with generic PACKAGE_BUGREPORT
Arun Persaud [Sat, 23 Apr 2011 17:51:57 +0000]
updated po-files; updated german translation
Arun Persaud [Sat, 23 Apr 2011 17:51:02 +0000]
updated list of files that include translation strings; updated pot-file
Arun Persaud [Sat, 23 Apr 2011 04:50:58 +0000]
marked more strings for gettext that were only marked with N_()
they need to be marked again with _() when they are used to get the translated string
Arun Persaud [Sat, 23 Apr 2011 04:39:22 +0000]
updated translation files
Arun Persaud [Sat, 23 Apr 2011 04:37:22 +0000]
added/fixed i18n support via gettext to xboard
this was already added a long time ago, but now it's added again to
autoconf. Also fixed some compile errors that showed up.
H.G. Muller [Wed, 20 Apr 2011 08:27:20 +0000]
Make engine startup error non-fatal
When engine startup fails, do not generate a fatal error, but swicth
back to -ncp mode. Write on broken pipe errors had to be suppressed for
this.
H.G. Muller [Wed, 20 Apr 2011 12:35:50 +0000]
Make engine loadable during session
A "Load Engine ..." menu item is added to the Engine menu, which pops
up a dialog where one can replace the first or second engine by a new
one, without destroying the game state. Switching from -ncp to engine
mode needed activation of some menu items in SetGNUMode, and
re-enabling clockMode. It was also important that noChessProgram is
cleared before re-initializing the ChessProgramState.
The Load-Engine dialog can select from the list of installed
engines, and also add a newly specified engine to this list. In this
case it saves the directory, hasBook, and isUCI info with the engine,
and optionally the current variant. When loading an engine with a
specified variant, it resets the game and switches to the new variant.
H.G. Muller [Mon, 18 Apr 2011 13:56:47 +0000]
Generalize WaitForSecond to WaitForEngine
H.G. Muller [Mon, 18 Apr 2011 13:46:12 +0000]
Add UnloadEngine routine
H.G. Muller [Wed, 20 Apr 2011 11:45:51 +0000]
Put engine initialization code in per-engine function
Initializing of the ChessProgramStates first and second from the
option settings in appData is now done by separate calls to the same
routine. Clearing of options is added to the initialization. This is
needed when reloading an engine. This is done in a separate routine,
which could also be called on -reset options.
H.G. Muller [Mon, 18 Apr 2011 11:21:44 +0000]
Bring structure in appData engine options
All options in appData that came in pairs for both engines are replaced
by arrays of ENGINES (=2, for now) elements. The use of the named
appData field that are replaced in the source is replaced by use of the
corresponding array element, by #define directives in common.h, awaiting
their replacement.
H.G. Muller [Tue, 19 Apr 2011 13:15:48 +0000]
Fix gettext macros in option dialogs
The strings in the tables were using _() in stead of N_().
H.G. Muller [Mon, 18 Apr 2011 18:58:01 +0000]
Fix crash on using Engine #1 Settings in ICS non-zippy mode
If XBoard is compiled with zippy the Engine #1 Settings menu was not
grayed out even when you don't run in zippy mode, and using it would
then crash XBoard.
H.G. Muller [Tue, 19 Apr 2011 13:07:31 +0000]
Fix shogipixmaps
Some pixmaps forptomoted pieces had wrong background color, others had a
wrong name (so the one with the correct name was missing).
H.G. Muller [Sun, 17 Apr 2011 17:12:00 +0000]
Change texture-install directory to pixmaps/textures
H.G. Muller [Sun, 17 Apr 2011 15:36:32 +0000]
Limit install of sound files to those in menu
The sounds directory is set to .../xboard/sounds, and only ten
sounds are kept (all non-spoken).
H.G. Muller [Sun, 17 Apr 2011 15:27:57 +0000]
Remove some bitmaps from install
Some files in the bitmaps source directory need not be installed,
because they are there only to be linked to the binary in a build
without LIBXPM, are README files or conversion programs. I left only the
stuff that is in a Debian binary package in .../xboard/bitmaps.xchess.
H.G. Muller [Sun, 17 Apr 2011 14:34:03 +0000]
Configure some default sounds
The move sound is set to Wood Thunk; the sounds for tell and challenge
events to Phone and Gong, respectively.
H.G. Muller [Sun, 17 Apr 2011 14:17:30 +0000]
Change default sounds in Xboard menu
All spoken sounds are removed now. Thud, Click and Ching are replaced by
Wood Thunk, Slap and Cymbal; Car Horn and Pop are added.
H.G. Muller [Sun, 17 Apr 2011 10:46:47 +0000]
Make user wav file available for try-out in sound dialog
The GenericReadout was adapted to be able to read a single selected
value, so that the callback to the 'play' button in the sounds dialog
could get the name of the 'user WAV file' without accepting all settings
for the other sounds (which should only happen on 'OK', and might still
be cancelled in stead).
Arun Persaud [Sat, 16 Apr 2011 17:36:31 +0000]
configure: enable silent rules by default
Arun Persaud [Sat, 16 Apr 2011 17:28:16 +0000]
configure: added install directory for bitmaps files: .../games/xboard/bitmaps/default/
Arun Persaud [Sat, 16 Apr 2011 17:25:33 +0000]
configure: added install of sounds in .../games/xboard/sounds/default
Arun Persaud [Sat, 16 Apr 2011 16:54:26 +0000]
configure: renamed bitmapdir to pixmapsdir, since it installed only pixmaps. also changed name of default dir
pixmaps will now be installed under .../games/xboard/pixmaps/default/
H.G. Muller [Sat, 16 Apr 2011 11:40:16 +0000]
Fix gamelist highlight
Reopening the gamelist should highlight the current game.
H.G. Muller [Sat, 16 Apr 2011 08:25:53 +0000]
Fix size limit on 'save as diagram'
In stead of a fixed-size buffer the diagram-save code now uses an
allocated buffer with size calculated from the bitmap parameters to
retreive the bitmap data, so it should work for all sizes.
H.G. Muller [Fri, 15 Apr 2011 20:04:03 +0000]
Fix chaining of bottom-row dialog buttons
The OK & cancel buttons are chained to the bottom. This patch makes sure
that other buttons appearing in the same row (as in the tags and
comment dialogs) will be chained that way too, so that they will behave
the same on vertical sizing. The bottom of a full-width text-edit above
it will be chained to bottom too. To make this work in the tags dialog,
the (optional) cmail-message field had to be put above the tags memo.
H.G. Muller [Fri, 15 Apr 2011 17:18:46 +0000]
Fix switching between pixmap and bitmap pieces
There were still several flags that had to be reset when redoing the
graphics initialization. The Debian patch to use a default bitmap
directory when none is given but monoMode is selected or forced, is
moved to a more sensible place, so that it does not disturb matters when
compiled without LIBXPM (when we do have built-in bitmaps).
H.G. Muller [Fri, 15 Apr 2011 13:47:09 +0000]
Remove outline-pieces option from board-options dialog
This option does not exist in XBoard (yet).
H.G. Muller [Fri, 15 Apr 2011 13:41:38 +0000]
Fix running of clock during hash allocation engine
In TwoMachinesEvent we now wait for the second engine to acknowledge the
'ping' after 'new', to make sure it is done allocating hash in reaction
to the preceding 'memory' command, before the clock for the game is
started.
H.G. Muller [Thu, 14 Apr 2011 19:42:50 +0000]
Describe move type-in in texi file
H.G. Muller [Thu, 14 Apr 2011 18:34:42 +0000]
Describe Copy Game List menu item in texi file
H.G. Muller [Thu, 14 Apr 2011 18:30:16 +0000]
Describe -sweepPromotions in texi file
The new method for selection promotion piece, and the -sweepPromotions
option are described in the texi file.
H.G. Muller [Thu, 14 Apr 2011 18:14:44 +0000]
Describe -pieceMenu option in texi file
The sweep method for selecting a piece in Edit-Position mode is
explained, as well as the -pieceMenu option.
H.G. Muller [Thu, 14 Apr 2011 13:59:57 +0000]
Update texi file
Descriptions of the new XBoard menu dialogs are included in the docs.
H.G. Muller [Thu, 14 Apr 2011 19:06:49 +0000]
Reorganize texi description
H.G. Muller [Thu, 14 Apr 2011 10:31:15 +0000]
Fix sweep-promotions patch
Setting of the from square was moved to before OKtoStartUserMove in the
LeftClick handler, to make sure we could test the promotion possiblity
when OnlyMove() would have altered (x,y) to be no longer the from
square. But this setting of fromX, fromY hung on also if the move was
not OK, so you could effectively select opponent pieces and empty
squares. The from-square is now set back to undefined when it is not OK
to move the piece you clicked.
H.G. Muller [Thu, 14 Apr 2011 09:56:59 +0000]
Alter treatment of moves with empty squares
In Edit Position mode one can move empty squares, and use them to
'capture' pieces as a means to clear their square. But this often leads
to unintended disappearence of pieces one wants to grab for dragging, if
a previous click had inadvertantly left an empty square selected: the
click on the piece is then seen as the to-click of a click-click move.
This patch treats to-clicks of moves with an empty-square differently
from other to-clicks: Rather than performing the move (in this case
clearing of the to-square) on the down-click, it defers that to the
up-click, and only does it if that up-click is in the same square. This
allows the user to grab the piece on the down-click, and drag it to
another square, if that is what he wanted to do, without being disturbed
by sudden implosion of the piece he tried to grab.
If the to-square is in the holdings, grabbing the piece is the only
action, as moves of empty squares into the holdings are forbidden anyway.
H.G. Muller [Wed, 13 Apr 2011 11:14:00 +0000]
Block selection of a directory when file is needed
When we are not browsing merely to obtain a name to put in a text edit,
but really must return an open file pointer, selection of a directory
(ending in '/') can no longer be OK'ed in the file browser. (XBoard
tends to segfault when offered garbage for game or position file...)
H.G. Muller [Wed, 13 Apr 2011 10:23:00 +0000]
Let double-click select file in file browser
A second click on the already selected entry now has the same effect as
pressing the OK button.
H.G. Muller [Tue, 12 Apr 2011 15:06:28 +0000]
Couple mouse wheel to v-scrolls in file browser
A newly added mouse-wheel event handler was made to call the v-scroll
callback routines with parameters to step one entry. The button-press
handler for the lists themselves was also made to intercept the wheel
events (buttons 4 and 5), to prevent they would select an entry, and
make them scroll in stead as well.
H.G. Muller [Wed, 13 Apr 2011 09:41:54 +0000]
Fix crash copying game list when there is none
H.G. Muller [Wed, 13 Apr 2011 09:15:14 +0000]
Fix changing of float setting by generic popup
Changing a float setting (so far the only one is in the Load Options
dalog) did not always work, because the old value was clipped to (int),
so that changing it back to an integer value might erroneously conclude
there was no change.
H.G. Muller [Wed, 13 Apr 2011 14:15:22 +0000]
Fix crash on closing dialogs in wrong order
When a menu dialog was closed when it still had an open file-browse
daughter, which could be done through the system menu X on the title
bar, later closing of the file browser caused a crash. This is solved by
keeping track of the fact that there is such a daughter through a global
flag, and ignoring the pop-down command if there is one.
H.G. Muller [Wed, 13 Apr 2011 14:33:16 +0000]
Fix startup focus of board window
When there were open auxiliary windows, these would have focus on
starting up XBoard. The XtSetKeyboardFocus call added in XBoard main()
was ineffective in curing that. It has now been replaced by a call to
XSetInputFocus, which does do the job. By giving input focus to the form
widget, rather than the board widget, XBoard will be immediately
sensitive to all key bindings.
H.G. Muller [Wed, 13 Apr 2011 13:48:35 +0000]
Fix game-list highight error when filtered (WB)
When the gamelist was filtered, the game that was highlingted was the
n-th game in the list rather than the n-th game in the file, when the
latter was loaded (and n did not exceed the number of filtered games).
This is fixed now by searching for the line in the listbox that starts
with the game number n, rather than taking the n-th line.
H.G. Muller [Tue, 12 Apr 2011 17:20:46 +0000]
Refactor move type-in code
Common code between XBoard and WinBoard was moved to the back-end
creating TypeInEvent() and TypeInDoneEvent() routines.
H.G. Muller [Tue, 12 Apr 2011 08:13:40 +0000]
Fix saving of XBoard fonts with spaces in name
SaveFontArg now prints quotes around the saved font string, so that the
general option-argument parser doesnot stop at the first space it sees.
H.G. Muller [Mon, 11 Apr 2011 18:48:24 +0000]
Implement move type-in for XBoard
By adding an event handler to the main window for key presses, users can
now type moves when the board has focus, like in WinBoard. The typed
character appears as first character in the type-in box that willpop up.
Enter and Escape close the box; finishing the typing of the move enters
it. Like in WinBoard it is also possible to type a move number (to go
there) or (in Edit Position mode) a FEN.
Arun Persaud [Tue, 12 Apr 2011 03:59:44 +0000]
new developer release
tried to keep the v4.5.x branch developed already separated in the NEWS file, as well as DIFFSTAT and SHORTLOG.
The Changelog is just the one from master.
Arun Persaud [Mon, 11 Apr 2011 05:47:59 +0000]
updated Changelog, NEWS, etc.
H.G. Muller [Sun, 10 Apr 2011 18:32:57 +0000]
Fix use of game/position file in first match game
When a match was started from the menu, it was not paying attention to
game and position files. (Later games were.) The code that handled this
in the initialization when a match is started through the command line
was made into a routine MatchEvent, which can be called from the menu
proc too.
H.G. Muller [Sat, 9 Apr 2011 18:55:47 +0000]
Fix crash on opening ICS Text Menu
The patch for the color defaults had broken the ICS Text Menu.
H.G. Muller [Sat, 9 Apr 2011 17:22:00 +0000]
Implement Copy Game List menu item for XBoard
Some WinBoard code was cloned for this.
H.G. Muller [Sat, 9 Apr 2011 09:42:21 +0000]
Third method of sweep selection
This method sweeps through the possible promotion choices for the piece
that is being dragged, as long as you drag a 7th-rank Pawn backwards. On
draggin such a Pawn forwards, it immediately shows it as the piece you
are going to promote to.
H.G. Muller [Fri, 8 Apr 2011 21:39:10 +0000]
Alternative sweep promotions
The sweep takes place on the from-square here.
H.G. Muller [Thu, 7 Apr 2011 21:21:02 +0000]
Make sweep-select promotions work in WinBoard
The mouse-move handler had to be connected to the PromoScroll back-end
routine.
H.G. Muller [Thu, 7 Apr 2011 21:19:10 +0000]
Fix path browsing in WinBoard
The routine BrowseForFolder was still declared as static in woptions.c,
while it was used from wsettings.c.
H.G. Muller [Thu, 7 Apr 2011 09:14:45 +0000]
Fixes to sweep selection
H.G. Muller [Wed, 6 Apr 2011 21:47:58 +0000]
Implement sweep selection of promotion piece
When the option -sweepPromotions is true, a click-click promotion move
will first display the default choice (usually Queen) on the promotion
square. While you have the mouse button still down, you can change the
piece by moving the mouse vertically.
H.G. Muller [Wed, 6 Apr 2011 19:20:30 +0000]
Implement sweep selection as alternative for the piece menu
When the option -pieceMenu is off, the piece menu will no longer appear
on right-clicks in Edit Position mode. In stead a Pawn of the chosen
color will appear immediately in the clicked square, and vertical
movement of the mouse with the right button down will cycle through
all other pieces defined in the pieceToCharTable of the current variant.
Setting the side to move is acheived by clicking the correspondig
clock. Clear board can be effected by clicking the clock of the side
that already has the move.
H.G. Muller [Wed, 30 Mar 2011 16:17:58 +0000]
Remember Tags and Comment dialog coordinates
The save-settings code now uses the shell and shellUp arrays from the
GenericPopUp to read out the window coordinates for Tags and Comment
window. Pointers used by GenericPopUp are set topoint to the
corresponding WindowPlacement structs.
H.G. Muller [Thu, 10 Mar 2011 18:21:59 +0000]
Redo Tags dialog
The generic popup is used for generating the Tags / EditTags popups.
The tags popup use a 'label' field to display the cmail message
H.G. Muller [Fri, 1 Apr 2011 11:43:52 +0000]
Implement Edit-Comment window through generic popup
The Edit Comment and Comment popups are combined into one, that can
always be edited (similar to WinBoard). It uses shell number 1.
(Number 0 is for all transient dialogs.) A save-changes button is added.
The positioning is not implemented yet.
H.G. Muller [Wed, 6 Apr 2011 08:56:57 +0000]
Refinements to generic popup and color picker
*) The text part of a checkbox can now be clicked to toggle the option.
*) Typing <Enter> in single-line text edits is ignored
*) Using a spin button now sets focus to the affected text edit, with
the insert position at the end.
*) Using the sample field or an RGB button sets focus to the
corresponding text edit, with the insert position at the end.
*) The adjust buttons now work in reverse, with a D button for "darker".
*) Editing a color field causes the sample field to update to the new
color when you type <Enter>.
*) The color pickers now define a default color, which can be instated
by clicking on the sample field.
*) Fix some 64-bit pointer warnings
H.G. Muller [Tue, 5 Apr 2011 15:05:39 +0000]
Let file browser filter on extension
A new text field is added in the file-browse dialog, to hold (space-
separated) extensions, on which the filenames are then filtered. This
field is initialized by the caller, depending on what we need the file
for, but can be changed by the user. (Directories are always displayed!)
Changes in the extension field become effective after typing a return
in it. Escape typed in the extension field gives focus to the filename
field, and restores the contents. Escape in the filename field cancels
the dialog, return ther OKs it. The extension filter of the browser is
initialized to the extension (if any) of the file currently in the text
edit you are browsing for.
When re-opening the file browser from the XBoard File menu, and there
is no suggested filename, it will now start with the last succesfully
opened name as suggestion. Calling the browser with a NULL argument
for the suggested filename requests that (unlike calling with an empty
string, which will start it in the current directory). To make this
work smoothly, the filebrowser saves the last used name on entry, so it
can be restored on cancel, so that a cancelled browse session really
erases all memory of it.
H.G. Muller [Mon, 4 Apr 2011 17:26:53 +0000]
Fix animation masks on changing piece pixmaps
The animation masks were not remade when new pieces were loaded
interactively through the board-options dialog.
H.G. Muller [Mon, 4 Apr 2011 17:09:21 +0000]
Fix linegap option in board dialog
The lineGC was not recalculated, so the grid lines stayed the same
thickness. In addition, setting the line-gap override to -1 now
retrieves the original line gap that belongs to the current board size.
H.G. Muller [Sat, 5 Mar 2011 22:27:48 +0000]
Make a kind of ICS text menu in XBoard as a dialog
The dialog with buttons can be opened from the View menu. It is
configured by the option -icsMenu; a default setting for this is
included in the master settings file.
The commands specified by the -icsMenu can now contain $name and $input
keywords, which will be replaced by the current primary selection, or
text the user types, respectively. Commands that contain $name will not
be sent when the current selection is empty. Commands that do not
contain $input will be sent to the ICS immediately; otherwise they will
be placed in the ICS Input Box, with the cursor at the point of the
$input, and input focus given to the Input Box, so the user can start
typing. When a command is prefixed by "$add " it will be appended to the
existing ICS Input Box contents, rather than replace it.
The items now have to be separated by ";\n", and button text from
command by ';' (with optional linefeed). This allows configuring of
multi-line commands, as a single linefeed no longer has special
sigificance.
H.G. Muller [Thu, 31 Mar 2011 11:36:05 +0000]
Redo ICS input box with generic popup
This box is just a single text edit, but the complexity is in the added
callbacks. These callbacks remain in xboard.c, and were altered to
access the edit through the option.handle field.
H.G. Muller [Sun, 3 Apr 2011 10:54:51 +0000]
Activate -path and -file options
In XBoard the generic popup was prepared for this. In WinBoard, for
-path options the BrowseFolder routine is used, and had to be made
global (prototype in winboard.h).
H.G. Muller [Sat, 2 Apr 2011 16:40:33 +0000]
Let generic popup generate Engine Settings dialog
H.G. Muller [Sat, 2 Apr 2011 16:36:09 +0000]
Merge SettingsPopUp into GenericPopUp
Based on currentCps the values read from the dialog are sent to the
engine, or stored into the option.target in the callback, and fetched
from the option.target in the PopUp. The currentCps is cleared in the
generic popdown of a transient dialog.
H.G. Muller [Sun, 6 Mar 2011 09:11:06 +0000]
Make generic dialog popup reentrant
To allow persistent dialogs to be implemented through the generic popup,
it must be possible to have several dialogs open at the same time, and
thus make sure the popdowns under the cacel or close-window button know
which one to pop down. To this end an array shells[] is created that
takes over the function of settingsShell, and GenericPopUp gets an extra
parameter telling it which element to use for storing the dialog shell.
This number is then also passed to the callbacks that trigger popdown.
This was a bit nasty for the CatchDeleteWindow stuff, which passes user
data to the callback as text strings.
Keep a separate up/down indicator, so that shell widgets can be kept
for persistent dialogs. Also keep a currentOption per dialog type.
The coordinates and size of the window is read out and stored in a
WindowPlacement structure, (if one is specified for that dialog), when
the dialog is popped down. When initialized the structure is also used
to set the window parameters when the dialog is created. (The idea being
that the structure was saved in the settings file.)
The routine MarkMenu checkmarks a given menu item, and logs it for the
given dialog type, so that a later popdown automatically unchecks is.
H.G. Muller [Fri, 25 Feb 2011 11:14:25 +0000]
Implement Machine Match menu item and options dialog
An item to start a match from the menu is added, similar to what
WinBoard has. (The code is duplicated, so I guess it should be moved to
the back-end now, as MachineMatchEvent(), but it was tiny.) A dialog in
the Options menu was added with the aid of the generic popup, and allows
the user to set the load Game / Position File and Index.
H.G. Muller [Fri, 1 Apr 2011 12:54:26 +0000]
Create General-Options dialog
The generic popup is used to implement a General-Options dialog, which
contains all Boolaen options that used to be set directly from the main
Options menu, plus a spin option for the flash count and flash rate.
The corresponing options are removed from the main Options menu, but the
whole thing is made conditional on a compiler switch OPTIONSDIALOG.
The dialog needs an OK callback for sending an altered ponder-state to
the engine. (Why isn't this option disabled in -ncp mode, btw?)
A spin control is added to adjust -animateSpeed between 5 and 100.
Add dropMenu and showTargetSquares item as well.
H.G. Muller [Fri, 1 Apr 2011 16:16:47 +0000]
Redo new-variant dialog with generic popup
Some special code was added in GenericPopUp() to force buttons of the
type needed in the New Variant dialog (wide, colored, greyed-out on
variant type). The dialog was implemented with these, and callbacks for
the buttons directly exit the dialog, without the need for OK. New spin
controls are added to the dialog for adjusting the board format.