From 8bd006fe9af8f3d1469357d5efa7ff46a78773e0 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 1 Apr 2011 23:11:29 +0200 Subject: [PATCH] Add ICS options dialog --- xboard.c | 4 ++++ xoptions.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 0 deletions(-) diff --git a/xboard.c b/xboard.c index af78d61..d930c6b 100644 --- a/xboard.c +++ b/xboard.c @@ -455,6 +455,7 @@ void FirstSettingsProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms void SecondSettingsProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void GameListOptionsPopUp P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void BoardOptionsProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); +void IcsOptionsProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void LoadOptionsProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void SaveOptionsProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void GameListOptionsPopDown P(()); @@ -706,6 +707,7 @@ MenuItem optionsMenu[] = { {N_("Time Control ... Alt+Shift+T"), "Time Control", TimeControlProc}, {N_("Common Engine ... Alt+Shift+U"), "Common Engine", UciMenuProc}, {N_("Adjudications ... Alt+Shift+J"), "Adjudications", EngineMenuProc}, + {N_("ICS ..."), "ICS", IcsOptionsProc}, {N_("Load Game ..."), "Load Game", LoadOptionsProc}, {N_("Save Game ..."), "Save Game", SaveOptionsProc}, // {N_(" ..."), "", OptionsProc}, @@ -2782,6 +2784,7 @@ Enables ncpEnables[] = { { "menuEngine.Retract Move", False }, { "menuOptions.Auto Flag", False }, { "menuOptions.Auto Flip View", False }, + { "menuOptions.ICS", False }, // { "menuOptions.ICS Alarm", False }, { "menuOptions.Move Sound", False }, { "menuOptions.Hide Thinking", False }, @@ -2804,6 +2807,7 @@ Enables gnuEnables[] = { { "menuAction.Upload to Examine", False }, { "menuEdit.Revert", False }, { "menuEdit.Annotate", False }, + { "menuOptions.ICS", False }, /* The next two options rely on SetCmailMode being called *after* */ /* SetGNUMode so that when GNU is being used to give hints these */ diff --git a/xoptions.c b/xoptions.c index e29e2dd..bfc487c 100644 --- a/xoptions.c +++ b/xoptions.c @@ -1783,6 +1783,44 @@ void CreateXPMBoard P((char *s, int kind)); void CreateXPMPieces P((void)); void GenericReadout(); +void IcsOptionsOK(int n) +{ + ParseIcsTextColors(); +} + +Option icsOptions[] = { +{ 0, 0, 0, NULL, (void*) &appData.autoKibitz, "", NULL, CheckBox, _("Auto-Kibitz") }, +{ 0, 0, 0, NULL, (void*) &appData.autoComment, "", NULL, CheckBox, _("Auto-Comment") }, +{ 0, 0, 0, NULL, (void*) &appData.autoObserve, "", NULL, CheckBox, _("Auto-Observe") }, +{ 0, 0, 0, NULL, (void*) &appData.autoRaiseBoard, "", NULL, CheckBox, _("Auto-Raise Board") }, +{ 0, 0, 0, NULL, (void*) &appData.bgObserve, "", NULL, CheckBox, _("Background Observe while Playing") }, +{ 0, 0, 0, NULL, (void*) &appData.dualBoard, "", NULL, CheckBox, _("Dual Board for Background-Observed Game") }, +{ 0, 0, 0, NULL, (void*) &appData.getMoveList, "", NULL, CheckBox, _("Get Move List") }, +{ 0, 0, 0, NULL, (void*) &appData.quietPlay, "", NULL, CheckBox, _("Quiet Play") }, +{ 0, 0, 0, NULL, (void*) &appData.seekGraph, "", NULL, CheckBox, _("Seek Graph") }, +{ 0, 0, 0, NULL, (void*) &appData.autoRefresh, "", NULL, CheckBox, _("Auto-Refresh Seek Graph") }, +{ 0, 0, 0, NULL, (void*) &appData.premove, "", NULL, CheckBox, _("Premove") }, +{ 0, 0, 0, NULL, (void*) &appData.premoveWhite, "", NULL, CheckBox, _("Premove for White") }, +{ 0, 0, 0, NULL, (void*) &appData.premoveWhiteText, "", NULL, TextBox, _("First White Move:") }, +{ 0, 0, 0, NULL, (void*) &appData.premoveBlack, "", NULL, CheckBox, _("Premove for Black") }, +{ 0, 0, 0, NULL, (void*) &appData.premoveBlackText, "", NULL, TextBox, _("First Black Move:") }, +{ 0, 0, 0, NULL, NULL, NULL, NULL, Break, "" }, +{ 0, 0, 0, NULL, (void*) &appData.icsAlarm, "", NULL, CheckBox, _("Alarm") }, +{ 0, 0, 100000000, NULL, (void*) &appData.icsAlarmTime, "", NULL, Spin, _("Alarm Time (msec):") }, +//{ 0, 0, 0, NULL, (void*) &appData.chatBoxes, "", NULL, TextBox, _("Startup Chat Boxes:") }, +{ 0, 0, 0, NULL, (void*) &appData.colorize, "", NULL, CheckBox, _("Colorize Messages") }, +{ 0, 0, 0, NULL, (void*) &appData.colorShout, "", NULL, TextBox, _("Shout Text Colors:") }, +{ 0, 0, 0, NULL, (void*) &appData.colorSShout, "", NULL, TextBox, _("S-Shout Text Colors:") }, +{ 0, 0, 0, NULL, (void*) &appData.colorChannel1, "", NULL, TextBox, _("Channel #1 Text Colors:") }, +{ 0, 0, 0, NULL, (void*) &appData.colorChannel, "", NULL, TextBox, _("Other Channel Text Colors:") }, +{ 0, 0, 0, NULL, (void*) &appData.colorKibitz, "", NULL, TextBox, _("Kibitz Text Colors:") }, +{ 0, 0, 0, NULL, (void*) &appData.colorTell, "", NULL, TextBox, _("Tell Text Colors:") }, +{ 0, 0, 0, NULL, (void*) &appData.colorChallenge, "", NULL, TextBox, _("Challenge Text Colors:") }, +{ 0, 0, 0, NULL, (void*) &appData.colorRequest, "", NULL, TextBox, _("Request Text Colors:") }, +{ 0, 0, 0, NULL, (void*) &appData.colorSeek, "", NULL, TextBox, _("Seek Text Colors:") }, +{ 0, 0, 0, NULL, (void*) &IcsOptionsOK, "", NULL, EndMark , "" } +}; + Option loadOptions[] = { { 0, 0, 0, NULL, (void*) &appData.autoDisplayTags, "", NULL, CheckBox, _("Auto-Display Tags") }, { 0, 0, 0, NULL, (void*) &appData.autoDisplayComment, "", NULL, CheckBox, _("Auto-Display Comment") }, @@ -2261,6 +2299,15 @@ GenericPopUp(Option *option, char *title) } +void IcsOptionsProc(w, event, prms, nprms) + Widget w; + XEvent *event; + String *prms; + Cardinal *nprms; +{ + GenericPopUp(icsOptions, _("ICS Options")); +} + void LoadOptionsProc(w, event, prms, nprms) Widget w; XEvent *event; -- 1.7.0.4