[SHELL32]

* Disable the hardcoded part of the File menu. It provided no useful function and couldn't be localized. It can be reintroduced later when it is done properly.

svn path=/trunk/; revision=66741
This commit is contained in:
David Quintana 2015-03-16 18:58:37 +00:00
parent 1de8ba622f
commit c05c34ec78

View file

@ -1067,6 +1067,8 @@ void CDefView::PrepareShowFileMenu(HMENU hSubMenu)
}
}
#if 0
/* FIXME/TODO: Reenable when they implemented AND localizable (not hardcoded). */
/* Insert This item at the beginning of the menu. */
_InsertMenuItemW(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
_InsertMenuItemW(hSubMenu, 0, TRUE, IDM_MYFILEITEM + 4, MFT_STRING, L"Properties", MFS_DISABLED);
@ -1075,13 +1077,20 @@ void CDefView::PrepareShowFileMenu(HMENU hSubMenu)
_InsertMenuItemW(hSubMenu, 0, TRUE, IDM_MYFILEITEM + 1, MFT_STRING, L"Create Shortcut", MFS_DISABLED);
_InsertMenuItemW(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
_InsertMenuItemW(hSubMenu, 0, TRUE, IDM_MYFILEITEM, MFT_STRING, L"New", MFS_ENABLED);
#endif
HMENU menubase = BuildFileMenu();
if (menubase)
{
int count = ::GetMenuItemCount(menubase);
int count2 = ::GetMenuItemCount(hSubMenu);
for (int i = 0; i < count; i++)
if (count2 > 0 && count > 0)
{
_InsertMenuItemW(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
}
for (int i = count-1; i >= 0; i--)
{
WCHAR label[128];
@ -1096,10 +1105,9 @@ void CDefView::PrepareShowFileMenu(HMENU hSubMenu)
mii.fType |= MFT_RADIOCHECK;
::InsertMenuItemW(hSubMenu, IDM_MYFILEITEM, FALSE, &mii);
::InsertMenuItemW(hSubMenu, 0, TRUE, &mii);
}
_InsertMenuItemW(hSubMenu, IDM_MYFILEITEM, FALSE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
::DestroyMenu(menubase);
}