X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=a826a37becab908306466628dccd627e831c7576;hb=89765faf3da5d11d2113bdf25ef13f936d118589;hp=7659f5b3755937c28908145e5c61d2615c39d137;hpb=0c01e9c47c1bb45e9abaa0451f86bfb60d1b15d6;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 7659f5b..a826a37 100644 --- a/dialogs.c +++ b/dialogs.c @@ -752,13 +752,13 @@ SoundOptionsProc () static void DefColor P((int n)); static void AdjustColor P((int i)); -static char oldPngDir[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)); + InitDrawingParams(strcmp(oldPieceDir, appData.pieceDirectory)); InitDrawingSizes(-1, 0); DrawPosition(True, NULL); return 1; @@ -812,7 +812,8 @@ static Option boardOptions[] = { { 0, 0, 0, NULL, (void*) &appData.useBitmaps, "", NULL, CheckBox, N_("Use Board Textures") }, { 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.pngDirectory, "", NULL, PathName, N_("Directory with PNG Pieces:") }, +{ 0, 0, 0, NULL, (void*) &appData.trueColors, "", NULL, CheckBox, N_("Use external piece bitmaps with their own colors") }, +{ 0, 0, 0, NULL, (void*) &appData.pieceDirectory, "", NULL, PathName, N_("Directory with Pieces Images:") }, { 0, 0, 0, NULL, (void*) &BoardOptionsOK, "", NULL, EndMark , "" } }; @@ -861,7 +862,7 @@ AdjustColor (int i) void BoardOptionsProc () { - strncpy(oldPngDir, appData.pngDirectory, 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); } @@ -1824,10 +1825,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); + } } }