/*\r
* wgamelist.c -- Game list window for WinBoard\r
- * $Id: wgamelist.c,v 2.1 2003/10/27 19:21:02 mann Exp $\r
*\r
* Copyright 1995,2009 Free Software Foundation, Inc.\r
*\r
+ * Enhancements Copyright 2005 Alessandro Scotti\r
+ *\r
* ------------------------------------------------------------------------\r
*\r
* GNU XBoard is free software: you can redistribute it and/or modify\r
#include "wsnap.h"\r
#include "wgamelist.h"\r
\r
+extern BoardSize boardSize;\r
+\r
/* Module globals */\r
HWND gameListDialog = NULL;\r
BOOLEAN gameListUp = FALSE;\r
/* Initialize the dialog items */\r
hwndText = GetDlgItem(hDlg, OPT_TagsText);\r
\r
+ /* Set font */\r
+ SendDlgItemMessage( hDlg, OPT_GameListText, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0 ));\r
+\r
count = GameListToListBox( hDlg, gameListDialog ? TRUE : FALSE, NULL, &stats );\r
\r
SendDlgItemMessage( hDlg, IDC_GameListFilter, WM_SETTEXT, 0, (LPARAM) "" );\r
CmailLoadGame(gameFile, nItem + 1, gameFileName, TRUE);\r
}\r
else {\r
+ SetFocus(hwndMain); // [HGM] automatic focus switch\r
LoadGame(gameFile, nItem + 1, gameFileName, TRUE);\r
}\r
}\r
if (gameListDialog) {\r
SendMessage(gameListDialog, WM_INITDIALOG, 0, 0);\r
if (!gameListUp) ShowWindow(gameListDialog, SW_SHOW);\r
+ else SetFocus(gameListDialog);\r
} else {\r
lpProc = MakeProcInstance((FARPROC)GameListDialog, hInst);\r
CreateDialog(hInst, MAKEINTRESOURCE(DLG_GameList),\r
VOID ShowGameListProc()\r
{\r
if (gameListUp) {\r
- GameListPopDown();\r
+ if(gameListDialog) SetFocus(gameListDialog);\r
+// GameListPopDown();\r
} else {\r
if (gameFileName) {\r
GameListPopUp(gameFile, gameFileName);\r