Fix registering of EditTagsProg
[xboard.git] / winboard / winboard.c
index 85088b8..6f26f2b 100644 (file)
@@ -249,7 +249,7 @@ Boolean barbaric; // flag indicating if translation is needed
 #define ABOUTBOX -1  /* not sure why these are needed */\r
 #define ABOUTBOX2 -1\r
 \r
-int dialogItems[][41   ] = {\r
+int dialogItems[][42] = {\r
 { ABOUTBOX, IDOK, OPT_MESS, 400 }, \r
 { DLG_TimeControl, IDC_Babble, OPT_TCUseMoves, OPT_TCUseInc, OPT_TCUseFixed, \r
   OPT_TCtext1, OPT_TCtext2, OPT_TCitext1, OPT_TCitext2, OPT_TCftext, GPB_Factors,   IDC_Factor1, IDC_Factor2, IDOK, IDCANCEL }, \r
@@ -302,7 +302,7 @@ int dialogItems[][41        ] = {
   OPT_ChooseLightSquareColor, OPT_ChooseDarkSquareColor, OPT_ChooseWhitePieceColor,\r
   OPT_ChooseBlackPieceColor, OPT_ChooseHighlightSquareColor, OPT_ChoosePremoveHighlightColor,\r
   OPT_Monochrome, OPT_AllWhite, OPT_UpsideDown, OPT_DefaultBoardColors, GPB_Colors,\r
-  IDC_Light, IDC_Dark, IDC_White, IDC_Black, IDC_High, IDC_PreHigh, GPB_Size, OPT_Bitmaps, OPT_PieceFont }, \r
+  IDC_Light, IDC_Dark, IDC_White, IDC_Black, IDC_High, IDC_PreHigh, GPB_Size, OPT_Bitmaps, OPT_PieceFont, OPT_Grid }, \r
 { DLG_NewVariant, IDOK, IDCANCEL, OPT_VariantNormal, OPT_VariantFRC, OPT_VariantWildcastle,\r
   OPT_VariantNocastle, OPT_VariantLosers, OPT_VariantGiveaway, OPT_VariantSuicide,\r
   OPT_Variant3Check, OPT_VariantTwoKings, OPT_VariantAtomic, OPT_VariantCrazyhouse,\r
@@ -1139,15 +1139,6 @@ InitInstance(HINSTANCE hInstance, int nCmdShow, LPSTR lpCmdLine)
                  0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);\r
 #endif\r
     ShowWindow(hwndConsole, nCmdShow);\r
-    if(appData.chatBoxes) { // [HGM] chat: open chat boxes\r
-      char buf[MSG_SIZ], *p = buf, *q;\r
-       safeStrCpy(buf, appData.chatBoxes, sizeof(buf)/sizeof(buf[0]) );\r
-      do {\r
-       q = strchr(p, ';');\r
-       if(q) *q++ = 0;\r
-       if(*p) ChatPopUp(p);\r
-      } while(p=q);\r
-    }\r
     SetActiveWindow(hwndConsole);\r
   }\r
   if(!appData.noGUI)   UpdateWindow(hwnd);  else ShowWindow(hwnd, SW_MINIMIZE);\r
@@ -8553,7 +8544,19 @@ DisplayIcsInteractionTitle(char *str)
   char consoleTitle[MSG_SIZ];\r
 \r
     snprintf(consoleTitle, MSG_SIZ, "%s: %s", szConsoleTitle, str);\r
-  SetWindowText(hwndConsole, consoleTitle);\r
+    SetWindowText(hwndConsole, consoleTitle);\r
+\r
+    if(appData.chatBoxes) { // [HGM] chat: open chat boxes\r
+      char buf[MSG_SIZ], *p = buf, *q;\r
+       safeStrCpy(buf, appData.chatBoxes, sizeof(buf)/sizeof(buf[0]) );\r
+      do {\r
+       q = strchr(p, ';');\r
+       if(q) *q++ = 0;\r
+       if(*p) ChatPopUp(p);\r
+      } while(p=q);\r
+    }\r
+\r
+    SetActiveWindow(hwndMain);\r
 }\r
 \r
 void\r