X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwgamelist.c;h=5e3398963d3210fd4d67f30703696f395ea42c7c;hb=566205d159a20e4f86b54f5f2398b401df73d2e8;hp=3c13ae61e2fd893483476df6323a2b4ea006bdb0;hpb=d413d3ed517beac460ae9ed147e6200a57125bb5;p=xboard.git diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index 3c13ae6..5e33989 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -1,8 +1,9 @@ /* * wgamelist.c -- Game list window for WinBoard - * $Id: wgamelist.c,v 2.1 2003/10/27 19:21:02 mann Exp $ * - * Copyright 1995,2009 Free Software Foundation, Inc. + * Copyright 1995, 2009, 2010 Free Software Foundation, Inc. + * + * Enhancements Copyright 2005 Alessandro Scotti * * ------------------------------------------------------------------------ * @@ -41,6 +42,8 @@ #include "wsnap.h" #include "wgamelist.h" +extern BoardSize boardSize; + /* Module globals */ HWND gameListDialog = NULL; BOOLEAN gameListUp = FALSE; @@ -224,6 +227,9 @@ GameListDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) /* Initialize the dialog items */ hwndText = GetDlgItem(hDlg, OPT_TagsText); + /* Set font */ + SendDlgItemMessage( hDlg, OPT_GameListText, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0 )); + count = GameListToListBox( hDlg, gameListDialog ? TRUE : FALSE, NULL, &stats ); SendDlgItemMessage( hDlg, IDC_GameListFilter, WM_SETTEXT, 0, (LPARAM) "" ); @@ -414,6 +420,7 @@ GameListDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) CmailLoadGame(gameFile, nItem + 1, gameFileName, TRUE); } else { + SetFocus(hwndMain); // [HGM] automatic focus switch LoadGame(gameFile, nItem + 1, gameFileName, TRUE); } } @@ -440,6 +447,7 @@ VOID GameListPopUp(FILE *fp, char *filename) if (gameListDialog) { SendMessage(gameListDialog, WM_INITDIALOG, 0, 0); if (!gameListUp) ShowWindow(gameListDialog, SW_SHOW); + else SetFocus(gameListDialog); } else { lpProc = MakeProcInstance((FARPROC)GameListDialog, hInst); CreateDialog(hInst, MAKEINTRESOURCE(DLG_GameList), @@ -477,7 +485,8 @@ VOID GameListDestroy() VOID ShowGameListProc() { if (gameListUp) { - GameListPopDown(); + if(gameListDialog) SetFocus(gameListDialog); +// GameListPopDown(); } else { if (gameFileName) { GameListPopUp(gameFile, gameFileName);