X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=d6cf37884f93875c407e987a8ce46bd6b2acc7c1;hb=cf736a0286ed40b6e671e77fd080812edd75f80b;hp=5412018d870b55a2580d2d16cd3000153da777b5;hpb=45609e1f60534051fc729485d692081aa7bf1314;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 5412018..d6cf378 100644 --- a/dialogs.c +++ b/dialogs.c @@ -426,7 +426,7 @@ static Option variantDescriptors[] = { { 0, 0, 275, NULL, NULL, NULL, NULL, Label, warning }, { 0, 0, 275, NULL, NULL, NULL, NULL, Label, "Variants marked with * can only be played\nwith legality testing off"}, { 0, SAME_ROW, 0, NULL, NULL, NULL, NULL, Break, ""}, -{ VariantFairy, 0, 135, NULL, (void*) &Pick, "#BFBFBF", NULL, Button, N_("fairy")}, +{ VariantASEAN, 0, 135, NULL, (void*) &Pick, "#FFFFFF", NULL, Button, N_("ASEAN")}, { VariantGreat, SAME_ROW, 135, NULL, (void*) &Pick, "#BFBFFF", NULL, Button, N_("Great Shatranj (10x8)")}, { VariantSChess, 0, 135, NULL, (void*) &Pick, "#FFBFBF", NULL, Button, N_("Seirawan")}, { VariantFalcon, SAME_ROW, 135, NULL, (void*) &Pick, "#BFBFFF", NULL, Button, N_("falcon (10x8)")}, @@ -444,7 +444,8 @@ static Option variantDescriptors[] = { { VariantShogi, SAME_ROW, 135, NULL, (void*) &Pick, "#BFFFFF", NULL, Button, N_("shogi (9x9)")}, { VariantSpartan, 0, 135, NULL, (void*) &Pick, "#FF0000", NULL, Button, N_("Spartan")}, { VariantXiangqi, SAME_ROW,135, NULL, (void*) &Pick, "#BFFFFF", NULL, Button, N_("xiangqi (9x10)")}, -{ VariantNormal, 0, 135, NULL, (void*) &Pick, "#FFFFFF", NULL, Button, N_(" ")}, // dummy, to have good alignment +{ VariantFairy, 0, 135, NULL, (void*) &Pick, "#BFBFBF", NULL, Button, N_("fairy")}, +//{ VariantNormal, 0, 135, NULL, (void*) &Pick, "#FFFFFF", NULL, Button, N_(" ")}, // dummy, to have good alignment { VariantCourier, SAME_ROW,135, NULL, (void*) &Pick, "#BFFFBF", NULL, Button, N_("courier (12x8)")}, { 0, NO_OK, 0, NULL, NULL, "", NULL, EndMark , "" } }; @@ -477,8 +478,8 @@ Pick (int n) appData.pieceToCharTable = NULL; appData.pieceNickNames = ""; appData.colorNickNames = ""; - Reset(True, True); PopDown(TransientDlg); + Reset(True, True); return; } @@ -1167,7 +1168,8 @@ IcsKey (int n) case -1: val = NextInHistory(); } - SetWidgetText(&boxOptions[0], val ? val : "", InputBoxDlg); + SetWidgetText(&boxOptions[0], val = val ? val : "", InputBoxDlg); + SetInsertPos(&boxOptions[0], strlen(val)); } static void @@ -1229,8 +1231,8 @@ PopUpMoveDialog (char firstchar) void BoxAutoPopUp (char *buf) { + if(!appData.autoBox) return; 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); @@ -1697,7 +1699,7 @@ ChatSwitch (int n) void ChatProc () { - if(GenericPopUp(chatOptions, _("Chat box"), ChatDlg, BoardWindow, NONMODAL, 0)) + if(GenericPopUp(chatOptions, _("Chat box"), ChatDlg, BoardWindow, NONMODAL, appData.topLevel)) AddHandler(&chatOptions[0], ChatDlg, 2), AddHandler(&chatOptions[6], ChatDlg, 2); // treats return as OK MarkMenu("View.OpenChatWindow", ChatDlg); } @@ -1874,7 +1876,7 @@ DisplayMoveError (String message) { fromX = fromY = -1; ClearHighlights(); - DrawPosition(FALSE, NULL); + DrawPosition(TRUE, NULL); // selective redraw would miss the from-square of the rejected move, displayed empty after drag, but not marked damaged! if (appData.debugMode || appData.matchMode) { fprintf(stderr, "%s: %s\n", programName, message); } @@ -2469,12 +2471,12 @@ ListDir (int pathFlag) ASSIGN(fileList[filePtr], s); filePtr++; } } - if(filePtr == MAXFILES-2) { ASSIGN(fileList[filePtr], _("\177 next page")); filePtr++; } + if(filePtr == MAXFILES-2) { ASSIGN(fileList[filePtr], _(" next page")); filePtr++; } FREE(folderList[folderPtr]); folderList[folderPtr] = NULL; FREE(fileList[filePtr]); fileList[filePtr] = NULL; closedir(dir); extFlag = 0; qsort((void*)folderList, folderPtr, sizeof(char*), &Comp); - extFlag = byExtension; qsort((void*)fileList, filePtr, sizeof(char*), &Comp); + extFlag = byExtension; qsort((void*)fileList, filePtr < MAXFILES-2 ? filePtr : MAXFILES-2, sizeof(char*), &Comp); } void @@ -2505,7 +2507,7 @@ Switch (int n) { if(byExtension == (n == 4)) return; extFlag = byExtension = (n == 4); - qsort((void*)fileList, filePtr, sizeof(char*), &Comp); + qsort((void*)fileList, filePtr < MAXFILES-2 ? filePtr : MAXFILES-2, sizeof(char*), &Comp); LoadListBox(&browseOptions[6], "", -1, -1); } @@ -2525,7 +2527,7 @@ SetTypeFilter (int n) void FileSelProc (int n, int sel) { - if(sel<0) return; + if(sel < 0 || fileList[sel] == NULL) return; if(sel == MAXFILES-2) { pageStart = cnt; Refresh(-1); return; } ASSIGN(fileName, fileList[sel]); if(BrowseOK(0)) PopDown(BrowserDlg);