From: H.G. Muller Date: Sat, 16 Apr 2011 11:40:16 +0000 (+0200) Subject: Fix gamelist highlight X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=1c36ced6dd39e157e3e94e24c253a93be9f8f4ed;p=xboard.git Fix gamelist highlight Reopening the gamelist should highlight the current game. --- diff --git a/backend.h b/backend.h index 32e15dd..20639c7 100644 --- a/backend.h +++ b/backend.h @@ -281,6 +281,7 @@ typedef struct _ListGame { extern ChessSquare gatingPiece; extern List gameList; +extern int lastLoadGameNumber; void ClearGameInfo P((GameInfo *)); int GameListBuild P((FILE *)); void GameListInitGameInfo P((GameInfo *)); diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index 80ce9b6..a496359 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -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: diff --git a/xgamelist.c b/xgamelist.c index 8839e90..41a43ce 100644 --- a/xgamelist.c +++ b/xgamelist.c @@ -516,6 +516,7 @@ ShowGameListProc(w, event, prms, nprms) XtSetArg(args[j], XtNleftBitmap, xMarkPixmap); j++; XtSetValues(XtNameToWidget(menuBarWidget, "menuView.Show Game List"), args, j); + GameListHighlight(lastLoadGameNumber); } void