make LoadMenus() less nsWebShellWindow specific

git-svn-id: svn://10.0.0.236/trunk@22396 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
saari%netscape.com
1999-02-28 11:14:34 +00:00
parent 827abf76bc
commit dc6c858162

View File

@@ -537,7 +537,7 @@ void nsWebShellWindow::LoadMenus(nsIDOMDocument * aDOMDoc, nsIWidget * aParentWi
// set pnsMenuBar as a nsMenuListener on aParentWindow
nsCOMPtr<nsIMenuListener> menuListener;
pnsMenuBar->QueryInterface(kIMenuListenerIID, getter_AddRefs(menuListener));
mWindow->AddMenuListener(menuListener);
aParentWindow->AddMenuListener(menuListener);
nsCOMPtr<nsIDOMNode> menuNode;
menubarNode->GetFirstChild(getter_AddRefs(menuNode));
@@ -559,7 +559,7 @@ void nsWebShellWindow::LoadMenus(nsIDOMDocument * aDOMDoc, nsIWidget * aParentWi
} // end while (nsnull != menuNode)
// Give the aParentWindow this nsMenuBar to hold onto.
mWindow->SetMenuBar(pnsMenuBar);
aParentWindow->SetMenuBar(pnsMenuBar);
// HACK: force a paint for now
pnsMenuBar->Paint();