X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=cd18a57e41217b8735fa2a5a1f4a4f8412a3a82c;hb=7e0222e64da6706bf0dc2468f459b98e4346206b;hp=a475c588edeb020459f1106e64c22d691228392c;hpb=e46da46036e2db1411712cdadecd471a7acb8d3d;p=xboard.git diff --git a/xoptions.c b/xoptions.c index a475c58..cd18a57 100644 --- a/xoptions.c +++ b/xoptions.c @@ -143,6 +143,18 @@ static Arg formArgs[] = { }; void +MarkMenuItem (char *menuRef, int state) +{ + MenuItem *item = MenuNameToItem(menuRef); + + if(item) { + Arg args[2]; + XtSetArg(args[0], XtNleftBitmap, state ? xMarkPixmap : None); + XtSetValues(item->handle, args, 1); + } +} + +void GetWidgetText (Option *opt, char **buf) { Arg arg; @@ -781,7 +793,6 @@ GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent if(engineDlg) { // Settings popup for engine: format through heuristic int n = currentCps->nrOptions; - if(!n) { DisplayNote(_("Engine has no options")); currentCps = NULL; return 0; } if(n > 50) width = 4; else if(n>24) width = 2; else width = 1; height = n / width + 1; if(n && (currentOption[n-1].type == Button || currentOption[n-1].type == SaveButton)) currentOption[n].min = SAME_ROW; // OK on same line