SetCurrentComboSelection (Option *opt)
{
int j;
+ if(currentCps) ; else
if(!opt->textValue) opt->value = *(int*)opt->target; /* numeric */else {
for(j=0; opt->choice[j]; j++) // look up actual value in list of possible values, to get selection nr
if(*(char**)opt->target && !strcmp(*(char**)opt->target, ((char**)opt->textValue)[j])) break;
opt->value = j + (opt->choice[j] == NULL);
}
+ SetComboChoice(opt, opt->value);
return opt->value;
}
static void
PseudoOK ()
{
+ if(matchMode) return;
GenericReadout(matchOptions, -2); // read all, but suppress calling of MatchOK
ASSIGN(appData.participants, engineName);
ASSIGN(appData.tourneyFile, tfName);
SettingsPopUp(&second);
}
+void
+RefreshSettingsDialog (ChessProgramState *cps, int val)
+{
+ if(val == 1) { // option values changed
+ if(shellUp[TransientDlg] && cps == currentCps) {
+ GenericUpdate(cps->option, -1); // normally update values when dialog is up
+ }
+ return; // and be done
+ }
+ if(val == 2) { // option list changed
+ if(!shellUp[TransientDlg] || cps != currentCps) return; // our dialog is not up, so nothing to do
+ }
+ PopDown(TransientDlg); // make sure any other dialog closes first
+ SettingsPopUp(cps); // and popup new one
+}
+
//----------------------------------------------- Load Engine --------------------------------------
char *engineDir, *engineLine, *nickName, *params;
void
TimeControlProc ()
{
+ if(gameMode != BeginningOfGame) {
+ DisplayError(_("Changing time control during a game is not implemented"), 0);
+ return;
+ }
tmpMoves = appData.movesPerSession;
tmpInc = appData.timeIncrement; if(tmpInc < 0) tmpInc = 0;
tmpOdds1 = tmpOdds2 = 1; tcType = 0;
char *p = texts[partner];
int len = strlen(mess) + 1;
+ if(!DialogExists(ChatDlg)) return;
if(p) len += strlen(p);
texts[partner] = (char*) malloc(len);
snprintf(texts[partner], len, "%s%s", p ? p : "", mess);
{
errorUp = True;
errorOptions[1].name = label;
- if(dialogError = shellUp[TransientDlg])
- GenericPopUp(errorOptions+1, title, FatalDlg, TransientDlg, MODAL, 0); // pop up as daughter of the transient dialog
+ if(dialogError = shellUp[MasterDlg])
+ GenericPopUp(errorOptions+1, title, FatalDlg, MasterDlg, MODAL, 0); // pop up as daughter of the transient dialog
else
GenericPopUp(errorOptions+modal, title, modal ? FatalDlg: ErrorDlg, BoardWindow, modal, 0); // kludge: option start address indicates modality
}