From: H.G. Muller Date: Mon, 12 Jul 2010 09:10:17 +0000 (+0200) Subject: Fix WinBoard game-list title X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=5abce92da74b24ecbb925e18fd61d53f57db26e5;p=xboard.git Fix WinBoard game-list title Number of displayed games and WDL stats were always appended to the existing title, leading to an ever-growing title in the game-list window. Now the old actual title is ignored, and the starts is appended to the original title "Game List". (In the future we could use the filename here?) In addition, the title was not updated when re-opening the game-list window, while the stats could change if filtering was active when the window was closed. (In that case the filter is cleared on re-opening, so the number of displayed games changes.) Now a title-update (after recalculating the stats) is done every time the game-list window is opened. --- diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index 50d2978..d736a8d 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -204,8 +204,8 @@ GameListDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) else GetActualPlacement( gameListDialog, &wpGameList ); - GameListUpdateTitle( hDlg, szDlgTitle, count, ((ListGame *) gameList.tailPred)->number, &stats ); } + GameListUpdateTitle( hDlg, "Game List", count, ((ListGame *) gameList.tailPred)->number, &stats ); return FALSE; case WM_SIZE: @@ -299,7 +299,7 @@ GameListDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) if( GetDlgItemText( hDlg, IDC_GameListFilter, filter, sizeof(filter) ) >= 0 ) { filter[ sizeof(filter)-1 ] = '\0'; count = GameListToListBox( hDlg, TRUE, filter, &stats ); - GameListUpdateTitle( hDlg, szDlgTitle, count, ((ListGame *) gameList.tailPred)->number, &stats ); + GameListUpdateTitle( hDlg, "Game List", count, ((ListGame *) gameList.tailPred)->number, &stats ); } } return FALSE;