From d90010d52804227fe8fc66324f08e12e4b910daf Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 13 Oct 2012 07:33:15 +0200 Subject: [PATCH] Make fallbackPieceImageDirectory hardcoded --- Makefile.am | 3 +-- args.h | 1 - common.h | 1 - draw.c | 4 ++-- xboard.conf.in | 1 - 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4671560..5252fe7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,7 +42,7 @@ EXTRA_DIST = pixmaps sounds winboard \ DISTCLEANFILES = stamp-h AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @CAIRO_CFLAGS@ @X_CFLAGS@ -DSYSCONFDIR='"$(sysconfdir)"' \ - -DLOCALEDIR='"$(localedir)"' + -DLOCALEDIR='"$(localedir)"' -DSVGDIR='"$(svgdir)"' ACLOCAL_AMFLAGS = -I m4 @@ -138,7 +138,6 @@ dist_sounds_DATA = \ ### set correct dir in xboard.conf edit = sed -e 's|@pngdir[@]|$(pngdir)|g' \ - -e 's|@svgdir[@]|$(svgdir)|g' \ -e 's|@soundsdir[@]|$(soundsdir)|g' xboard.conf: Makefile $(srcdir)/xboard.conf.in diff --git a/args.h b/args.h index 6d9d3d0..4621f52 100644 --- a/args.h +++ b/args.h @@ -213,7 +213,6 @@ ArgDescriptor argDescriptors[] = { { "flashRate", ArgInt, (void *) &appData.flashRate, XBOARD, (ArgIniType) FLASH_RATE }, { "pieceImageDirectory", ArgFilename, (void *) &appData.pieceDirectory, XBOARD, (ArgIniType) "" }, { "pid", ArgFilename, (void *) &appData.pieceDirectory, FALSE, INVALID }, - { "fallbackPieceImageDirectory", ArgFilename, (void *) &appData.svgDirectory, FALSE, (ArgIniType) "" }, { "trueColors", ArgBoolean, (void *) &appData.trueColors, TRUE, (ArgIniType) FALSE }, { "soundDirectory", ArgFilename, (void *) &appData.soundDirectory, XBOARD, (ArgIniType) "" }, { "msLoginDelay", ArgInt, (void *) &appData.msLoginDelay, XBOARD, (ArgIniType) MS_LOGIN_DELAY }, diff --git a/common.h b/common.h index 2fca8fb..f150655 100644 --- a/common.h +++ b/common.h @@ -409,7 +409,6 @@ typedef struct { Boolean noChessProgram; char *host[ENGINES]; char *pieceDirectory; - char *svgDirectory; char *soundDirectory; char *remoteShell; char *remoteUser; diff --git a/draw.c b/draw.c index 193f65c..7307e66 100644 --- a/draw.c +++ b/draw.c @@ -276,7 +276,7 @@ ScaleOnePiece (int color, int piece) } if(!pngPieceImages[color][piece]) { // we still did not manage to acquire a piece bitmap - if(!(svgPieces[color][piece] = LoadSVG(appData.svgDirectory, color, piece))) // try to fall back on installed svg + if(!(svgPieces[color][piece] = LoadSVG(SVGDIR, color, piece))) // try to fall back on installed svg DisplayError(_("No default pieces installed\nSelect your own -pieceImageDirectory"), 0); // give up } @@ -296,7 +296,7 @@ ScaleOnePiece (int color, int piece) cairo_paint (cr); cairo_destroy (cr); - if(!appData.trueColors || !*appData.pieceDirectory && !appData.svgDirectory) { // operate on bitmap to color it (king-size hack...) + if(!appData.trueColors || !*appData.pieceDirectory) { // operate on bitmap to color it (king-size hack...) int stride = cairo_image_surface_get_stride(cs)/4; int *buf = (int *) cairo_image_surface_get_data(cs); int i, j, p; diff --git a/xboard.conf.in b/xboard.conf.in index d3ea7c7..0e94d2c 100644 --- a/xboard.conf.in +++ b/xboard.conf.in @@ -23,7 +23,6 @@ -flashRate 5 -fontSizeTolerance 4 -useBoardTexture true --fallbackPieceImageDirectory "@svgdir@" -liteBackTextureFile "@pngdir@/wood_l.png" -darkBackTextureFile "@pngdir@/wood_d.png" -overrideLineGap 1 -- 1.7.0.4