This commit is contained in:
thom%netscape.com 1998-09-12 00:06:05 +00:00
Родитель 45e27c6264
Коммит 0adf838257
1 изменённых файлов: 20 добавлений и 2 удалений

Просмотреть файл

@ -15,11 +15,14 @@
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include <Menus.h>
#include "nsViewerApp.h"
#include "nsBrowserWindow.h"
#include "nsIImageManager.h"
#include <stdlib.h>
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;
}