X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=773a30533d476724ee678a96c55e1bb14eddf312;hb=190cfda76b87b10514aa45bac061c3d4828ceffe;hp=c27fdfe2c3999777bd7df0d0824e373e3ed22325;hpb=15eab3074ed1dc476c19b48da66e82dea27399b5;p=xboard.git diff --git a/dialogs.c b/dialogs.c index c27fdfe..773a305 100644 --- a/dialogs.c +++ b/dialogs.c @@ -439,12 +439,6 @@ static Option variantDescriptors[] = { { 0, -1, BOARD_RANKS-1, NULL, (void*) &appData.NrRanks, "", NULL, Spin, N_("Number of Board Ranks:") }, { 0, -1, BOARD_FILES, NULL, (void*) &appData.NrFiles, "", NULL, Spin, N_("Number of Board Files:") }, { 0, -1, BOARD_RANKS-1, NULL, (void*) &appData.holdingsSize, "", NULL, Spin, N_("Holdings Size:") }, -{ 0, 0, 0, NULL, NULL, NULL, NULL, Label, - N_("WARNING: variants with un-orthodox\n" - "pieces only have built-in bitmaps\n" - "for -boardSize middling, bulky and\n" - "petite, and substitute king or amazon\n" - "for missing bitmaps. (See manual.)")}, { 0, NO_OK, 0, NULL, NULL, "", NULL, EndMark , "" } }; @@ -752,14 +746,13 @@ SoundOptionsProc () static void DefColor P((int n)); static void AdjustColor P((int i)); -static char oldPngDir[MSG_SIZ]; -static char oldSvgDir[MSG_SIZ]; +static char oldPieceDir[MSG_SIZ]; static int BoardOptionsOK (int n) { if(appData.overrideLineGap >= 0) lineGap = appData.overrideLineGap; else lineGap = defaultLineGap; - InitDrawingParams(strcmp(oldPngDir, appData.pngDirectory) || strcmp(oldSvgDir, appData.svgDirectory)); + InitDrawingParams(strcmp(oldPieceDir, appData.pieceDirectory)); InitDrawingSizes(-1, 0); DrawPosition(True, NULL); return 1; @@ -814,8 +807,7 @@ static Option boardOptions[] = { { 0, 0, 0, NULL, (void*) &appData.liteBackTextureFile, ".xpm", NULL, FileName, N_("Light-Squares Texture File:") }, { 0, 0, 0, NULL, (void*) &appData.darkBackTextureFile, ".xpm", NULL, FileName, N_("Dark-Squares Texture File:") }, { 0, 0, 0, NULL, (void*) &appData.trueColors, "", NULL, CheckBox, N_("Use external piece bitmaps with their own colors") }, -{ 0, 0, 0, NULL, (void*) &appData.pngDirectory, "", NULL, PathName, N_("Directory with PNG Pieces:") }, -{ 0, 0, 0, NULL, (void*) &appData.svgDirectory, "", NULL, PathName, N_("Directory with SVG Pieces:") }, +{ 0, 0, 0, NULL, (void*) &appData.pieceDirectory, "", NULL, PathName, N_("Directory with Pieces Images:") }, { 0, 0, 0, NULL, (void*) &BoardOptionsOK, "", NULL, EndMark , "" } }; @@ -864,8 +856,7 @@ AdjustColor (int i) void BoardOptionsProc () { - strncpy(oldPngDir, appData.pngDirectory, MSG_SIZ-1); // to see if it changed - strncpy(oldSvgDir, appData.svgDirectory, MSG_SIZ-1); // to see if it changed + strncpy(oldPieceDir, appData.pieceDirectory, MSG_SIZ-1); // to see if it changed GenericPopUp(boardOptions, _("Board Options"), TransientDlg, BoardWindow, MODAL, 0); } @@ -1828,10 +1819,12 @@ DisplayFatalError (String message, int error, int status) snprintf(buf, sizeof(buf), "%s: %s", message, strerror(error)); message = buf; } - if (appData.popupExitMessage && boardWidget && XtIsRealized(boardWidget)) { - ErrorPopUp(status ? _("Fatal Error") : _("Exiting"), message, TRUE); - } else { - ExitEvent(status); + if(mainOptions[W_BOARD].handle) { + if (appData.popupExitMessage) { + ErrorPopUp(status ? _("Fatal Error") : _("Exiting"), message, TRUE); + } else { + ExitEvent(status); + } } }