From: H.G. Muller Date: Wed, 30 Mar 2011 16:17:58 +0000 (+0200) Subject: Remember Tags and Comment dialog coordinates X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d0b1d703d860216be661b8b2db99817e9fdb09bf;p=xboard.git Remember Tags and Comment dialog coordinates The save-settings code now uses the shell and shellUp arrays from the GenericPopUp to read out the window coordinates for Tags and Comment window. Pointers used by GenericPopUp are set topoint to the corresponding WindowPlacement structs. --- diff --git a/xboard.c b/xboard.c index 32d9cb8..5f4cb0c 100644 --- a/xboard.c +++ b/xboard.c @@ -537,6 +537,9 @@ WindowPlacement wpEngineOutput; WindowPlacement wpGameList; WindowPlacement wpTags; +extern Widget shells[]; +extern Boolean shellUp[]; + #define SOLID 0 #define OUTLINE 1 Pixmap pieceBitmap[2][(int)BlackPawn]; @@ -1565,6 +1568,8 @@ GetWindowCoords() if(MoveHistoryIsUp()) GetActualPlacement(historyShell, &wpMoveHistory); if(EvalGraphIsUp()) GetActualPlacement(evalGraphShell, &wpEvalGraph); if(GameListIsUp()) GetActualPlacement(gameListShell, &wpGameList); + if(shellUp[1]) GetActualPlacement(shells[1], &wpComment); + if(shellUp[2]) GetActualPlacement(shells[2], &wpTags); } void diff --git a/xoptions.c b/xoptions.c index b51d385..37e6838 100644 --- a/xoptions.c +++ b/xoptions.c @@ -727,6 +727,7 @@ void CreateComboPopup(parent, name, n, mb) typedef void ButtonCallback(int n); +extern WindowPlacement wpComment, wpTags; char *trialSound; static int oldCores, oldPonder; int MakeColors P((void)); @@ -737,7 +738,7 @@ void GenericReadout(); Widget shells[10]; Widget marked[10]; Boolean shellUp[10]; -WindowPlacement *wp[10]; +WindowPlacement *wp[10] = { NULL, &wpComment, &wpTags }; Option *dialogOptions[10]; void MarkMenu(char *item, int dlgNr)