From: H.G. Muller Date: Tue, 19 Feb 2013 17:52:41 +0000 (+0100) Subject: Remember window params of slave board X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=3f3e635b9d6b566d2f696d77c91fc3a10ba41680 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. --- 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