use new menubar classes.

This commit is contained in:
pinkerton%netscape.com 1998-09-29 17:22:26 +00:00
parent 6af170cb77
commit 7cca27c1de

View File

@ -34,6 +34,7 @@
#endif
#include "CBrowserWindow.h" // need for MapWindowTypeToMBARResID - mjc
#include "menusharing.h"
#include <LAppearanceMBAR.h>
CNSMenuBarManager* CNSMenuBarManager::sManager = NULL;
@ -159,8 +160,13 @@ void CNSMenuBarManager::SwitchMenuBar(ResIDT inMenuBarID)
currentMenuBar->RemoveMenu(historyMenu);
delete (currentMenuBar);
DisposeSharedMenus();
// create new menubar
new LMenuBar( inMenuBarID );
// create new menubar (use appearance if present)
if ( UEnvironment::HasFeature( env_HasAppearance ) )
new LAppearanceMBAR(inMenuBarID);
else
new LMenuBar(inMenuBarID);
// now put go and window menus into new menubar
currentMenuBar = LMenuBar::GetCurrentMenuBar();
if (inMenuBarID == MBAR_Initial)