X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwinboard.c;h=f27a1e64e209cfa574ce2847fd5278b47d398b6b;hb=50834a5d1deb1fa3f3edd73c61be0e55b89a637d;hp=5cf1712edc120436c82ee4382d5c70ebaadd4e32;hpb=c6338f2b9f9b3191ab810791de54826faf01bc7f;p=xboard.git diff --git a/winboard/winboard.c b/winboard/winboard.c index 5cf1712..f27a1e6 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -4112,23 +4112,9 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) switch (message) { case WM_LBUTTONDOWN: if (PtInRect((LPRECT) &whiteRect, pt)) { - if (gameMode == EditPosition) { - SetWhiteToPlayEvent(); - } else if (gameMode == EditGame || GetKeyState(VK_SHIFT) < 0) { - AdjustClock(flipClock, -1); - } else if (gameMode == IcsPlayingBlack || - gameMode == MachinePlaysWhite) { - CallFlagEvent(); - } + ClockClick(flipClock); } else if (PtInRect((LPRECT) &blackRect, pt)) { - if (gameMode == EditPosition) { - SetBlackToPlayEvent(); - } else if (gameMode == EditGame || GetKeyState(VK_SHIFT) < 0) { - AdjustClock(!flipClock, -1); - } else if (gameMode == IcsPlayingWhite || - gameMode == MachinePlaysBlack) { - CallFlagEvent(); - } + ClockClick(!flipClock); } dragInfo.start.x = dragInfo.start.y = -1; dragInfo.from = dragInfo.start; @@ -6456,8 +6442,6 @@ TypeInMoveDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) if(!ok && move[0] >= 'a') { move[0] += 'A' - 'a'; ok = 2; } // [HGM] try also capitalized if (ok==1 || ok && ParseOneMove(move, gameMode == EditPosition ? blackPlaysFirst : currentMove, &moveType, &fromX, &fromY, &toX, &toY, &promoChar)) { - if (gameMode != Training) - forwardMostMove = currentMove; UserMoveEvent(fromX, fromY, toX, toY, promoChar); } else { DisplayMoveError(_("Could not parse move")); @@ -7853,6 +7837,7 @@ Enables ncpEnables[] = { { IDM_NewChat, MF_BYCOMMAND|MF_GRAYED }, { IDM_Engine1Options, MF_BYCOMMAND|MF_GRAYED }, { IDM_Engine2Options, MF_BYCOMMAND|MF_GRAYED }, + { IDM_Sounds, MF_BYCOMMAND|MF_GRAYED }, { -1, -1 } }; @@ -8036,8 +8021,8 @@ SetICSMode() { HMENU hmenu = GetMenu(hwndMain); SetMenuEnables(hmenu, icsEnables); - EnableMenuItem(GetSubMenu(hmenu, OPTIONS_POS), ICS_POS, - MF_BYPOSITION|MF_ENABLED); + EnableMenuItem(GetSubMenu(hmenu, OPTIONS_POS), IDM_IcsOptions, + MF_BYCOMMAND|MF_ENABLED); #if ZIPPY if (appData.zippyPlay) { SetMenuEnables(hmenu, zippyEnables); @@ -8059,8 +8044,6 @@ SetNCPMode() { HMENU hmenu = GetMenu(hwndMain); SetMenuEnables(hmenu, ncpEnables); - EnableMenuItem(GetSubMenu(hmenu, OPTIONS_POS), SOUNDS_POS, - MF_BYPOSITION|MF_GRAYED); DrawMenuBar(hwndMain); }