remove nsIMenuListener interface and its usage, cuts some memory usage, faster without it, and code is much cleaner. b=400259 r=smorgan sr=roc a=pav

git-svn-id: svn://10.0.0.236/trunk@239070 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
joshmoz%gmail.com
2007-11-09 17:38:34 +00:00
parent a64bae2eaf
commit 41b4dabe30
15 changed files with 111 additions and 431 deletions

View File

@@ -109,7 +109,6 @@
#include "nsIMarkupDocumentViewer.h"
#if defined(XP_MACOSX)
#include "nsIMenuListener.h"
#include "nsIMenuBar.h"
#define USE_NATIVE_MENUS
#endif
@@ -514,12 +513,9 @@ static void LoadNativeMenus(nsIDOMDocument *aDOMDoc, nsIWidget *aParentWindow)
if (!pnsMenuBar)
return;
// set pnsMenuBar as a nsMenuListener on aParentWindow
nsCOMPtr<nsIMenuListener> menuListener = do_QueryInterface(pnsMenuBar);
// fake event
nsMenuEvent fake(PR_TRUE, 0, nsnull);
menuListener->MenuConstruct(fake, aParentWindow, menubarNode);
pnsMenuBar->MenuConstruct(fake, aParentWindow, menubarNode);
}
#endif