mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +00:00
[BROWSEUI]
* Plug a few menu leaks. In Windows, it brings down the leaked menus from 20 per navigation, to only 1-2. In ReactOS, from 60 to 20. [RSHELL,SHELL32] * Code tweaks that shouldn't change the actual behaviour. svn path=/branches/shell-experiments/; revision=63537
This commit is contained in:
parent
52fc0bf57d
commit
580b89e9b6
|
@ -1095,6 +1095,10 @@ CMenuStaticToolbar::CMenuStaticToolbar(CMenuBand *menuBand) :
|
|||
{
|
||||
}
|
||||
|
||||
CMenuStaticToolbar::~CMenuStaticToolbar()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMenuStaticToolbar::GetMenu(
|
||||
_Out_opt_ HMENU *phmenu,
|
||||
_Out_opt_ HWND *phwnd,
|
||||
|
|
|
@ -132,7 +132,7 @@ private:
|
|||
|
||||
public:
|
||||
CMenuStaticToolbar(CMenuBand *menuBand);
|
||||
virtual ~CMenuStaticToolbar() {}
|
||||
virtual ~CMenuStaticToolbar();
|
||||
|
||||
HRESULT SetMenu(HMENU hmenu, HWND hwnd, DWORD dwFlags);
|
||||
HRESULT GetMenu(HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags);
|
||||
|
|
|
@ -1680,6 +1680,8 @@ LRESULT CInternetToolbar::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam,
|
|||
SendMessage(fToolbarWindow, TB_CUSTOMIZE, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
DestroyMenu(contextMenuBar);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1571,8 +1571,15 @@ void CShellBrowser::UpdateViewMenu(HMENU theMenu)
|
|||
DeleteMenu(theMenu, IDM_VIEW_TOOLBARS, MF_BYCOMMAND);
|
||||
else
|
||||
{
|
||||
menuItemInfo.cbSize = sizeof(menuItemInfo);
|
||||
menuItemInfo.fMask = MIIM_SUBMENU;
|
||||
GetMenuItemInfo(theMenu, IDM_VIEW_TOOLBARS, FALSE, &menuItemInfo);
|
||||
DestroyMenu(menuItemInfo.hSubMenu);
|
||||
|
||||
toolbarMenuBar = LoadMenu(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCE(IDM_CABINET_CONTEXTMENU));
|
||||
toolbarMenu = GetSubMenu(toolbarMenuBar, 0);
|
||||
RemoveMenu(toolbarMenuBar, 0, MF_BYPOSITION);
|
||||
DestroyMenu(toolbarMenuBar);
|
||||
|
||||
SHCheckMenuItem(toolbarMenu, IDM_TOOLBARS_STANDARDBUTTONS, commandList[0].cmdf);
|
||||
SHCheckMenuItem(toolbarMenu, IDM_TOOLBARS_ADDRESSBAR, commandList[1].cmdf & OLECMDF_ENABLED);
|
||||
|
@ -1847,6 +1854,8 @@ HRESULT STDMETHODCALLTYPE CShellBrowser::InsertMenusSB(HMENU hmenuShared, LPOLEM
|
|||
int GCCU(itemCount3) = GetMenuItemCount(hmenuShared);
|
||||
Unused(itemCount3);
|
||||
|
||||
DestroyMenu(mainMenu);
|
||||
|
||||
lpMenuWidths->width[0] = 2;
|
||||
lpMenuWidths->width[2] = 3;
|
||||
lpMenuWidths->width[4] = 1;
|
||||
|
|
|
@ -1383,9 +1383,7 @@ void CDefView::DoActivate(UINT uState)
|
|||
for (int i = 0; i < mic; i++)
|
||||
{
|
||||
HMENU submenu = GetSubMenu(m_hMenu, 0);
|
||||
RemoveMenu(m_hMenu, 0, MF_BYPOSITION);
|
||||
if (submenu)
|
||||
DestroyMenu(submenu);
|
||||
DeleteMenu(m_hMenu, 0, MF_BYPOSITION);
|
||||
}
|
||||
|
||||
m_pShellBrowser->InsertMenusSB(m_hMenu, &omw);
|
||||
|
|
Loading…
Reference in a new issue