ChessProgramState *currentCps;
static Option *currentOption;
extern Widget shells[];
+static Boolean browserUp;
void CheckCallback(Widget ww, XtPointer data, XEvent *event, Boolean *b)
{
XtSetArg(args[0], XtNstring, &q);
XtGetValues(currentOption[data].handle, args, 1);
for(r = ""; *q; q++) if(*q == '.') r = q; else if(*q == '/') r = ""; // last dot after last slash
+ browserUp = True;
if(XsraSelFile(shells[0], currentOption[data].name, NULL, NULL, "", "", r,
currentOption[data].type == PathName ? "p" : "f", NULL, &p)) {
int len = strlen(p);
XtSetArg(args[0], XtNstring, p);
XtSetValues(currentOption[data].handle, args, 1);
}
+ browserUp = False;
SetFocus(currentOption[data].handle, shells[0], (XEvent*) NULL, False);
return;
} else
Cardinal *nprms;
{
int n;
+ if(browserUp) return; // prevent closing dialog when it has an open file-browse daughter
PopDown(prms[0][0] - '0');
}