X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwgamelist.c;h=863725a71ce63413dc3262cedbc691e158cd89e9;hb=48d27c1a58658e51013cca580e37840f54419e13;hp=48aa85d206966f40db4aaaf87e87c543cb1934f0;hpb=b382d988c6f886f3a49483df9e3e36de0b6b0824;p=xboard.git diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index 48aa85d..863725a 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -166,7 +166,7 @@ GameListDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) hwndText = GetDlgItem(hDlg, OPT_TagsText); /* Set font */ - SendDlgItemMessage( hDlg, OPT_GameListText, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0 )); + SendDlgItemMessage( hDlg, OPT_GameListText, WM_SETFONT, (WPARAM)font[boardSize][GAMELIST_FONT]->hf, MAKELPARAM(TRUE, 0 )); count = GameListToListBox( hDlg, gameListDialog ? TRUE : FALSE, NULL, &stats ); @@ -208,6 +208,7 @@ GameListDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) } GameListUpdateTitle( hDlg, _("Game List"), count, ((ListGame *) gameList.tailPred)->number, &stats ); // [HGM] always update title + GameListHighlight(lastLoadGameNumber); return FALSE; case WM_SIZE: @@ -406,9 +407,15 @@ VOID GameListPopDown(void) VOID GameListHighlight(int index) { + char buf[MSG_SIZ]; + int i, res = 0; if (gameListDialog == NULL) return; + for(i=0; res != LB_ERR; i++) { + res = SendDlgItemMessage( gameListDialog, OPT_GameListText, LB_GETTEXT, i, (LPARAM)buf ); + if(index <= atoi( buf )) break; + } SendDlgItemMessage(gameListDialog, OPT_GameListText, - LB_SETCURSEL, index - 1, 0); + LB_SETCURSEL, i, 0); }