X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxboard.c;h=de5da1228b34bf7ecfa96d726621bc605623273a;hb=ebd7f78161504e46896f7d96bb41e29714b2fd53;hp=c6df31afe78e5137b7d1182a5acc698c75c5a948;hpb=0278ebc80411a20fd23303156285e55ce8d2b0a5;p=xboard.git diff --git a/gtk/xboard.c b/gtk/xboard.c index c6df31a..de5da12 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -63,7 +63,6 @@ #include #include #include -#include #include #if !OMIT_SOCKETS @@ -213,11 +212,13 @@ RETSIGTYPE CmailSigHandler P((int sig)); RETSIGTYPE IntSigHandler P((int sig)); RETSIGTYPE TermSizeSigHandler P((int sig)); char *InsertPxlSize P((char *pattern, int targetPxlSize)); +#ifdef TODO_GTK #if ENABLE_NLS XFontSet CreateFontSet P((char *base_fnt_lst)); #else char *FindFont P((char *pattern, int targetPxlSize)); #endif +#endif void DelayedDrag P((void)); void ICSInputBoxPopUp P((void)); void MoveTypeInProc P((GdkEventKey *eventkey)); @@ -1022,8 +1023,6 @@ main (int argc, char **argv) programName, appData.boardSize); exit(2); } - if(BOARD_WIDTH > 8) - squareSize = (squareSize*8 + BOARD_WIDTH/2)/BOARD_WIDTH; // scale height if (i < 7) { /* Find some defaults; use the nearest known size */ SizeDefaults *szd, *nearest; @@ -1075,6 +1074,10 @@ main (int argc, char **argv) tinyLayout = szd->tinyLayout; // [HGM] font: use defaults from settings file if available and not overruled } + if(BOARD_WIDTH != 8) { + squareSize = (squareSize*8 + BOARD_WIDTH/2)/BOARD_WIDTH; // keep width the same + lineGap = (squareSize < 37 ? 1 : squareSize < 59 ? 2 : squareSize < 116 ? 3 : 4); + } defaultLineGap = lineGap; if(appData.overrideLineGap >= 0) lineGap = appData.overrideLineGap; @@ -1775,7 +1778,7 @@ void ModeHighlight () { static int oldPausing = FALSE; - static GameMode oldmode = (GameMode) -1; + static GameMode oldMode = (GameMode) -1; char *wname; if (!boardWidget) return; @@ -1793,7 +1796,7 @@ ModeHighlight () } } - wname = ModeToWidgetName(oldmode); + wname = ModeToWidgetName(oldMode); if (wname != NULL) { MarkMenuItem(wname, False); } @@ -1801,8 +1804,9 @@ ModeHighlight () if (wname != NULL) { MarkMenuItem(wname, True); } - oldmode = gameMode; + if(oldMode == TwoMachinesPlay) EnableNamedMenuItem("Mode.MachineMatch", True); MarkMenuItem("Mode.MachineMatch", matchMode && matchGame < appData.matchGames); + oldMode = gameMode; /* Maybe all the enables should be handled here, not just this one */ EnableNamedMenuItem("Mode.Training", gameMode == Training || gameMode == PlayFromGameFile);