Fix Xaw button color error
authorH.G.Muller <hgm@hgm-xboard.(none)>
Thu, 11 Sep 2014 10:41:50 +0000 (12:41 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Thu, 11 Sep 2014 17:14:21 +0000 (19:14 +0200)
The textValue field, now also used to indicate font, was used in two
places when popping up buttons, and the font patch only addressed one.

xaw/xoptions.c

index adfedf9..9d59f4c 100644 (file)
@@ -1141,7 +1141,7 @@ GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent
                XtAddEventHandler(option[i-1].handle, KeyReleaseMask, False, ColorChanged, (XtPointer)(intptr_t) i-1);
            }
            XtAddCallback(last, XtNcallback, GenericCallback, (XtPointer)(intptr_t) i + (dlgNr<<16)); // invokes user callback
-           if(option[i].textValue) SetColor( option[i].textValue, &option[i]); // for new-variant buttons
+           if(option[i].textValue && *option[i].textValue == '#') SetColor( option[i].textValue, &option[i]); // for new-variant buttons
            break;
          case ComboBox:
            j = SetPositionAndSize(args, last, lastrow, 0 /* border */,