Remove unnecessary Xt colors and call to MakeColors
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 13 Oct 2012 05:57:48 +0000 (07:57 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sun, 21 Oct 2012 09:28:25 +0000 (11:28 +0200)
draw.c
draw.h
xboard.c

diff --git a/draw.c b/draw.c
index ea6e4be..9368227 100644 (file)
--- a/draw.c
+++ b/draw.c
@@ -355,7 +355,6 @@ void
 InitDrawingParams (int reloadPieces)
 {
     int i, p;
-    MakeColors();
     if(reloadPieces)
     for(i=0; i<2; i++) for(p=0; p<BlackPawn+4; p++) {
        if(pngPieceImages[i][p]) cairo_surface_destroy(pngPieceImages[i][p]);
diff --git a/draw.h b/draw.h
index fee4ccb..cbf77f4 100644 (file)
--- a/draw.h
+++ b/draw.h
@@ -52,7 +52,6 @@
 #define DRAWABLE(X) ((cairo_surface_t *) ((X)->choice))
 
 // defined in xboard.c
-int MakeColors P((void));
 void ResizeBoardWindow P((int w, int h, int inhibit));
 void CreateGrid P((void));
 void CreateGCs P((int redo));
index 62b696b..c6f0c80 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -275,8 +275,6 @@ int xtVersion = XtSpecificationRelease;
 int xScreen;
 Display *xDisplay;
 Window xBoardWindow;
-Pixel lightSquareColor, darkSquareColor, whitePieceColor, blackPieceColor,
-  highlightSquareColor, premoveHighlightColor;       // used in graphics
 Pixel lowTimeWarningColor, dialogColor, buttonColor; // used in widgets
 Pixmap iconPixmap, wIconPixmap, bIconPixmap, xMarkPixmap;
 Widget shellWidget, formWidget, boardWidget, titleWidget, dropMenu, menuBarWidget;
@@ -911,12 +909,6 @@ MakeColors ()
 {   // [HGM] taken out of main(), so it can be called from BoardOptions dialog
     int forceMono = False;
 
-    forceMono |= MakeOneColor(appData.lightSquareColor, &lightSquareColor);
-    forceMono |= MakeOneColor(appData.darkSquareColor, &darkSquareColor);
-    forceMono |= MakeOneColor(appData.whitePieceColor, &whitePieceColor);
-    forceMono |= MakeOneColor(appData.blackPieceColor, &blackPieceColor);
-    forceMono |= MakeOneColor(appData.highlightSquareColor, &highlightSquareColor);
-    forceMono |= MakeOneColor(appData.premoveHighlightColor, &premoveHighlightColor);
     if (appData.lowTimeWarning)
        forceMono |= MakeOneColor(appData.lowTimeWarningColor, &lowTimeWarningColor);
     if(appData.dialogColor[0]) MakeOneColor(appData.dialogColor, &dialogColor);