From 5abce92da74b24ecbb925e18fd61d53f57db26e5 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 12 Jul 2010 11:10:17 +0200 Subject: [PATCH] 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. --- winboard/wgamelist.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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; -- 1.7.0.4