X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwgamelist.c;h=3c13ae61e2fd893483476df6323a2b4ea006bdb0;hb=39d0c966eae95ac31ffca6cec476e896bed31bf6;hp=e1bf9782534996d63e2513e2fdd9d2cb27f94975;hpb=0efdc4c5ef60cf4c15e9dddf3658d2115e4d5d93;p=xboard.git diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index e1bf978..3c13ae6 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -2,24 +2,26 @@ * wgamelist.c -- Game list window for WinBoard * $Id: wgamelist.c,v 2.1 2003/10/27 19:21:02 mann Exp $ * - * Copyright 1995 Free Software Foundation, Inc. + * Copyright 1995,2009 Free Software Foundation, Inc. * * ------------------------------------------------------------------------ - * This program is free software; you can redistribute it and/or modify + * + * GNU XBoard is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU XBoard is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * ------------------------------------------------------------------------ - */ + * along with this program. If not, see http://www.gnu.org/licenses/. * + * + *------------------------------------------------------------------------ + ** See the file ChangeLog for a revision history. */ + #include "config.h" #include /* required for all Windows applications */ @@ -37,17 +39,18 @@ #include "backend.h" #include "wsnap.h" +#include "wgamelist.h" /* Module globals */ HWND gameListDialog = NULL; BOOLEAN gameListUp = FALSE; FILE* gameFile; char* gameFileName = NULL; -int gameListX, gameListY, gameListW, gameListH; /* Imports from winboard.c */ extern HINSTANCE hInst; extern HWND hwndMain; +extern WindowPlacement wpGameList; struct GameListStats { @@ -235,18 +238,18 @@ GameListDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) GetClientRect(hDlg, &rect); sizeX = rect.right; sizeY = rect.bottom; - if (gameListX != CW_USEDEFAULT && gameListY != CW_USEDEFAULT && - gameListW != CW_USEDEFAULT && gameListH != CW_USEDEFAULT) { + if (wpGameList.x != CW_USEDEFAULT && wpGameList.y != CW_USEDEFAULT && + wpGameList.width != CW_USEDEFAULT && wpGameList.height != CW_USEDEFAULT) { WINDOWPLACEMENT wp; - EnsureOnScreen(&gameListX, &gameListY); + EnsureOnScreen(&wpGameList.x, &wpGameList.y, 0, 0); wp.length = sizeof(WINDOWPLACEMENT); wp.flags = 0; wp.showCmd = SW_SHOW; wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0; - wp.rcNormalPosition.left = gameListX; - wp.rcNormalPosition.right = gameListX + gameListW; - wp.rcNormalPosition.top = gameListY; - wp.rcNormalPosition.bottom = gameListY + gameListH; + wp.rcNormalPosition.left = wpGameList.x; + wp.rcNormalPosition.right = wpGameList.x + wpGameList.width; + wp.rcNormalPosition.top = wpGameList.y; + wp.rcNormalPosition.bottom = wpGameList.y + wpGameList.height; SetWindowPlacement(hDlg, &wp); GetClientRect(hDlg, &rect);