X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=nhistory.c;h=809cbfb0a3d837a1aa4f9348427272d179cd0527;hb=b26b0121f5fae16ac114604a488a4b7afe89e5c9;hp=9d6a073219f7fdd2da2b8f307c6a9d60d26aa2da;hpb=f360f5c49d27a95ca64e5755c42156ee1f7e95db;p=xboard.git diff --git a/nhistory.c b/nhistory.c index 9d6a073..809cbfb 100644 --- a/nhistory.c +++ b/nhistory.c @@ -1,7 +1,7 @@ /* * New (WinBoard-style) Move history for XBoard * - * Copyright 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + * Copyright 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -15,7 +15,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. + * along with this program. If not, see http://www.gnu.org/licenses/. * * ------------------------------------------------------------------------ ** See the file ChangeLog for a revision history. */ @@ -26,8 +26,8 @@ #include #include "common.h" +#include "frontend.h" #include "backend.h" -#include "xhistory.h" #include "dialogs.h" #include "gettext.h" @@ -83,6 +83,12 @@ Option historyOptions[] = { { 0, NO_OK, 0, NULL, (void*) NULL, "", NULL, EndMark , "" } }; +void +ScrollToCurrent (int caretPos) +{ + ScrollToCursor(&historyOptions[0], caretPos); +} + // ------------ standard entry points into MoveHistory code ----------- Boolean @@ -101,7 +107,7 @@ void HistoryPopUp () { if(GenericPopUp(historyOptions, _("Move list"), HistoryDlg, BoardWindow, NONMODAL, 1)) - AddHandler(&historyOptions[0], 0); + AddHandler(&historyOptions[0], HistoryDlg, 0); MarkMenu("View.MoveHistory", HistoryDlg); }