X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwsettings.c;h=6cf8d59aa2070a455f0c9fe19f2986bb761a1875;hb=4011e8678d85310eedf19fd00aa5d96a9a60770a;hp=f32fc9470fc46b0df65d1f4d69d2788f71cee9d0;hpb=c37d45adc7d98a702a7459ccdc0ac23df01a476e;p=xboard.git diff --git a/winboard/wsettings.c b/winboard/wsettings.c index f32fc94..6cf8d59 100644 --- a/winboard/wsettings.c +++ b/winboard/wsettings.c @@ -1,7 +1,7 @@ /* * woptions.h -- Options dialog box routines for WinBoard * - * Copyright 2003, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. + * Copyright 2003, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. * * ------------------------------------------------------------------------ * @@ -120,7 +120,7 @@ void LayoutOptions(int firstOption, int endOption, char *groupName, Option *optionList) { int i, b = strlen(groupName), stop, prefix, right, nextOption, firstButton = buttons; - Control lastType, nextType; + Control lastType, nextType=Label; nextOption = firstOption; while(nextOption < endOption) { @@ -380,7 +380,6 @@ int GetOptionValues(HWND hDlg, ChessProgramState *cps, Option *optionList) // read out all controls, and if value is altered, remember it and send it to the engine { - HANDLE hwndCombo; int i, k, new=0, changed=0, len; char **choices, newText[MSG_SIZ], buf[MSG_SIZ], *text; BOOL success; @@ -424,7 +423,6 @@ GetOptionValues(HWND hDlg, ChessProgramState *cps, Option *optionList) break; case ComboBox: choices = (char**) optionList[j].textValue; - hwndCombo = GetDlgItem(hDlg, 2001+2*i); success = GetDlgItemText( hDlg, 2001+2*i, newText, MSG_SIZ ); if(!success) break; new = -1; @@ -495,7 +493,7 @@ LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa if(j == -2) { char filter[] = "All files\0*.*\0Game files\0*.pgn;*.gam\0Position files\0*.fen;*.epd;*.pos\0" - "EXE files\0*.exe\0Tournament files (*.trn)\0*.trn\0" + "EXE files\0*.exe;*.jar\0Tournament files (*.trn)\0*.trn\0" "BIN Files\0*.bin\0LOG Files\0*.log\0INI Files\0*.ini\0" "Image files\0*.bmp\0\0"; OPENFILENAME ofn; @@ -577,7 +575,7 @@ void AddOption(int x, int y, Control type, int i) int extra, num = ES_NUMBER; switch(type) { - case Slider+100: + case Spin+100: num = 0; // needs text control for accepting negative numbers case Slider: case Spin: @@ -712,7 +710,7 @@ Option installOptions[] = { { 0, 0, 0, NULL, NULL, NULL, NULL, Label, N_("or specify one below:") }, { 0, 0, 0, NULL, (void*) &nickName, NULL, NULL, TextBox, N_("Nickname (optional):") }, { 0, 0, 0, NULL, (void*) &useNick, NULL, NULL, CheckBox, N_("Use nickname in PGN tag") }, - { 0, 0, 32+3, NULL, (void*) &engineName, NULL, NULL, FileName, N_("Engine (*.exe):") }, + { 0, 0, 32+3, NULL, (void*) &engineName, NULL, NULL, FileName, N_("Engine (.exe or .jar):") }, { 0, 0, 0, NULL, (void*) ¶ms, NULL, NULL, TextBox, N_("command-line parameters:") }, { 0, 0, 0, NULL, (void*) &wbOptions, NULL, NULL, TextBox, N_("Special WinBoard options:") }, { 0, 0, 0, NULL, (void*) &engineDir, NULL, NULL, PathName, N_("directory:") }, @@ -888,8 +886,7 @@ int MatchOK() void PseudoOK(HWND hDlg) { - void (*saveOK)(); - saveOK = okFunc; okFunc = 0; + okFunc = 0; GetOptionValues(hDlg, activeCps, activeList); EndDialog( hDlg, 0 ); comboCallback = NULL; activeCps = NULL;