From 3f3e635b9d6b566d2f696d77c91fc3a10ba41680 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 19 Feb 2013 18:52:41 +0100 Subject: [PATCH] Remember window params of slave board The slave board now has been assigned a WindowPlacement, which is also saved in the settings file, through new options -slaveX/Y/W/H. --- args.h | 6 ++++++ dialogs.h | 2 +- gtk/xboard.c | 1 + gtk/xoptions.c | 2 +- xaw/xboard.c | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/args.h b/args.h index 43d5203..469bc49 100644 --- a/args.h +++ b/args.h @@ -772,6 +772,12 @@ ArgDescriptor argDescriptors[] = { { "gameListY", ArgY, (void *) &wpGameList.y, TRUE, (ArgIniType) CW_USEDEFAULT }, { "gameListW", ArgInt, (void *) &wpGameList.width, TRUE, (ArgIniType) CW_USEDEFAULT }, { "gameListH", ArgInt, (void *) &wpGameList.height, TRUE, (ArgIniType) CW_USEDEFAULT }, +#if XBOARD + { "slaveX", ArgX, (void *) &wpDualBoard.x, TRUE, (ArgIniType) CW_USEDEFAULT }, + { "slaveY", ArgY, (void *) &wpDualBoard.y, TRUE, (ArgIniType) CW_USEDEFAULT }, + { "slaveW", ArgInt, (void *) &wpDualBoard.width, TRUE, (ArgIniType) CW_USEDEFAULT }, + { "slaveH", ArgInt, (void *) &wpDualBoard.height, TRUE, (ArgIniType) CW_USEDEFAULT }, +#endif /* [AS] Layout stuff */ { "moveHistoryUp", ArgBoolean, (void *) &wpMoveHistory.visible, TRUE, (ArgIniType) TRUE }, { "moveHistoryX", ArgX, (void *) &wpMoveHistory.x, TRUE, (ArgIniType) CW_USEDEFAULT }, diff --git a/dialogs.h b/dialogs.h index c237215..6d7e2b5 100644 --- a/dialogs.h +++ b/dialogs.h @@ -125,7 +125,7 @@ extern int dialogError; extern ButtonCallback *comboCallback; extern void *userLogo; -extern WindowPlacement wpComment, wpTags, wpMoveHistory, wpMain; +extern WindowPlacement wpComment, wpTags, wpMoveHistory, wpMain, wpDualBoard; extern char *marked[]; extern Boolean shellUp[]; extern Option textOptions[], typeOptions[], dualOptions[], mainOptions[]; diff --git a/gtk/xboard.c b/gtk/xboard.c index a1e8c0a..e4c62c4 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -256,6 +256,7 @@ WindowPlacement wpEvalGraph; WindowPlacement wpEngineOutput; WindowPlacement wpGameList; WindowPlacement wpTags; +WindowPlacement wpDualBoard; /* This magic number is the number of intermediate frames used in each half of the animation. For short moves it's reduced diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 9687090..607aae2 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -634,7 +634,7 @@ AddHandler (Option *opt, DialogClass dlg, int nr) GtkWidget *shells[NrOfDialogs]; DialogClass parents[NrOfDialogs]; WindowPlacement *wp[NrOfDialogs] = { // Beware! Order must correspond to DialogClass enum - NULL, &wpComment, &wpTags, NULL, NULL, NULL, NULL, &wpMoveHistory, &wpGameList, &wpEngineOutput, &wpEvalGraph, + NULL, &wpComment, &wpTags, NULL, NULL, NULL, &wpDualBoard, &wpMoveHistory, &wpGameList, &wpEngineOutput, &wpEvalGraph, NULL, NULL, NULL, NULL, &wpMain }; diff --git a/xaw/xboard.c b/xaw/xboard.c index cdd93a9..a083e7c 100644 --- a/xaw/xboard.c +++ b/xaw/xboard.c @@ -317,6 +317,7 @@ WindowPlacement wpEvalGraph; WindowPlacement wpEngineOutput; WindowPlacement wpGameList; WindowPlacement wpTags; +WindowPlacement wpDualBoard; /* This magic number is the number of intermediate frames used -- 1.7.0.4