X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=046fbc6df5366058d2dcfb28c50eb1c824e0c01e;hb=6363ad84c9a0b600d6219a53b299945ea72590ac;hp=525ce710551aa05ecd2b566c259b1ae79036e3b0;hpb=af378fcf30993faf28f17255fde4968eae28ad0d;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 525ce71..046fbc6 100644 --- a/dialogs.c +++ b/dialogs.c @@ -204,7 +204,7 @@ GenericReadout (Option *opts, int selected) break; case ComboBox: if(opts[i].min & COMBO_CALLBACK) break; - if(!opts[i].textValue) { *(int*)opts[i].target == opts[i].value; break; } // numeric + if(!opts[i].textValue) { *(int*)opts[i].target = values[i]; break; } // numeric val = ((char**)opts[i].textValue)[values[i]]; if(currentCps) { if(opts[i].value == values[i]) break; // not changed @@ -1078,7 +1078,7 @@ ICSInputSendText () GetWidgetText(&boxOptions[0], &val); SaveInHistory(val); SendMultiLineToICS(val); - SetWidgetText(&boxOptions[0], val, InputBoxDlg); + SetWidgetText(&boxOptions[0], "", InputBoxDlg); } void @@ -2296,4 +2296,26 @@ Browse (DialogClass dlg, char *label, char *proposed, char *ext, Boolean pathFla SetWidgetLabel(&browseOptions[9], FileTypes[j]); } +static char *openName; +FileProc fileProc; +char *fileOpenMode; +FILE *openFP; + +void +DelayedLoad () +{ + (void) (*fileProc)(openFP, 0, openName); +} + +void +FileNamePopUp (char *label, char *def, char *filter, FileProc proc, char *openMode) +{ + fileProc = proc; /* I can't see a way not */ + fileOpenMode = openMode; /* to use globals here */ + { // [HGM] use file-selector dialog stolen from Ghostview + // int index; // this is not supported yet + Browse(BoardWindow, label, (def[0] ? def : NULL), filter, False, openMode, &openName, &openFP); + } +} +