From: H.G. Muller Date: Wed, 6 Feb 2013 13:48:27 +0000 (+0100) Subject: Add boolean -autoBox option X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=a56bd5ee92e43cbf5537d877fd4010e5e34a3e11;p=xboard.git Add boolean -autoBox option This option controls the automatic popup of the ICS Input Box on typing a printable character, which was annoing to some. The option can be set from the ICS Options dialog. --- diff --git a/args.h b/args.h index 9184dce..dac7250 100644 --- a/args.h +++ b/args.h @@ -259,6 +259,7 @@ ArgDescriptor argDescriptors[] = { { "seekGraph", ArgBoolean, (void *) &appData.seekGraph, TRUE, (ArgIniType) FALSE }, { "sg", ArgTrue, (void *) &appData.seekGraph, FALSE, INVALID }, { "autoRefresh", ArgBoolean, (void *) &appData.autoRefresh, TRUE, (ArgIniType) FALSE }, + { "autoBox", ArgBoolean, (void *) &appData.autoBox, XBOARD, (ArgIniType) TRUE }, { "gateway", ArgString, (void *) &appData.gateway, FALSE, (ArgIniType) "" }, { "loadGameFile", ArgFilename, (void *) &appData.loadGameFile, FALSE, (ArgIniType) "" }, { "lgf", ArgFilename, (void *) &appData.loadGameFile, FALSE, INVALID }, diff --git a/common.h b/common.h index 2829caf..984efe0 100644 --- a/common.h +++ b/common.h @@ -433,6 +433,7 @@ typedef struct { char *timeControl; Boolean trueColors; Boolean icsActive; + Boolean autoBox; char *icsHost; char *icsPort; char *icsCommPort; /* if set, use serial port instead of tcp host/port */ diff --git a/dialogs.c b/dialogs.c index 6624aeb..fcc27f7 100644 --- a/dialogs.c +++ b/dialogs.c @@ -576,6 +576,7 @@ Option icsOptions[] = { { 0, 0, 0, NULL, (void*) &appData.quietPlay, "", NULL, CheckBox, N_("Quiet Play") }, { 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.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:") }, @@ -1227,6 +1228,7 @@ void BoxAutoPopUp (char *buf) { if(appData.icsActive) { // text typed to board in ICS mode: divert to ICS input box + if(!appData.autoBox) return; if(DialogExists(InputBoxDlg)) { // box already exists: append to current contents char *p, newText[MSG_SIZ]; GetWidgetText(&boxOptions[0], &p);