X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=046fbc6df5366058d2dcfb28c50eb1c824e0c01e;hb=e131fadbb0f396098fb300283227bdf042c71d45;hp=c50651af4f47e41a2e8f76293897e0e083a43ca7;hpb=26897ecf6be30b8ccc64285e1e293ab76df38ab9;p=xboard.git diff --git a/dialogs.c b/dialogs.c index c50651a..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 @@ -1320,11 +1320,6 @@ ShuffleMenuProc () static int TcOK P((int n)); int tmpMoves, tmpTc, tmpInc, tmpOdds1, tmpOdds2, tcType; -static void -ShowTC (int n) -{ -} - static void SetTcType P((int n)); static char * @@ -2301,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); + } +} +