X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwgamelist.c;h=e31f184128e19180c407d08de71203cd49fac73f;hb=f24db00b2a6580f64ed6c0863888ec8fa3c2907a;hp=196c837ebbc07b393b868724dcc00cc74ee984f2;hpb=8c1ad5e219719bafa41bf36446f298ac71001b8e;p=xboard.git diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index 196c837..e31f184 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -48,16 +48,8 @@ static BOOLEAN gameListUp = FALSE; static FILE* gameFile; static char* gameFileName = NULL; -struct GameListStats -{ - int white_wins; - int black_wins; - int drawn; - int unfinished; -}; - /* [AS] Setup the game list according to the specified filter */ -static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats, BOOL byPos, BOOL narrow ) +int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats, BOOL byPos, BOOL narrow ) { ListGame * lg = (ListGame *) gameList.head; int nItem; @@ -66,6 +58,9 @@ static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct int count = 0; struct GameListStats dummy; + if(!hDlg) hDlg = gameListDialog; // [HGM] to allow calling from Game List Options dialog + if(!hDlg) return 0; + /* Initialize stats (use a dummy variable if caller not interested in them) */ if( stats == NULL ) { stats = &dummy; @@ -95,7 +90,7 @@ static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct if(nItem % 2000 == 0) { snprintf(buf, MSG_SIZ, _("Scanning through games (%d)"), nItem); - SetWindowText(hwndMain, buf); + SetWindowText(hwndMain, buf); DoEvents(); } if(!narrow || lg->position >= 0) {