From: Arun Persaud Date: Sun, 11 Dec 2011 00:06:47 +0000 (-0800) Subject: fix translation for engine list; fixes #34991 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=80878784de7c34ea15dbcc28c76830d21f9176f6;p=xboard.git fix translation for engine list; fixes #34991 * click on browse button should be recognized in translated versions * width of button should auto-scale --- diff --git a/xoptions.c b/xoptions.c index 60b1a47..fead296 100644 --- a/xoptions.c +++ b/xoptions.c @@ -163,7 +163,7 @@ void SpinCallback(w, client_data, call_data) GetWidgetText(¤tOption[data], &val); sscanf(val, "%d", &j); - if (strcmp(name, "browse") == 0) { + if (strcmp(name, _("browse")) == 0) { char *q=val, *r; for(r = ""; *q; q++) if(*q == '.') r = q; else if(*q == '/') r = ""; // last dot after last slash if(!strcmp(r, "") && !currentCps && currentOption[data].type == FileName && currentOption[data].textValue) @@ -1034,12 +1034,14 @@ GenericPopUp(Option *option, char *title, int dlgNr) XtSetArg(args[j], XtNleft, XtChainRight); j++; XtSetArg(args[j], XtNright, XtChainRight); j++; if(option[i].type == FileName || option[i].type == PathName) { - w = 50; msg = _("browse"); + msg = _("browse"); + /* automatically scale to width of text */ + XtSetArg(args[j], XtNwidth, (XtArgVal) NULL ); j++; } else { - XtSetArg(args[j], XtNheight, 10); j++; w = 20; msg = "+"; + XtSetArg(args[j], XtNheight, 10); j++; + XtSetArg(args[j], XtNwidth, w); j++; } - XtSetArg(args[j], XtNwidth, w); j++; edit = XtCreateManagedWidget(msg, commandWidgetClass, form, args, j); XtAddCallback(edit, XtNcallback, SpinCallback, (XtPointer)(intptr_t) i);