Fix Xaw for font damage
[xboard.git] / dialogs.c
index fe8f8cc..fddc8fd 100644 (file)
--- a/dialogs.c
+++ b/dialogs.c
@@ -1627,7 +1627,7 @@ static void AdjustFont P((int n));
 static int
 FontsOK (int n)
 {
-    extern Option historyOptions[], engoutOptions[], gamesOptions[];
+    extern Option historyOptions[], engoutOptions[], gamesOptions[], chatOptions[];
     int i;
     DisplayBothClocks();
     ApplyFont(&mainOptions[W_MESSG], NULL);
@@ -1637,12 +1637,14 @@ FontsOK (int n)
     ApplyFont(&engoutOptions[5], NULL);
     ApplyFont(&engoutOptions[12], NULL);
     ApplyFont(&gamesOptions[0], NULL);
+    ApplyFont(&chatOptions[11], appData.icsFont);
+    AppendColorized(&chatOptions[6], NULL, 0); // kludge to replace font tag
     DrawPosition(TRUE, NULL); // for coord font
     return 1;
 }
 
 static Option fontOptions[] = {
-  { 0,        60, 200, NULL, (void*) &appData.clockFont, NULL, NULL, TextBox, N_("Clocks:") },
+  { 0,        60, 200, NULL, (void*) &appData.clockFont, NULL, NULL, TextBox, N_("Clocks (requires restart):") },
   {    1, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("+") },
   {    2, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("-") },
   {    3, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("B") },
@@ -1652,7 +1654,7 @@ static Option fontOptions[] = {
   {    2, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("-") },
   {    3, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("B") },
   {    4, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("I") },
-  { 0,         60, 70, NULL, (void*) &appData.coordFont, NULL, NULL, TextBox, N_("Board coordinates:") },
+  { 0,         60, 70, NULL, (void*) &appData.icsFont, NULL, NULL, TextBox, N_("ICS Chat/Console:") },
   {    1, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("+") },
   {    2, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("-") },
   {    3, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("B") },
@@ -1677,7 +1679,7 @@ static Option fontOptions[] = {
   {    2, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("-") },
   {    3, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("B") },
   {    4, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("I") },
-  {   0,  0,    0, NULL, NULL, NULL, NULL, Label, N_("Generic type-face names are Sans, Monospace and Serif") },
+  {   0,  0,    0, NULL, NULL, NULL, NULL, Label, N_("\nGeneric type-face names are Sans, Monospace and Serif") },
   { 0, 0, 0, NULL, (void*) &FontsOK, "", NULL, EndMark , "" }
 };
 
@@ -1730,6 +1732,7 @@ void
 FontsProc ()
 {
     int i;
+    if(strstr(appData.font, "-*-")) { DisplayNote(_("This only works in the GTK build")); return; }
     GenericPopUp(fontOptions, _("Fonts"), TransientDlg, BoardWindow, MODAL, 0);
     for(i=0; i<6; i++) ApplyFont(&fontOptions[5*i], *(char**)fontOptions[5*i].target);
 }