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
GetWidgetText(&boxOptions[0], &val);
SaveInHistory(val);
SendMultiLineToICS(val);
- SetWidgetText(&boxOptions[0], val, InputBoxDlg);
+ SetWidgetText(&boxOptions[0], "", InputBoxDlg);
}
void
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);
+ }
+}
+