зеркало из https://github.com/mozilla/pjs.git
Hook up the bookmarks and history windows. Get rid of the unneeded command handing stuff.
This commit is contained in:
Родитель
574029d7cb
Коммит
8654251887
|
@ -101,39 +101,29 @@ XFE_NavCenterFrame::~XFE_NavCenterFrame()
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
XP_Bool
|
/*static*/ void
|
||||||
XFE_NavCenterFrame::isCommandEnabled(CommandType cmd,
|
XFE_NavCenterFrame::showBookmarks (Widget toplevel, XFE_Frame *parent_frame)
|
||||||
void *calldata, XFE_CommandInfo*)
|
|
||||||
{
|
{
|
||||||
{
|
// not a static global, since we can have multiple browsers.
|
||||||
return XFE_Frame::isCommandEnabled(cmd, calldata);
|
XFE_NavCenterFrame *theFrame;
|
||||||
}
|
MWContext *theContext = NULL;
|
||||||
|
|
||||||
|
theFrame = new XFE_NavCenterFrame(toplevel, parent_frame, NULL);
|
||||||
|
theFrame->getNavCenterView()->newBookmarksPane();
|
||||||
|
theFrame->show();
|
||||||
}
|
}
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
void
|
/*static*/ void
|
||||||
XFE_NavCenterFrame::doCommand(CommandType cmd, void *calldata, XFE_CommandInfo*info)
|
XFE_NavCenterFrame::showHistory (Widget toplevel, XFE_Frame *parent_frame)
|
||||||
{
|
{
|
||||||
{
|
// not a static global, since we can have multiple browsers.
|
||||||
XFE_Frame::doCommand(cmd,calldata,info);
|
XFE_NavCenterFrame *theFrame;
|
||||||
}
|
MWContext *theContext = NULL;
|
||||||
|
|
||||||
|
theFrame = new XFE_NavCenterFrame(toplevel, parent_frame, NULL);
|
||||||
|
theFrame->getNavCenterView()->newHistoryPane();
|
||||||
|
theFrame->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean
|
|
||||||
XFE_NavCenterFrame::handlesCommand(CommandType cmd, void *calldata,
|
|
||||||
XFE_CommandInfo* info)
|
|
||||||
{
|
|
||||||
{
|
|
||||||
return XFE_Frame::handlesCommand(cmd, calldata, info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
char *
|
|
||||||
XFE_NavCenterFrame::commandToString(CommandType cmd, void* calldata,
|
|
||||||
XFE_CommandInfo* info)
|
|
||||||
{
|
|
||||||
return XFE_Frame::commandToString(cmd, calldata, info);
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
extern "C" MWContext *
|
extern "C" MWContext *
|
||||||
fe_showNavCenter(Widget toplevel, XFE_Frame *parent_frame, Chrome *chromespec, URL_Struct * /* url */)
|
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;
|
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"
|
#include "Frame.h"
|
||||||
|
|
||||||
|
class XFE_NavCenterView;
|
||||||
|
|
||||||
class XFE_NavCenterFrame : public XFE_Frame
|
class XFE_NavCenterFrame : public XFE_Frame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -34,16 +36,10 @@ public:
|
||||||
Chrome *chromespec);
|
Chrome *chromespec);
|
||||||
virtual ~XFE_NavCenterFrame();
|
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_NavCenterView * getNavCenterView() {return (XFE_NavCenterView*)m_view;}
|
||||||
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);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static MenuSpec menu_bar_spec[];
|
static MenuSpec menu_bar_spec[];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче