Fix of bad bug
authorH.G. Muller <h.g.muller@hccnet.nl>
Wed, 15 Jul 2009 18:30:37 +0000 (12:30 -0600)
committerEric Mullins <emwine@earthlink.net>
Wed, 15 Jul 2009 18:30:37 +0000 (12:30 -0600)
xoptions.c

index 7e1603e..04924c7 100644 (file)
@@ -1483,10 +1483,8 @@ void SettingsPopUp(ChessProgramState *cps)
     form =\r
       XtCreateManagedWidget(layoutName, formWidgetClass, layout,\r
                            formArgs, XtNumber(formArgs));\r
     form =\r
       XtCreateManagedWidget(layoutName, formWidgetClass, layout,\r
                            formArgs, XtNumber(formArgs));\r
-  \r
     last = NULL;\r
     for(i=0; i<cps->nrOptions; i++) {\r
     last = NULL;\r
     for(i=0; i<cps->nrOptions; i++) {\r
-       Widget box;\r
        switch(cps->option[i].type) {\r
          case Spin:\r
            sprintf(def, "%d", cps->option[i].value);\r
        switch(cps->option[i].type) {\r
          case Spin:\r
            sprintf(def, "%d", cps->option[i].value);\r
@@ -1510,16 +1508,18 @@ void SettingsPopUp(ChessProgramState *cps)
            edit = last;\r
            cps->option[i].handle = (void*)\r
                (last = XtCreateManagedWidget("text", asciiTextWidgetClass, form, args, j));   \r
            edit = last;\r
            cps->option[i].handle = (void*)\r
                (last = XtCreateManagedWidget("text", asciiTextWidgetClass, form, args, j));   \r
-           XtAddEventHandler(box, ButtonPressMask, False, SetFocus, (XtPointer) popup);\r
+           XtAddEventHandler(last, ButtonPressMask, False, SetFocus, (XtPointer) popup);\r
            if(cps->option[i].type == TextBox) break;\r
            if(cps->option[i].type == TextBox) break;\r
+\r
            // add increment and decrement controls for spin\r
            j=0;\r
            XtSetArg(args[j], XtNfromVert, edit);  j++;\r
            // add increment and decrement controls for spin\r
            j=0;\r
            XtSetArg(args[j], XtNfromVert, edit);  j++;\r
-           XtSetArg(args[j], XtNfromHoriz, box);  j++;\r
+           XtSetArg(args[j], XtNfromHoriz, last);  j++;\r
            XtSetArg(args[j], XtNheight, 10);  j++;\r
            XtSetArg(args[j], XtNwidth, 20);  j++;\r
            edit = XtCreateManagedWidget("+", commandWidgetClass, form, args, j);\r
            XtAddCallback(edit, XtNcallback, SpinCallback, (XtPointer) i);\r
            XtSetArg(args[j], XtNheight, 10);  j++;\r
            XtSetArg(args[j], XtNwidth, 20);  j++;\r
            edit = XtCreateManagedWidget("+", commandWidgetClass, form, args, j);\r
            XtAddCallback(edit, XtNcallback, SpinCallback, (XtPointer) i);\r
+\r
            j=0;\r
            XtSetArg(args[j], XtNfromVert, edit);  j++;\r
            XtSetArg(args[j], XtNfromHoriz, last);  j++;\r
            j=0;\r
            XtSetArg(args[j], XtNfromVert, edit);  j++;\r
            XtSetArg(args[j], XtNfromHoriz, last);  j++;\r