X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xhistory.c;h=c00a9b8b46a4a6e3b49e46d0aa69d6fa3dcfa540;hb=9e82e6c5e9f309f3ca1c3b0f38cdce2cfdcfa31d;hp=008d4ca8903b4810ecef2f5324e4ca8570928d6b;hpb=ed47244d151ccf276b9e233b4415e00aa5d3d29d;p=xboard.git diff --git a/xhistory.c b/xhistory.c index 008d4ca..c00a9b8 100644 --- a/xhistory.c +++ b/xhistory.c @@ -1,7 +1,7 @@ /* * xhistory.c -- Move list window, part of X front end for XBoard * - * Copyright 2000, 2009, 2010 Free Software Foundation, Inc. + * Copyright 2000, 2009, 2010, 2011 Free Software Foundation, Inc. * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -79,12 +79,6 @@ extern char *getenv(); #define _LL_ 100 -extern Widget formWidget, shellWidget, boardWidget, menuBarWidget, historyShell; -extern Display *xDisplay; -extern int squareSize; -extern Pixmap xMarkPixmap; -extern char *layoutName; - struct History{ String *Nr,*white,*black; int aNr; /* space actually alocated */ @@ -224,6 +218,7 @@ HistoryFill() void HistorySet(char movelist[][2*MOVE_LEN],int first,int last,int current){ int i,b,m; + Widget scroll; if(hist){ if(last >= hist->aNr) HistoryAlloc(last+_LL_); for(i=0;imvb, current/2+1); else XawListUnhighlight(hist->mvb); } + if(scroll = XtNameToWidget(hist->sh, "*form.viewport.vertical")) { // [HGM] always scroll to bottom + static char *params[3] = { "", "Forward", "FullLength" }; + static XEvent event; + XtCallActionProc(scroll, "StartScroll", &event, params+1, 1); + XtCallActionProc(scroll, "NotifyScroll", &event, params+2, 1); + XtCallActionProc(scroll, "EndScroll", &event, params, 0); + } } EvalGraphSet( first, last, current, pvInfoList ); // piggy-backed }