X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=04924c76355c45bf34db53d8378c44cfdb4b6274;hb=76b990b9df6ffb52f1892d5415f38edf315a62d4;hp=7e1603ed7614e51252577cab464d87953e3213e9;hpb=6fe7aab20b1c5ca80116f37a7274e8b2137ebd64;p=xboard.git diff --git a/xoptions.c b/xoptions.c index 7e1603e..04924c7 100644 --- a/xoptions.c +++ b/xoptions.c @@ -1483,10 +1483,8 @@ void SettingsPopUp(ChessProgramState *cps) form = XtCreateManagedWidget(layoutName, formWidgetClass, layout, formArgs, XtNumber(formArgs)); - last = NULL; for(i=0; inrOptions; i++) { - Widget box; switch(cps->option[i].type) { case Spin: sprintf(def, "%d", cps->option[i].value); @@ -1510,16 +1508,18 @@ void SettingsPopUp(ChessProgramState *cps) edit = last; cps->option[i].handle = (void*) (last = XtCreateManagedWidget("text", asciiTextWidgetClass, form, args, j)); - XtAddEventHandler(box, ButtonPressMask, False, SetFocus, (XtPointer) popup); + XtAddEventHandler(last, ButtonPressMask, False, SetFocus, (XtPointer) popup); if(cps->option[i].type == TextBox) break; + // add increment and decrement controls for spin j=0; XtSetArg(args[j], XtNfromVert, edit); j++; - XtSetArg(args[j], XtNfromHoriz, box); j++; + XtSetArg(args[j], XtNfromHoriz, last); j++; XtSetArg(args[j], XtNheight, 10); j++; XtSetArg(args[j], XtNwidth, 20); j++; edit = XtCreateManagedWidget("+", commandWidgetClass, form, args, j); XtAddCallback(edit, XtNcallback, SpinCallback, (XtPointer) i); + j=0; XtSetArg(args[j], XtNfromVert, edit); j++; XtSetArg(args[j], XtNfromHoriz, last); j++;