updated INSTALL file to add ./autogen.sh
[xboard.git] / xoptions.c
index 892ea55..04924c7 100644 (file)
@@ -1370,7 +1370,7 @@ void SettingsCallback(w, client_data, call_data)
                    XtGetValues(currentCps->option[i].handle, args, 1);\r
                    if(strcmp(currentCps->option[i].textValue, val)) {\r
                        strcpy(currentCps->option[i].textValue, val);\r
-                       sprintf(buf, _("option %s %s\n"), currentCps->option[i].name, val);\r
+                       sprintf(buf, "option %s=%s\n", currentCps->option[i].name, val);\r
                        SendToProgram(buf, currentCps);\r
                    }\r
                    break;\r
@@ -1382,7 +1382,7 @@ void SettingsCallback(w, client_data, call_data)
                    if(j < currentCps->option[i].min) j = currentCps->option[i].min;\r
                    if(currentCps->option[i].value != j) {\r
                        currentCps->option[i].value = j;\r
-                       sprintf(buf, _("option %s %d\n"), currentCps->option[i].name, j);\r
+                       sprintf(buf, "option %s=%d\n", currentCps->option[i].name, j);\r
                        SendToProgram(buf, currentCps);\r
                    }\r
                    break;\r
@@ -1392,14 +1392,14 @@ void SettingsCallback(w, client_data, call_data)
                    XtGetValues(currentCps->option[i].handle, args, 1);\r
                    if(currentCps->option[i].value != j) {\r
                        currentCps->option[i].value = j;\r
-                       sprintf(buf, _("option %s %d\n"), currentCps->option[i].name, j);\r
+                       sprintf(buf, "option %s=%d\n", currentCps->option[i].name, j);\r
                        SendToProgram(buf, currentCps);\r
                    }\r
                    break;\r
                case ComboBox:\r
                    if(currentCps->option[i].value != values[i]) {\r
                        currentCps->option[i].value = values[i];\r
-                       sprintf(buf, _("option %s %s\n"), currentCps->option[i].name, \r
+                       sprintf(buf, "option %s=%s\n", currentCps->option[i].name, \r
                                ((char**)currentCps->option[i].textValue)[values[i]]);\r
                        SendToProgram(buf, currentCps);\r
                    }\r
@@ -1407,13 +1407,13 @@ void SettingsCallback(w, client_data, call_data)
            }\r
        }\r
        if((int)client_data) { // send save-button command to engine\r
-           sprintf(buf, _("option %s\n"), name);\r
+           sprintf(buf, "option %s\n", name);\r
            SendToProgram(buf, currentCps);\r
        }\r
         SettingsPopDown();\r
         return;\r
     }\r
-    sprintf(buf, _("option %s\n"), name);\r
+    sprintf(buf, "option %s\n", name);\r
     SendToProgram(buf, currentCps);\r
 }\r
 \r
@@ -1483,10 +1483,8 @@ void SettingsPopUp(ChessProgramState *cps)
     form =\r
       XtCreateManagedWidget(layoutName, formWidgetClass, layout,\r
                            formArgs, XtNumber(formArgs));\r
-  \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
@@ -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
-           XtAddEventHandler(box, ButtonPressMask, False, SetFocus, (XtPointer) popup);\r
+           XtAddEventHandler(last, ButtonPressMask, False, SetFocus, (XtPointer) popup);\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
-           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
+\r
            j=0;\r
            XtSetArg(args[j], XtNfromVert, edit);  j++;\r
            XtSetArg(args[j], XtNfromHoriz, last);  j++;\r