From 76b990b9df6ffb52f1892d5415f38edf315a62d4 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 15 Jul 2009 12:30:37 -0600 Subject: [PATCH] Fix of bad bug --- xoptions.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) 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++; -- 1.7.0.4