X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=c8c7fc2dc7a0a26ffdf98deaee9f72933b636196;hb=fbcf1f3b86b144dd4940b326c32d4b105c0f74b3;hp=9b5995c6ed0b85d68e5b6cd39bd6e5868d3978d1;hpb=be349412670dba1167b8844ed82011dcb1c9925e;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 9b5995c..c8c7fc2 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1454,13 +1454,13 @@ static int count; static void PromoPick P((int n)); static Option promoOptions[] = { -{ 0, 0, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, "" }, -{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, "" }, -{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, "" }, -{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, "" }, -{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, "" }, -{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, "" }, -{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, "" }, +{ 0, 0, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, +{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, +{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, +{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, +{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, +{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, +{ 0, SAME_ROW, 0, NULL, (void*) &PromoPick, NULL, NULL, Button, NULL }, { 0, SAME_ROW | NO_OK, 0, NULL, NULL, "", NULL, EndMark , "" } }; @@ -1489,8 +1489,9 @@ PromoPick (int n) static void SetPromo (char *name, int nr, char promoChar) { - safeStrCpy(promoOptions[nr].name, name, MSG_SIZ); + ASSIGN(promoOptions[nr].name, name); promoOptions[nr].value = promoChar; + promoOptions[nr].min = SAME_ROW; } void @@ -1526,6 +1527,7 @@ PromotionPopUp () SetPromo(_("Defer"), --count, '='); SetPromo(_("Promote"), --count, '+'); } + promoOptions[count].min = 0; GenericPopUp(promoOptions + count, "Promotion", PromoDlg, BoardWindow, NONMODAL, 0); } @@ -1838,15 +1840,15 @@ static void PMSelect (int n) { // user callback for board context menus if (pmFromX < 0 || pmFromY < 0) return; - if(n == 25) DropMenuEvent(dropMenuTranslation[values[n]], pmFromX, pmFromY); - else EditPositionMenuEvent(pieceMenuTranslation[n-23][values[n]], pmFromX, pmFromY); + if(n == W_DROP) DropMenuEvent(dropMenuTranslation[values[n]], pmFromX, pmFromY); + else EditPositionMenuEvent(pieceMenuTranslation[n - W_MENUW][values[n]], pmFromX, pmFromY); } int CCB (int n) { shiftKey = (ShiftKeys() & 3) != 0; - ClockClick(n == 12); + ClockClick(n == W_BLACK); } Option mainOptions[] = { // description of main window in terms of generic dialog creator @@ -2067,6 +2069,7 @@ static char *FileTypes[] = { "Chess Positions", "Tournaments", "Opening Books", +"Sound files", "Settings (*.ini)", "Log files", "All files", @@ -2084,6 +2087,7 @@ static char *Extensions[] = { ".fen .epd .pos", ".trn", ".bin", +".wav", ".ini", ".log", "",