X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxboard.c;h=1c3ffc76607715fa075e7454d7c18fca5373d65a;hb=HEAD;hp=79ffd021799871f848aa5af29f4cacfe92155ebb;hpb=80b7ad96d781916a2964f0e31088dfe04c8fea63;p=xboard.git diff --git a/xaw/xboard.c b/xaw/xboard.c index 79ffd02..1c3ffc7 100644 --- a/xaw/xboard.c +++ b/xaw/xboard.c @@ -5,7 +5,8 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free + * Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -148,6 +149,7 @@ extern char *getenv(); #include #endif +#include #include #include #include @@ -1232,7 +1234,7 @@ main (int argc, char **argv) boardWidget = optList[W_BOARD].handle; menuBarWidget = optList[W_MENU].handle; dropMenu = optList[W_DROP].handle; - titleWidget = optList[optList[W_TITLE].type != -1 ? W_TITLE : W_SMALL].handle; + titleWidget = optList[optList[W_TITLE].type != Skip ? W_TITLE : W_SMALL].handle; formWidget = XtParent(boardWidget); XtSetArg(args[0], XtNbackground, &timerBackgroundPixel); XtSetArg(args[1], XtNforeground, &timerForegroundPixel); @@ -1707,7 +1709,7 @@ ReSize (WindowPlacement *wp) if(sqy < sqx) sqx = sqy; if(sqx != squareSize) { squareSize = sqx; // adopt new square size - CreatePNGPieces(); // make newly scaled pieces + CreatePNGPieces(appData.pieceDirectory); // make newly scaled pieces InitDrawingSizes(0, 0); // creates grid etc. } else ResizeBoardWindow(BOARD_WIDTH * (squareSize + lineGap) + lineGap, BOARD_HEIGHT * (squareSize + lineGap) + lineGap, 0); w = BOARD_WIDTH * (squareSize + lineGap) + lineGap; @@ -1996,6 +1998,7 @@ PasteGameCB (Widget w, XtPointer client_data, Atom *selection, Atom *type, XtPointer value, unsigned long *len, int *format) { FILE* f; + int flip = appData.flipView; if (value == NULL || *len == 0) { return; /* nothing had been selected to copy */ } @@ -2007,7 +2010,9 @@ PasteGameCB (Widget w, XtPointer client_data, Atom *selection, fwrite(value, 1, *len, f); fclose(f); XtFree(value); + if(!appData.autoFlipView) appData.flipView = flipView; LoadGameFromFile(gamePasteFilename, 0, gamePasteFilename, TRUE); + appData.flipView = flip; } /* called when Paste Game button is pressed,