X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwgamelist.c;h=d0b624c2d012bba262ad4d4a891dccc655049ef1;hb=d628e1610653266459dfec9aad86aa6615ea886a;hp=c5a25f59daf2ccd6cedce854e733fd258947a901;hpb=d9f4b584106f4d7477158476ff792f6fa0b2630a;p=xboard.git diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index c5a25f5..d0b624c 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -1,7 +1,7 @@ /* * wgamelist.c -- Game list window for WinBoard * - * Copyright 1995, 2009, 2010, 2011 Free Software Foundation, Inc. + * Copyright 1995, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -86,11 +86,18 @@ static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct } } + if(byPos) InitSearch(); + for (nItem = 0; nItem < ((ListGame *) gameList.tailPred)->number; nItem++){ char * st = NULL; BOOL skip = FALSE; int pos = -1; + if(nItem % 2000 == 0) { + snprintf(buf, MSG_SIZ, _("Scanning through games (%d)"), nItem); + SetWindowText(hwndMain, buf); + } + if( hasFilter ) { st = GameListLine(lg->number, &lg->gameInfo); if( !SearchPattern( st, pszFilter) ) skip = TRUE; @@ -123,6 +130,7 @@ static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct } SendDlgItemMessage(hDlg, OPT_GameListText, LB_SETCURSEL, 0, 0); + SetWindowText(hwndMain, "WinBoard"); return count; } @@ -293,7 +301,7 @@ GameListDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) SendDlgItemMessage(hDlg, OPT_GameListText, LB_SETCURSEL, nItem, 0); break; /* load the game*/ -// case OPT_GameListPrev: + case OPT_GameListPrev: nItem = SendDlgItemMessage(hDlg, OPT_GameListText, LB_GETCURSEL, 0, 0); nItem--; if (nItem < 0) { @@ -305,7 +313,7 @@ GameListDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) break; /* load the game*/ /* [AS] */ - case OPT_GameListPrev: + case OPT_GameListFind: case IDC_GameListDoFilter: { char filter[MAX_FILTER_LENGTH+1];