X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwsettings.c;h=83472f5e6e3d7e17520899dd30583172f0f67445;hb=2c6cd481ba85455e761248831c7eee4a50e8b5c7;hp=6fc5c40682a7f677319e72d6271504a1e407ec18;hpb=f29ff21f23c2a22fc55e14ba48c53d704c22289d;p=xboard.git diff --git a/winboard/wsettings.c b/winboard/wsettings.c index 6fc5c40..83472f5 100644 --- a/winboard/wsettings.c +++ b/winboard/wsettings.c @@ -389,7 +389,7 @@ GetOptionValues(HWND hDlg, ChessProgramState *cps, Option *optionList) for(k=0; k 0) { if(*(char**)optionList[j].target) free(*(char**)optionList[j].target); *(char**)optionList[j].target = strdup(optionList[j].choice[new]); break; @@ -727,6 +727,26 @@ void UpgradeParticipant(HWND hDlg) Substitute(participants, FALSE); } +void Inspect(HWND hDlg) +{ + FILE *f; + char name[MSG_SIZ]; + GetDlgItemText(hDlg, 2001+2*1, name, MSG_SIZ ); + if(name && name[0] && (f = fopen(name, "r")) ) { + char *saveSaveFile; + saveSaveFile = appData.saveGameFile; appData.saveGameFile = NULL; // this is a persistent option, protect from change + ParseArgsFromFile(f); + autoinc = ((appData.loadPositionFile[0] ? appData.loadGameIndex : appData.loadPositionIndex) < 0); + twice = ((appData.loadPositionFile[0] ? appData.loadGameIndex : appData.loadPositionIndex) == -2); + swiss = appData.tourneyType < 0; + SetOptionValues(hDlg, NULL, activeList); + FREE(appData.saveGameFile); appData.saveGameFile = saveSaveFile; + } else DisplayError(_("First you must specify an existing tourney file to clone"), 0); +} + +void TimeControlOptionsPopup P((HWND hDlg)); +void UciOptionsPopup P((HWND hDlg)); + Option tourneyOptions[] = { { 0, 0, 4, NULL, (void*) &tfName, "", NULL, FileName, N_("Tournament file:") }, { 30, 0, 0, NULL, NULL, NULL, NULL, Label, N_("If you specify an existing file, the rest of this dialog will be ignored.") }, @@ -747,9 +767,13 @@ Option tourneyOptions[] = { { 0, 0, 0, NULL, (void*) &autoinc, "", NULL, CheckBox, N_("Step through lines/positions in file") }, { 0, 0, 1000000000, NULL, (void*) &appData.rewindIndex, "", NULL, Spin, N_("Rewind after (0 = never):") }, { 0, 0, 0, NULL, (void*) &twice, "", NULL, CheckBox, N_("Use each line/position twice") }, + { 0, 0, 0, NULL, (void*) &appData.defNoBook, "", NULL, CheckBox, N_("Make all use GUI book by default") }, { 0, 0, 1000000000, NULL, (void*) &appData.matchPause, "", NULL, Spin, N_("Pause between Games (ms):") }, { 0, 0, 0, NULL, (void*) &ReplaceParticipant, "", NULL, Button, N_("Replace Engine") }, { 0, 0, 0, NULL, (void*) &UpgradeParticipant, "", NULL, Button, N_("Upgrade Engine") }, + { 0, 0, 0, NULL, (void*) &TimeControlOptionsPopup, "", NULL, Button, N_("Time Control...") }, + { 0, 0, 0, NULL, (void*) &UciOptionsPopup, "", NULL, Button, N_("Common Engine...") }, + { 0, 0, 0, NULL, (void*) &Inspect, "", NULL, Button, N_("Clone Tourney") }, { 0, 0, 0, NULL, (void*) &MatchOK, "", NULL, EndMark , "" } };