diff --git a/mozilla/webshell/tests/viewer/nsMacMain.cpp b/mozilla/webshell/tests/viewer/nsMacMain.cpp index 73e3e149259..83040de494c 100644 --- a/mozilla/webshell/tests/viewer/nsMacMain.cpp +++ b/mozilla/webshell/tests/viewer/nsMacMain.cpp @@ -15,11 +15,14 @@ * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ +#include + #include "nsViewerApp.h" #include "nsBrowserWindow.h" #include "nsIImageManager.h" #include + static nsNativeViewerApp* gTheApp; nsNativeViewerApp::nsNativeViewerApp() @@ -48,18 +51,33 @@ nsNativeBrowserWindow::~nsNativeBrowserWindow() { } -static void MenuProc(PRUint32 aId) +/*static void MenuProc(PRUint32 aId) { // XXX our menus are horked: we can't support multiple windows! nsBrowserWindow* bw = (nsBrowserWindow*) nsBrowserWindow::gBrowsers.ElementAt(0); bw->DispatchMenuItem(aId); -} +}*/ // XXX Nothing was calling this function + +// why is width passed to this function? XXX Platform specific? nsresult nsNativeBrowserWindow::CreateMenuBar(PRInt32 aWidth) { + MenuHandle theMenu; //CreateViewerMenus(XtParent((Widget)mWindow->GetNativeData(NS_NATIVE_WIDGET)), MenuProc); + int i; + + for (i = 2000; i <= 2004; ++i) + { + theMenu = GetMenu (i); + if (i < 2003) + InsertMenu (theMenu, 0); + else + InsertMenu (theMenu, -1); + } + AppendResMenu (GetMenuHandle (2000), 'DRVR'); + DrawMenuBar(); return NS_OK; }