#define OPT_GameListPrev 1010\r
#define OPT_GameListText 1011\r
#define OPT_GameListLoad 1012\r
+#define OPT_GameListNarrow 1010\r
#define OPT_GameListNext 1013\r
#define OPT_GameListClose 1014\r
#define DLG_EditTags 1015\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 )\r
+static 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
SetWindowText(hwndMain, buf);\r
}\r
\r
+ if(!narrow || lg->position >= 0) {\r
if( hasFilter ) {\r
st = GameListLine(lg->number, &lg->gameInfo);\r
if( !SearchPattern( st, pszFilter) ) skip = TRUE;\r
if( (pos = GameContainsPosition(gameFile, lg)) < 0) skip = TRUE;\r
}\r
\r
- lg->position = pos;\r
-\r
if( ! skip ) {\r
if(!st) st = GameListLine(lg->number, &lg->gameInfo);\r
SendDlgItemMessage(hDlg, OPT_GameListText, LB_ADDSTRING, 0, (LPARAM) st);\r
stats->drawn++;\r
else\r
stats->unfinished++;\r
+ if(!byPos) pos = 0;\r
}\r
+ }\r
+\r
+ lg->position = pos;\r
\r
if(st) free(st);\r
lg = (ListGame *) lg->node.succ;\r
/* Set font */\r
SendDlgItemMessage( hDlg, OPT_GameListText, WM_SETFONT, (WPARAM)font[boardSize][GAMELIST_FONT]->hf, MAKELPARAM(TRUE, 0 ));\r
\r
- count = GameListToListBox( hDlg, gameListDialog ? TRUE : FALSE, NULL, &stats, FALSE );\r
+ count = GameListToListBox( hDlg, gameListDialog ? TRUE : FALSE, NULL, &stats, FALSE, FALSE );\r
\r
SendDlgItemMessage( hDlg, IDC_GameListFilter, WM_SETTEXT, 0, (LPARAM) "" );\r
SendDlgItemMessage( hDlg, IDC_GameListFilter, EM_SETLIMITTEXT, MAX_FILTER_LENGTH, 0 );\r
break; /* load the game*/\r
\r
case OPT_GameListPrev:\r
+#if 0\r
nItem = SendDlgItemMessage(hDlg, OPT_GameListText, LB_GETCURSEL, 0, 0);\r
nItem--;\r
if (nItem < 0) {\r
}\r
SendDlgItemMessage(hDlg, OPT_GameListText, LB_SETCURSEL, nItem, 0);\r
break; /* load the game*/\r
-\r
+#endif\r
/* [AS] */\r
case OPT_GameListFind:\r
case IDC_GameListDoFilter:\r
\r
if( GetDlgItemText( hDlg, IDC_GameListFilter, filter, sizeof(filter) ) >= 0 ) {\r
filter[ sizeof(filter)-1 ] = '\0';\r
- count = GameListToListBox( hDlg, TRUE, filter, &stats, LOWORD(wParam)!=IDC_GameListDoFilter );\r
+ count = GameListToListBox( hDlg, TRUE, filter, &stats, LOWORD(wParam)!=IDC_GameListDoFilter, LOWORD(wParam)==OPT_GameListNarrow );\r
GameListUpdateTitle( hDlg, _("Game List"), count, ((ListGame *) gameList.tailPred)->number, &stats );\r
}\r
}\r
LTEXT "(unofficial version ""X"")",IDC_STATIC,68,154,71,8\r
END\r
\r
-DLG_GameList DIALOG DISCARDABLE 6, 18, 259, 153\r
+DLG_GameList DIALOG DISCARDABLE 6, 18, 282, 153\r
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME\r
CAPTION "Game List"\r
FONT 8, "MS Sans Serif"\r
BEGIN\r
- LISTBOX OPT_GameListText,2,2,254,130,LBS_NOINTEGRALHEIGHT | \r
+ LISTBOX OPT_GameListText,2,2,277,130,LBS_NOINTEGRALHEIGHT | \r
WS_VSCROLL | WS_HSCROLL | WS_TABSTOP\r
PUSHBUTTON "&Thresholds",OPT_GameListLoad,2,136,40,15\r
PUSHBUTTON "&Find Position",OPT_GameListFind,45,136,48,15\r
- PUSHBUTTON "&Close",OPT_GameListClose,96,136,30,15\r
- PUSHBUTTON ">",OPT_GameListNext,129,136,17,15\r
- PUSHBUTTON "&Filter",IDC_GameListDoFilter,149,136,25,14\r
- EDITTEXT IDC_GameListFilter,178,136,78,14,ES_AUTOHSCROLL\r
+ PUSHBUTTON "&Narrow",OPT_GameListNarrow,96,136,30,15\r
+ PUSHBUTTON "&Close",OPT_GameListClose,129,136,20,15\r
+ PUSHBUTTON ">",OPT_GameListNext,152,136,17,15\r
+ PUSHBUTTON "&Filter",IDC_GameListDoFilter,172,136,25,14\r
+ EDITTEXT IDC_GameListFilter,201,136,78,14,ES_AUTOHSCROLL\r
END\r
\r
DLG_EditTags DIALOG DISCARDABLE 6, 18, 167, 140\r