X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=31750ba3169277820aeb4b20935ed3f543d59993;hb=d9f4b584106f4d7477158476ff792f6fa0b2630a;hp=437ebae112b9e6e02e2342d8b7023a0b75a9c8dc;hpb=48d27c1a58658e51013cca580e37840f54419e13;p=xboard.git diff --git a/xoptions.c b/xoptions.c index 437ebae..31750ba 100644 --- a/xoptions.c +++ b/xoptions.c @@ -554,12 +554,27 @@ Option icsOptions[] = { { 0, 0, 0, NULL, (void*) &IcsOptionsOK, "", NULL, EndMark , "" } }; +char *modeNames[] = { N_("Exact match"), N_("Shown position is subset"), N_("Same material and Pawn chain"), N_("Same material"), NULL }; +char *modeValues[] = { "1", "2", "3", "4" }; +char *searchMode; + +int LoadOptionsOK() +{ + appData.searchMode = atoi(searchMode); + return 1; +} + Option loadOptions[] = { { 0, 0, 0, NULL, (void*) &appData.autoDisplayTags, "", NULL, CheckBox, N_("Auto-Display Tags") }, { 0, 0, 0, NULL, (void*) &appData.autoDisplayComment, "", NULL, CheckBox, N_("Auto-Display Comment") }, { 0, 0, 0, NULL, NULL, NULL, NULL, Label, N_("Auto-Play speed of loaded games\n(0 = instant, -1 = off):") }, { 0, -1, 10000000, NULL, (void*) &appData.timeDelay, "", NULL, Fractional, N_("Seconds per Move:") }, -{ 0, 0, 0, NULL, NULL, "", NULL, EndMark , "" } +{ 0, 0, 0, NULL, NULL, NULL, NULL, Label, N_("\nThresholds for position filtering in game list:") }, +{ 0, 0, 5000, NULL, (void*) &appData.eloThreshold1, "", NULL, Spin, N_("Elo of strongest player at least:") }, +{ 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:") }, +{ 1, 0, 180, NULL, (void*) &searchMode, (char*) modeNames, modeValues, ComboBox, N_("Seach mode:") }, +{ 0, 0, 0, NULL, (void*) &LoadOptionsOK, "", NULL, EndMark , "" } }; Option saveOptions[] = { @@ -1219,6 +1234,7 @@ void LoadOptionsProc(w, event, prms, nprms) String *prms; Cardinal *nprms; { + ASSIGN(searchMode, modeValues[appData.searchMode-1]); GenericPopUp(loadOptions, _("Load Game Options"), 0); }