static FILE* gameFile;\r
static char* gameFileName = NULL;\r
\r
-struct GameListStats\r
-{\r
- int white_wins;\r
- int black_wins;\r
- int drawn;\r
- int unfinished;\r
-};\r
-\r
/* [AS] Setup the game list according to the specified filter */\r
-static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats, BOOL byPos, BOOL narrow )\r
+int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats, BOOL byPos, BOOL narrow )\r
{\r
ListGame * lg = (ListGame *) gameList.head;\r
int nItem;\r
int count = 0;\r
struct GameListStats dummy;\r
\r
+ if(!hDlg) hDlg = gameListDialog; // [HGM] to allow calling from Game List Options dialog\r
+ if(!hDlg) return 0;\r
+\r
/* Initialize stats (use a dummy variable if caller not interested in them) */\r
if( stats == NULL ) {\r
stats = &dummy;\r
result = DialogBoxParam( hInst, MAKEINTRESOURCE(DLG_GameListOptions), hwndMain, (DLGPROC)lpProc, (LPARAM)lpUserGLT );\r
\r
if( result == 0 ) {\r
+ char *oldTags = appData.gameListTags;\r
/* [AS] Memory leak here! */\r
appData.gameListTags = strdup( lpUserGLT ); \r
+ if(strcmp(oldTags, appData.gameListTags)) // [HGM] redo Game List when we changed something\r
+ GameListToListBox(NULL, TRUE, ".", NULL, FALSE, FALSE); // "." as filter is kludge to select all\r
}\r
\r
return result;\r
int outCount = SOCKET_ERROR;\r
ChildProc *cp = (ChildProc *) pr;\r
static OVERLAPPED ovl;\r
+\r
static int line = 0;\r
\r
if (pr == NoProc)\r
\r
extern HWND engineOutputDialog;\r
\r
+struct GameListStats\r
+{\r
+ int white_wins;\r
+ int black_wins;\r
+ int drawn;\r
+ int unfinished;\r
+};\r
+\r
+int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats, BOOL byPos, BOOL narrow );\r
VOID ShowGameListProc(void);\r
extern HWND gameListDialog;\r
\r