Implement Narrow button in WB Game List
[xboard.git] / xoptions.c
index e2646c1..0c32929 100644 (file)
@@ -250,7 +250,7 @@ CreateComboPopup (Widget parent, Option *option, int n)
 
 extern WindowPlacement wpComment, wpTags, wpMoveHistory;
 char *trialSound;
-static int oldCores, oldPonder;
+static int oldCores, oldPonder, oldShow, oldBlind;
 int MakeColors P((void));
 void CreateGCs P((int redo));
 void CreateAnyPieces P((void));
@@ -410,6 +410,8 @@ GeneralOptionsOK (int n)
        int newPonder = appData.ponderNextMove;
        appData.ponderNextMove = oldPonder;
        PonderNextMoveEvent(newPonder);
+       if(!appData.highlightLastMove) ClearHighlights(), ClearPremoveHighlights();
+       if(oldShow != appData.showCoords || oldBlind != appData.blindfold) DrawPosition(TRUE, NULL);
        return 1;
 }
 
@@ -434,6 +436,7 @@ Option generalOptions[] = {
 { 0,  0, 0, NULL, (void*) &appData.showEvalInMoveHistory, "", NULL, CheckBox, N_("Scores in Move List") },
 { 0,  0, 0, NULL, (void*) &appData.showCoords, "", NULL, CheckBox, N_("Show Coordinates") },
 { 0,  0, 0, NULL, (void*) &appData.markers, "", NULL, CheckBox, N_("Show Target Squares") },
+{ 0,  0, 0, NULL, (void*) &appData.useStickyWindows, "", NULL, CheckBox, N_("Sticky Windows") },
 { 0,  0, 0, NULL, (void*) &appData.testLegality, "", NULL, CheckBox, N_("Test Legality") },
 { 0, 0, 10, NULL, (void*) &appData.flashCount, "", NULL, Spin, N_("Flash Moves (0 = no flashing):") },
 { 0, 1, 10, NULL, (void*) &appData.flashRate, "", NULL, Spin, N_("Flash Rate (high = fast):") },
@@ -630,7 +633,7 @@ Option loadOptions[] = {
 { 0, 0, 5000, NULL, (void*) &appData.eloThreshold2, "", NULL, Spin, N_("Elo of weakest player at least:") },
 { 0, 0, 5000, NULL, (void*) &appData.dateThreshold, "", NULL, Spin, N_("No games before year:") },
 { 0, 1, 50, NULL, (void*) &appData.stretch, "", NULL, Spin, N_("Minimum nr consecutive positions:") },
-{ 1, 0, 180, NULL, (void*) &searchMode, (char*) modeNames, modeValues, ComboBox, N_("Seach mode:") },
+{ 1, 0, 180, NULL, (void*) &searchMode, (char*) modeNames, modeValues, ComboBox, N_("Search mode:") },
 { 0, 0, 0, NULL, (void*) &appData.ignoreColors, "", NULL, CheckBox, N_("Also match reversed colors") },
 { 0, 0, 0, NULL, (void*) &appData.findMirror, "", NULL, CheckBox, N_("Also match left-right flipped position") },
 { 0,  0, 0, NULL, (void*) &LoadOptionsOK, "", NULL, EndMark , "" }
@@ -1426,6 +1429,7 @@ void
 OptionsProc (Widget w, XEvent *event, String *prms, Cardinal *nprms)
 {
    oldPonder = appData.ponderNextMove;
+   oldShow = appData.showCoords; oldBlind = appData.blindfold;
    GenericPopUp(generalOptions, _("General Options"), 0);
 }