X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xhistory.c;h=cd572db03cad1d97eba6f4a0cbcb359805845884;hb=a84055fab56abd3cb232692e6d7f24d122f74497;hp=6bf4ad016ca3246cd26c6653d0cd8f4da320d7e3;hpb=69656fe54eff5920804b263f74ec472f700ec12e;p=xboard.git diff --git a/xhistory.c b/xhistory.c index 6bf4ad0..cd572db 100644 --- a/xhistory.c +++ b/xhistory.c @@ -103,6 +103,7 @@ void HistorySet(char movelist[][2*MOVE_LEN],int first,int last,int current) /* TODO need to add highlights for current move */ /* TODO need to add navigation by keyboard or mouse (double click on move) */ + /* first clear everything, do we need this? */ gtk_list_store_clear(LIST_MoveHistory); @@ -142,7 +143,7 @@ void HistorySet(char movelist[][2*MOVE_LEN],int first,int last,int current) /* save move */ gtk_list_store_append (LIST_MoveHistory, &iter); gtk_list_store_set (LIST_MoveHistory, &iter, - 0, i, + 0, (i/2 +1), 1, movewhite, 2, moveblack, -1); @@ -155,17 +156,18 @@ void HistorySet(char movelist[][2*MOVE_LEN],int first,int last,int current) /* check if there is a white move left */ if(movewhite[0]) { - i++; strcpy(moveblack,""); + /* save move */ gtk_list_store_append (LIST_MoveHistory, &iter); gtk_list_store_set (LIST_MoveHistory, &iter, - 0, i, + 0, (i/2 +1), 1, movewhite, 2, moveblack, -1); }; + //TODO // EvalGraphSet( first, last, current, pvInfoList ); // piggy-backed