Put 'Load Next' button back in WB Game List
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 26 Aug 2011 10:44:08 +0000 (12:44 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sun, 23 Oct 2011 14:18:48 +0000 (16:18 +0200)
The '>' button for loading the next (filtered) game is re-instated in the
WinBoard GameList. The main window has now accelerator keys Ctrl+Up and
Ctrl+Down for loading the previous and next filtered game.

winboard/resource.h
winboard/wgamelist.c
winboard/winboard.c
winboard/winboard.rc

index 36822ef..d59e60a 100644 (file)
 #define OPT_MessageFont8                1978\r
 #define OPT_SamplePieceFont             1979\r
 #define OPT_ChoosePieceFont             1980\r
+#define OPT_GameListFind                1981\r
 \r
 \r
 // Next default values for new objects\r
index 382f061..06c0684 100644 (file)
@@ -301,7 +301,7 @@ GameListDialog(HWND hDlg, UINT message,     WPARAM wParam, LPARAM lParam)
       SendDlgItemMessage(hDlg, OPT_GameListText, LB_SETCURSEL, nItem, 0);\r
       break; /* load the game*/\r
 \r
-//    case OPT_GameListPrev:\r
+    case OPT_GameListPrev:\r
       nItem = SendDlgItemMessage(hDlg, OPT_GameListText, LB_GETCURSEL, 0, 0);\r
       nItem--;\r
       if (nItem < 0) {\r
@@ -313,7 +313,7 @@ GameListDialog(HWND hDlg, UINT message,     WPARAM wParam, LPARAM lParam)
       break; /* load the game*/\r
 \r
     /* [AS] */\r
-    case OPT_GameListPrev:\r
+    case OPT_GameListFind:\r
     case IDC_GameListDoFilter:\r
         {\r
             char filter[MAX_FILTER_LENGTH+1];\r
index 54a93fe..7a5860a 100644 (file)
@@ -5063,6 +5063,11 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
       SetFocus(hwndMain);\r
       break;\r
 \r
+    case OPT_GameListNext: // [HGM] forward these two accelerators to Game List\r
+    case OPT_GameListPrev:\r
+      if(gameListDialog) SendMessage(gameListDialog, WM_COMMAND, wmId, 0);\r
+      break;\r
+\r
     case IDM_Revert:\r
       RevertEvent(FALSE);\r
       break;\r
index ebb77b8..5713678 100644 (file)
@@ -267,8 +267,9 @@ BEGIN
     LISTBOX         OPT_GameListText,2,2,254,130,LBS_NOINTEGRALHEIGHT | \r
                     WS_VSCROLL | WS_HSCROLL | WS_TABSTOP\r
     PUSHBUTTON      "&Thresholds",OPT_GameListLoad,2,136,40,15\r
-    PUSHBUTTON      "&Find Position",OPT_GameListPrev,45,136,48,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
 END\r
@@ -1530,6 +1531,8 @@ BEGIN
     VK_RIGHT,       IDM_Forward,            VIRTKEY, NOINVERT\r
     VK_DOWN,        IDM_ToEnd,              VIRTKEY, NOINVERT\r
     VK_UP,          IDM_ToStart,            VIRTKEY, NOINVERT\r
+    VK_DOWN,        OPT_GameListNext,       VIRTKEY, CONTROL, NOINVERT\r
+    VK_UP,          OPT_GameListPrev,       VIRTKEY, CONTROL, NOINVERT\r
 #endif\r
 END\r
 \r