/*
* 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
#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 */
}
j=0;
XtSetArg(args[j], XtNleftBitmap, None); j++;
- XtSetValues(XtNameToWidget(menuBarWidget, "menuMode.Show Move History"),
+ XtSetValues(XtNameToWidget(menuBarWidget, "menuView.Show Move History"),
args, j);
}
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;i<last;i++) {
if(current) XawListHighlight(hist->mvb, 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
}
j=0;
XtSetArg(args[j], XtNleftBitmap, xMarkPixmap); j++;
- XtSetValues(XtNameToWidget(menuBarWidget, "menuMode.Show Move History"),
+ XtSetValues(XtNameToWidget(menuBarWidget, "menuView.Show Move History"),
args, j);
hist->Up=True;
}