From: H.G. Muller Date: Sun, 16 Jun 2013 12:49:55 +0000 (+0200) Subject: Add quit-after-game checkbox in ICS options dialog XB X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=9d84fbc414dd9e4112e6ba42c9eca6c2244be6db Add quit-after-game checkbox in ICS options dialog XB This checkbox can be used to log out from a busy ICS where your engine running in zippy mode is in much demand, without having to abort a game. The state of the box is checked in GameEnd, and when checked will cause an ExitEvent (only in ICS mode). --- diff --git a/backend.c b/backend.c index 2156091..6d243d7 100644 --- a/backend.c +++ b/backend.c @@ -10861,6 +10861,7 @@ GameEnds (ChessMove result, char *resultDetails, int whosays) PlayIcsUnfinishedSound(); } } + if(appData.quitNext) { ExitEvent(0); return; } } else if (gameMode == EditGame || gameMode == PlayFromGameFile || gameMode == AnalyzeMode || diff --git a/common.h b/common.h index d56dbf9..12f9d4d 100644 --- a/common.h +++ b/common.h @@ -653,6 +653,7 @@ typedef struct { int zippyShortGame; /* [HGM] aborter */ #endif Boolean lowTimeWarning; /* [HGM] low time */ + Boolean quitNext; char *lowTimeWarningColor; char *serverFileName; diff --git a/dialogs.c b/dialogs.c index d6cf378..acc75bf 100644 --- a/dialogs.c +++ b/dialogs.c @@ -579,6 +579,7 @@ Option icsOptions[] = { { 0, 0, 0, NULL, (void*) &appData.seekGraph, "", NULL, CheckBox, N_("Seek Graph") }, { 0, 0, 0, NULL, (void*) &appData.autoRefresh, "", NULL, CheckBox, N_("Auto-Refresh Seek Graph") }, { 0, 0, 0, NULL, (void*) &appData.autoBox, "", NULL, CheckBox, N_("Auto-InputBox PopUp") }, +{ 0, 0, 0, NULL, (void*) &appData.quitNext, "", NULL, CheckBox, N_("Quit after game") }, { 0, 0, 0, NULL, (void*) &appData.premove, "", NULL, CheckBox, N_("Premove") }, { 0, 0, 0, NULL, (void*) &appData.premoveWhite, "", NULL, CheckBox, N_("Premove for White") }, { 0, 0, 0, NULL, (void*) &appData.premoveWhiteText, "", NULL, TextBox, N_("First White Move:") },