X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=c27fdfe2c3999777bd7df0d0824e373e3ed22325;hb=15eab3074ed1dc476c19b48da66e82dea27399b5;hp=ebdd93cb4aa889ede129be21191ddbf435015937;hpb=faa0fea4cf9cc9de2d73add4695af3ed06517787;p=xboard.git diff --git a/dialogs.c b/dialogs.c index ebdd93c..c27fdfe 100644 --- a/dialogs.c +++ b/dialogs.c @@ -753,12 +753,13 @@ static void DefColor P((int n)); static void AdjustColor P((int i)); static char oldPngDir[MSG_SIZ]; +static char oldSvgDir[MSG_SIZ]; static int BoardOptionsOK (int n) { if(appData.overrideLineGap >= 0) lineGap = appData.overrideLineGap; else lineGap = defaultLineGap; - InitDrawingParams(strcmp(oldPngDir, appData.pngDirectory)); + InitDrawingParams(strcmp(oldPngDir, appData.pngDirectory) || strcmp(oldSvgDir, appData.svgDirectory)); InitDrawingSizes(-1, 0); DrawPosition(True, NULL); return 1; @@ -812,7 +813,9 @@ 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.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*) &BoardOptionsOK, "", NULL, EndMark , "" } }; @@ -862,6 +865,7 @@ 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 GenericPopUp(boardOptions, _("Board Options"), TransientDlg, BoardWindow, MODAL, 0); } @@ -2073,6 +2077,7 @@ Exp (int n, int x, int y) case 10: sizing = (oldW != x || oldH != y); oldW = x; oldH = y; + InitDrawingHandle(mainOptions + W_BOARD); if(sizing) return NULL; // don't redraw while sizing DrawPosition(True, NULL); default: