Delete emptied front-end files, and move rest to gtk directory Remove #ifdeffed-out Xt code that has GTK implementation. The xgamelist and xhistory have been completely cleared off content, and were removed.
Transfer most available gtk-xt code to xoptions.c GenericPopUp and PopDown are grafted from gtk-xt into gtk2. The version compiles, but segfaults before doing anything, with error messages about unexpected cases in GenericPopup for Graph and PopUp Options of the main board. The spin options need special treatment in GetWidgtText.
Remove all X11 code by #ifdeffing it out With #ifdef TODO_GTK we disable all X11 code, in order to get a compiling X11-free version. The disabled sections can then be replaced by code for another widget set, the X11 version still showing what it was supposed to do.
Preserve copies of the X11 front-end in xboard directory The X11 front-end has been moved to the xaw directory, but copies are retained for modifying them to gtk versions.
Move X11 front-end to directory xaw
Redo Game List with generic popup Check in ngamelist.c Redo Game List with generic popup The X-independent code (i.e. almost all) is moved to a new file ngamelist.c. Make button in Game List to pop up Game List Options Fix scrolling game list Fix popup of existing Game List after loading file Wheel-scroll game list Symbolic reference game list TopLevel game list Put format flags with listbox options
Redo Game List Options with generic popup
Refactor menu code, and move it to menu.c Supply new method for key binding It is annoying that every menu item needs its X-specific handler routine, because this handler has to be registered to X for becoming eligible as a key binding. Another disadvantage of this method is that the user wanting to make the binding has to know the name under which the menu function is registered (e.g. FlipViewProc). A new method is now made available, which uses only a single (X-specific) routine, registered with X as "MenuItem", as generic key-binding handler. The bindings can then be made by the user specifying "MenuItem(FlipView)". This requires a new list of potential bindings, which should be filled by the menu-creation routines. (Currently only contains only a predeficed example.) No longer register all MenuProcs with X The list with available menu procs is moved to the user-maintained menuItemList. Only QuitProc had to stay registered with X, because it is used in CatchDeleteWindow. (So it is in both lists now.) In the future, most of the list can be built automatically from the menu tables. Alter type of MenuProcs to void(void) By getting rid of the argument list with X-types, most menu procs can become back-end. In the cases of ManProc and QuitProc the original version had to be kept as well, because in ManProc the argument was actually used (with key binding), while QuitProc is used for delete window. Remove now unnecessary menu wrappers Now the MenuProc have an empty argument list, those that also call a single 'MenuEvent' without arguments have become completely redundant, and have been taken out of the loop by calling the corresponding MenuEvent directly. Build menuItemList from menu tables Rather than having an initialized table of name-proc associations (which used to be the X registrations) for the menu items, we now build the list during menu cration from the menu tables. The menu "ref" is now used as proc name. This means the old MenuProc names used in the predefined key bindings had to be changed to conform to this. Note that the bindings would slice up names containing spaces in several parameters, so in the translations the spaces were squeezed out of the item names. This requires a hand-written comparison routine Equal() to identify the binding. Remove prototypes of deleted MenuProcs Move prototypes of platform-independent MenuProcs to menus.h Create a new header file for the menu stuff, so that we can move the corresponding handler routines out of xboard.c to a back-end file. Extract back-end code from menu creation The menu tables and code to interpret them is moved to a new file menu.c. Only basic fuctions for creating a pop-down list and for adding an item to it remain in xboard.c.
Fix focus of Game List After focus was transferred to the filter text-edit, it was impossible to get it back on the game list (to make the arrow keys working again). A translation to left down-click is now used to assign focus, just as it would for text edits. For unknown reason this only worked if the translations were instated by Overriding, rather than Augmenting, which again required the normal translation of downclick, Set(), which selects the clicked item, to be explicitly mentioned as well.
code cleanup: make function definition confirm to GNU coding style change everything in the main directory to void funcname (int a, int b) format
Updated copyright notice to 2012
Fix format in temporary timing printf
Fix unportable memory initialisation Memory sat to zero by calloc() cannot safely be assumed to have the pointer value NULL
Add 2 strings for translation
Definition of TimeMark moved from 3 c files to backend.h
marked more strings for translation
Debug position search cache
Quickscan
Fix up/down arrows in game list
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.