[ros-diffs] [weiden] 30515: Allow selecting disabled menu items

weiden at svn.reactos.org weiden at svn.reactos.org
Sat Nov 17 03:24:51 CET 2007


Author: weiden
Date: Sat Nov 17 05:24:50 2007
New Revision: 30515

URL: http://svn.reactos.org/svn/reactos?rev=30515&view=rev
Log:
Allow selecting disabled menu items

Modified:
    trunk/reactos/dll/win32/user32/windows/menu.c

Modified: trunk/reactos/dll/win32/user32/windows/menu.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/menu.c?rev=30515&r1=30514&r2=30515&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/menu.c (original)
+++ trunk/reactos/dll/win32/user32/windows/menu.c Sat Nov 17 05:24:50 2007
@@ -2081,8 +2081,7 @@
         }
       /* If this is a good candidate; */
       if (MenuGetRosMenuItemInfo(MenuInfo->Self, i, &ItemInfo) &&
-          0 == (ItemInfo.fType & MF_SEPARATOR) &&
-          0 == (ItemInfo.fState & (MFS_DISABLED | MFS_GRAYED)) )
+          0 == (ItemInfo.fType & MF_SEPARATOR))
         {
           MenuSelectItem(WndOwner, MenuInfo, i, TRUE, NULL);
           MenuCleanupRosMenuItemInfo(&ItemInfo);
@@ -2638,11 +2637,11 @@
     {
 	MenuInitRosMenuItemInfo(&ItemInfo);
 	if (MenuGetRosMenuItemInfo(MenuInfo.Self, Index, &ItemInfo) &&
-           !(ItemInfo.fType & MF_SEPARATOR) &&
-           !(ItemInfo.fState & (MFS_DISABLED | MFS_GRAYED)) )
+           !(ItemInfo.fType & MF_SEPARATOR))
 	{
 	    MenuSwitchTracking(Mt, &MenuInfo, Index);
-	    Mt->CurrentMenu = MenuShowSubPopup(Mt->OwnerWnd, &MenuInfo, FALSE, Flags);
+        if (!(ItemInfo.fState & (MFS_DISABLED | MFS_GRAYED)))
+	        Mt->CurrentMenu = MenuShowSubPopup(Mt->OwnerWnd, &MenuInfo, FALSE, Flags);
 	}
 	MenuCleanupRosMenuItemInfo(&ItemInfo);
     }




More information about the Ros-diffs mailing list