X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwinboard.c;h=1e65185420139d768f9a9d0cde816d0d2bf76545;hb=57a86b65b29bfbd0c485aa39f8cbf96486e3d882;hp=24fd967df54780be9da6bdc0cd0dd3106e5ebf7a;hpb=8e0e2f1c14e76ea660f7bff6a104baed0f0048df;p=xboard.git diff --git a/winboard/winboard.c b/winboard/winboard.c index 24fd967..1e65185 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -347,7 +347,7 @@ static char *commentText; static int commentIndex; static Boolean editComment = FALSE; HWND commentDialog = NULL; -BOOLEAN commentDialogUp = FALSE; +int commentUp = FALSE; static int commentX, commentY, commentH, commentW; static char *analysisTitle; @@ -435,7 +435,7 @@ BOOLEAN evalGraphDialogUp = FALSE; WindowPlacement wpEvalGraph; HWND engineOutputDialog = NULL; -BOOLEAN engineOutputDialogUp = FALSE; +int engineOutputDialogUp = FALSE; WindowPlacement wpEngineOutput; WindowPlacement wpGameList; @@ -4214,7 +4214,7 @@ BOOL DrawPositionNeedsFullRepaint() but animation is fast enough that it's difficult to notice. */ if( animInfo.piece == EmptySquare ) { - if( (appData.highlightLastMove || appData.highlightDragging) && IsDrawArrowEnabled() && HasHighlightInfo() ) { + if( (appData.highlightLastMove || appData.highlightDragging) && IsDrawArrowEnabled() /*&& HasHighlightInfo()*/ ) { result = TRUE; } } @@ -4847,7 +4847,7 @@ PaintProc(HWND hwnd) * subtracted from x. */ int EventToSquare(x, limit) - int x; + int x, limit; { if (x <= 0) return -2; @@ -5780,7 +5780,7 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; case IDM_EditComment: - if (commentDialogUp && editComment) { + if (commentUp && editComment) { CommentPopDown(); } else { EditCommentEvent(); @@ -7136,14 +7136,14 @@ EitherCommentPopUp(int index, char *title, char *str, BOOLEAN edit) if (commentDialog) { SendMessage(commentDialog, WM_INITDIALOG, 0, 0); - if (!commentDialogUp) ShowWindow(commentDialog, SW_SHOW); + if (!commentUp) ShowWindow(commentDialog, SW_SHOW); } else { lpProc = MakeProcInstance((FARPROC)CommentDialog, hInst); CreateDialog(hInst, MAKEINTRESOURCE(DLG_EditComment), hwndMain, (DLGPROC)lpProc); FreeProcInstance(lpProc); } - commentDialogUp = TRUE; + commentUp = TRUE; } @@ -7186,13 +7186,8 @@ TypeInMoveDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) } // [HGM] movenum: allow move number to be typed in any mode if(sscanf(move, "%d", &n) == 1 && n != 0 ) { - currentMove = 2*n-1; - if(currentMove > forwardMostMove) currentMove = forwardMostMove; - if(currentMove < backwardMostMove) currentMove = backwardMostMove; + ToNrEvent(2*n-1); EndDialog(hDlg, TRUE); - DrawPosition(TRUE, boards[currentMove]); - if(currentMove > backwardMostMove) DisplayMove(currentMove - 1); - else DisplayMessage("", ""); return TRUE; } } @@ -9436,7 +9431,7 @@ CommentPopDown(void) if (commentDialog) { ShowWindow(commentDialog, SW_HIDE); } - commentDialogUp = FALSE; + commentUp = FALSE; } VOID