Hook up the bookmarks and history windows. Get rid of the unneeded command handing stuff.

This commit is contained in:
slamm%netscape.com 1998-09-08 20:13:56 +00:00
Родитель 574029d7cb
Коммит 8654251887
2 изменённых файлов: 37 добавлений и 38 удалений

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

@ -101,39 +101,29 @@ XFE_NavCenterFrame::~XFE_NavCenterFrame()
}
//////////////////////////////////////////////////////////////////////////
XP_Bool
XFE_NavCenterFrame::isCommandEnabled(CommandType cmd,
void *calldata, XFE_CommandInfo*)
/*static*/ void
XFE_NavCenterFrame::showBookmarks (Widget toplevel, XFE_Frame *parent_frame)
{
{
return XFE_Frame::isCommandEnabled(cmd, calldata);
}
}
// not a static global, since we can have multiple browsers.
XFE_NavCenterFrame *theFrame;
MWContext *theContext = NULL;
void
XFE_NavCenterFrame::doCommand(CommandType cmd, void *calldata, XFE_CommandInfo*info)
theFrame = new XFE_NavCenterFrame(toplevel, parent_frame, NULL);
theFrame->getNavCenterView()->newBookmarksPane();
theFrame->show();
}
//////////////////////////////////////////////////////////////////////////
/*static*/ void
XFE_NavCenterFrame::showHistory (Widget toplevel, XFE_Frame *parent_frame)
{
{
XFE_Frame::doCommand(cmd,calldata,info);
}
}
// not a static global, since we can have multiple browsers.
XFE_NavCenterFrame *theFrame;
MWContext *theContext = NULL;
Boolean
XFE_NavCenterFrame::handlesCommand(CommandType cmd, void *calldata,
XFE_CommandInfo* info)
{
{
return XFE_Frame::handlesCommand(cmd, calldata, info);
}
theFrame = new XFE_NavCenterFrame(toplevel, parent_frame, NULL);
theFrame->getNavCenterView()->newHistoryPane();
theFrame->show();
}
char *
XFE_NavCenterFrame::commandToString(CommandType cmd, void* calldata,
XFE_CommandInfo* info)
{
return XFE_Frame::commandToString(cmd, calldata, info);
}
//////////////////////////////////////////////////////////////////////////
extern "C" MWContext *
fe_showNavCenter(Widget toplevel, XFE_Frame *parent_frame, Chrome *chromespec, URL_Struct * /* url */)
@ -154,3 +144,16 @@ fe_showNavCenter(Widget toplevel, XFE_Frame *parent_frame, Chrome *chromespec, U
return theContext;
}
extern "C" void
//////////////////////////////////////////////////////////////////////////
fe_showBookmarks(Widget toplevel)
{
XFE_NavCenterFrame::showBookmarks(toplevel, NULL /*parent_frame*/);
}
extern "C" void
fe_showHistory(Widget toplevel)
{
XFE_NavCenterFrame::showHistory(toplevel, NULL /*parent_frame*/);
}

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

@ -27,6 +27,8 @@
#include "Frame.h"
class XFE_NavCenterView;
class XFE_NavCenterFrame : public XFE_Frame
{
public:
@ -34,16 +36,10 @@ public:
Chrome *chromespec);
virtual ~XFE_NavCenterFrame();
//virtual void updateToolbar();
static void showBookmarks (Widget toplevel, XFE_Frame *parent_frame);
static void showHistory (Widget toplevel, XFE_Frame *parent_frame);
virtual XP_Bool isCommandEnabled(CommandType cmd, void *calldata = NULL,
XFE_CommandInfo* = NULL);
virtual void doCommand(CommandType cmd, void *calldata = NULL,
XFE_CommandInfo* = NULL);
virtual XP_Bool handlesCommand(CommandType cmd, void *calldata = NULL,
XFE_CommandInfo* = NULL);
virtual char *commandToString(CommandType cmd, void *calldata = NULL,
XFE_CommandInfo* = NULL);
XFE_NavCenterView * getNavCenterView() {return (XFE_NavCenterView*)m_view;}
private:
static MenuSpec menu_bar_spec[];