#include <pwd.h>
#include <math.h>
#include <cairo/cairo.h>
-#include <cairo/cairo-xlib.h>
#include <gtk/gtk.h>
#if !OMIT_SOCKETS
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));
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;
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;
boardWidget = optList[W_BOARD].handle;
menuBarWidget = optList[W_MENU].handle;
dropMenu = optList[W_DROP].handle;
- titleWidget = optList[optList[W_TITLE].type != -1 ? W_TITLE : W_SMALL].handle;
+ titleWidget = optList[optList[W_TITLE].type != Skip ? W_TITLE : W_SMALL].handle;
#ifdef TODO_GTK
formWidget = XtParent(boardWidget);
XtSetArg(args[0], XtNbackground, &timerBackgroundPixel);
ModeHighlight ()
{
static int oldPausing = FALSE;
- static GameMode oldmode = (GameMode) -1;
+ static GameMode oldMode = (GameMode) -1;
char *wname;
if (!boardWidget) return;
}
}
- wname = ModeToWidgetName(oldmode);
+ wname = ModeToWidgetName(oldMode);
if (wname != NULL) {
MarkMenuItem(wname, False);
}
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);
{
gchar *text=NULL;
GtkClipboard *cb;
- guint len=0;
+ guint len=0; int flip = appData.flipView;
FILE* f;
// get game from clipboard
fclose(f);
// load from file
+ if(!appData.autoFlipView) appData.flipView = flipView;
LoadGameFromFile(gamePasteFilename, 0, gamePasteFilename, TRUE);
+ appData.flipView = flip;
return;
}