X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=42e6379d1e2b3319c570cbb42e8b7ef8527467e7;hb=ac9d48038a86a672579abbcbbc53b17e2515ba13;hp=fa550080f06d712f5a825e8db2fb8b37848d2a72;hpb=b8dda57c7dbcd5942d43523e7e1dbb3755348649;p=xboard.git diff --git a/dialogs.c b/dialogs.c index fa55008..42e6379 100644 --- a/dialogs.c +++ b/dialogs.c @@ -752,12 +752,14 @@ SoundOptionsProc () 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; - useImages = useImageSqs = 0; - InitDrawingParams(); + InitDrawingParams(strcmp(oldPngDir, appData.pngDirectory) || strcmp(oldSvgDir, appData.svgDirectory)); InitDrawingSizes(-1, 0); DrawPosition(True, NULL); return 1; @@ -811,8 +813,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.bitmapDirectory, "", NULL, PathName, N_("Directory with Bitmap Pieces:") }, -{ 0, 0, 0, NULL, (void*) &appData.pixmapDirectory, "", NULL, PathName, N_("Directory with Pixmap Pieces:") }, +{ 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 , "" } }; @@ -861,6 +863,8 @@ 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 GenericPopUp(boardOptions, _("Board Options"), TransientDlg, BoardWindow, MODAL, 0); } @@ -892,6 +896,7 @@ IcsTextProc () if((p = icsTextMenuString) == NULL) return; do { q = r = p; while(*p && *p != ';') p++; + if(textOptions[i].name == NULL) textOptions[i].name = (char*) malloc(MSG_SIZ); for(j=0; j