Add a command for editing the toolbars.

This commit is contained in:
slamm%netscape.com 1998-09-24 20:19:01 +00:00
Родитель dcd1c000c9
Коммит fb8980dda6
3 изменённых файлов: 26 добавлений и 1 удалений

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

@ -30,6 +30,7 @@
#include "MozillaApp.h"
#include "ViewGlue.h"
#include "RDFToolbox.h"
#include "NavCenterFrame.h"
#include "Logo.h"
#include "xpassert.h"
#include "csid.h"
@ -149,6 +150,7 @@ MenuSpec XFE_BrowserFrame::edit_menu_spec[] = {
{ xfeCmdSearchAddress, PUSHBUTTON },
MENU_SEPARATOR,
#endif
{ xfeCmdEditToolbars, PUSHBUTTON },
{ xfeCmdEditPreferences, PUSHBUTTON },
{ NULL }
};
@ -522,6 +524,7 @@ XFE_BrowserFrame::isCommandEnabled(CommandType cmd,
|| cmd == xfeCmdTogglePersonalToolbar
#endif /*OLD_PERSONALTOOLBAR*/
|| cmd == xfeCmdToggleNavCenter
|| cmd == xfeCmdEditToolbars
)
{
return True;
@ -604,6 +607,12 @@ XFE_BrowserFrame::doCommand(CommandType cmd,
m_urlBar->clearText();
}
else if (cmd == xfeCmdEditToolbars)
{
XFE_NavCenterFrame::editToolbars(m_widget, this);
return;
}
else
{
XFE_Frame::doCommand(cmd, calldata, info);
@ -623,7 +632,9 @@ XFE_BrowserFrame::handlesCommand(CommandType cmd,
#ifdef OLD_PERSONALTOOLBAR
|| cmd == xfeCmdTogglePersonalToolbar
#endif /*OLD_PERSONALTOOLBAR*/
|| cmd == xfeCmdToggleNavCenter)
|| cmd == xfeCmdToggleNavCenter
|| cmd == xfeCmdEditToolbars
)
{
return True;
}

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

@ -125,6 +125,18 @@ XFE_NavCenterFrame::showHistory (Widget toplevel, XFE_Frame *parent_frame)
theFrame->show();
}
//////////////////////////////////////////////////////////////////////////
/*static*/ void
XFE_NavCenterFrame::editToolbars (Widget toplevel, XFE_Frame *parent_frame)
{
// not a static global, since we can have multiple browsers.
XFE_NavCenterFrame *theFrame;
MWContext *theContext = NULL;
theFrame = new XFE_NavCenterFrame(toplevel, parent_frame, NULL);
theFrame->getNavCenterView()->newToolbarPane();
theFrame->show();
}
//////////////////////////////////////////////////////////////////////////
extern "C" MWContext *
fe_showNavCenter(Widget toplevel, XFE_Frame *parent_frame, Chrome *chromespec, URL_Struct * /* url */)
{

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

@ -39,6 +39,8 @@ public:
static void showBookmarks (Widget toplevel, XFE_Frame *parent_frame);
static void showHistory (Widget toplevel, XFE_Frame *parent_frame);
static void editToolbars (Widget toplevel, XFE_Frame *parent_frame);
XFE_NavCenterView * getNavCenterView() {return (XFE_NavCenterView*)m_view;}
private: