Add a PR_ASSERT (yes, a crash) for unreproducible crash 113534;

add code for "Send now" under Publish menu, but only if MOZ_MAIL_NEWS.
This commit is contained in:
akkana%netscape.com 1998-08-27 01:55:52 +00:00
Родитель ba2ce62f00
Коммит bc0fa84e29
4 изменённых файлов: 46 добавлений и 1 удалений

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

@ -628,10 +628,15 @@ Send current page location to a recipient
*Editor*menuBar*saveAs.acceleratorText: *Editor*menuBar*saveAs.acceleratorText:
! Publish appears twice: when MOZ_MAIL_NEWS, it has a submenu
*menuBar*publish.labelString: Publish... *menuBar*publish.labelString: Publish...
*menuBar*publish.mnemonic: u *menuBar*publish.mnemonic: u
*publish.documentationString: \ *publish.documentationString: \
Upload current file or directory to a server for public viewing Upload current file or directory to a server for public viewing
*menuBar*publishMenu.labelString: Publish...
*menuBar*publishMenu.mnemonic: u
*publishMenu.documentationString: \
Upload current file or directory to a server for public viewing
*menuBar*browsePage.labelString: Browse Page *menuBar*browsePage.labelString: Browse Page
*menuBar*browsePage.mnemonic: B *menuBar*browsePage.mnemonic: B
@ -2840,6 +2845,7 @@ Insert an arbitrary HTML Tag at the insertion location
*toolBar*save.labelString: Save *toolBar*save.labelString: Save
*toolBar*saveAs.labelString: Save As... *toolBar*saveAs.labelString: Save As...
*toolBar*publish.labelString: Publish *toolBar*publish.labelString: Publish
*toolBar*publishMenu.labelString: Publish
*toolBar*sendPage.labelString: Send Page *toolBar*sendPage.labelString: Send Page
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -2854,6 +2860,7 @@ Insert an arbitrary HTML Tag at the insertion location
*toolBar.copy.labelString: Copy *toolBar.copy.labelString: Copy
*toolBar.paste.labelString: Paste *toolBar.paste.labelString: Paste
*toolBar.publish.labelString: Publish *toolBar.publish.labelString: Publish
*toolBar.publishMenu.labelString: Publish
! new ! new
*toolBar.newBlank.labelString: New *toolBar.newBlank.labelString: New
*newBlank.tipString: New Page *newBlank.tipString: New Page

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

@ -100,7 +100,12 @@ MenuSpec XFE_EditorFrame::file_menu_spec[] = {
MENU_SEPARATOR, MENU_SEPARATOR,
{ xfeCmdSave, PUSHBUTTON }, { xfeCmdSave, PUSHBUTTON },
{ xfeCmdSaveAs, PUSHBUTTON }, { xfeCmdSaveAs, PUSHBUTTON },
#ifdef MOZ_MAIL_NEWS
{ "publishMenu", CASCADEBUTTON,
(MenuSpec*)&XFE_EditorFrame::publish_submenu_spec },
#else /* MOZ_MAIL_NEWS */
{ xfeCmdPublish, PUSHBUTTON }, { xfeCmdPublish, PUSHBUTTON },
#endif /* MOZ_MAIL_NEWS */
MENU_SEPARATOR, MENU_SEPARATOR,
{ xfeCmdSendPage, PUSHBUTTON }, { xfeCmdSendPage, PUSHBUTTON },
{ xfeCmdBrowsePage, PUSHBUTTON }, { xfeCmdBrowsePage, PUSHBUTTON },
@ -371,11 +376,13 @@ MenuSpec XFE_EditorFrame::save_submenu_spec[] = {
{ NULL } { NULL }
}; };
#ifdef MOZ_MAIL_NEWS
MenuSpec XFE_EditorFrame::publish_submenu_spec[] = { MenuSpec XFE_EditorFrame::publish_submenu_spec[] = {
MENU_PUSHBUTTON(xfeCmdPublish), MENU_PUSHBUTTON(xfeCmdPublish),
MENU_PUSHBUTTON(xfeCmdSendPage), MENU_PUSHBUTTON(xfeCmdSendPage),
{ NULL } { NULL }
}; };
#endif /* MOZ_MAIL_NEWS */
static ToolbarSpec editor_file_toolbar_spec[] = { static ToolbarSpec editor_file_toolbar_spec[] = {
{ {
@ -404,12 +411,21 @@ static ToolbarSpec editor_file_toolbar_spec[] = {
}, },
{ xfeCmdBrowsePage, PUSHBUTTON, &ed_browse_group }, { xfeCmdBrowsePage, PUSHBUTTON, &ed_browse_group },
{ {
xfeCmdPublish, #ifdef MOZ_MAIL_NEWS
"publishMenu",
CASCADEBUTTON, CASCADEBUTTON,
&ed_publish_group, NULL, NULL, NULL, // Icons &ed_publish_group, NULL, NULL, NULL, // Icons
(MenuSpec*) &XFE_EditorFrame::publish_submenu_spec, // Submenu spec (MenuSpec*) &XFE_EditorFrame::publish_submenu_spec, // Submenu spec
NULL , NULL, // Generate proc NULL , NULL, // Generate proc
XFE_TOOLBAR_DELAY_LONG // Popup delay XFE_TOOLBAR_DELAY_LONG // Popup delay
#else /* MOZ_MAIL_NEWS */
xfeCmdPublish,
PUSHBUTTON,
&ed_publish_group, NULL, NULL, NULL, // Icons
NULL, // Submenu spec
NULL , NULL, // Generate proc
XFE_TOOLBAR_DELAY_LONG // Popup delay
#endif /* MOZ_MAIL_NEWS */
}, },
TOOLBAR_SEPARATOR, TOOLBAR_SEPARATOR,
{ xfeCmdPrint, PUSHBUTTON, &ed_print_group }, { xfeCmdPrint, PUSHBUTTON, &ed_print_group },

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

@ -79,7 +79,9 @@ public:
static MenuSpec new_submenu_spec[]; static MenuSpec new_submenu_spec[];
static MenuSpec save_submenu_spec[]; static MenuSpec save_submenu_spec[];
#ifdef MOZ_MAIL_NEWS
static MenuSpec publish_submenu_spec[]; static MenuSpec publish_submenu_spec[];
#endif
// alignment menu spec needs to be public so BrowserFrame can // alignment menu spec needs to be public so BrowserFrame can
// use it for embedded editors: // use it for embedded editors:

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

@ -258,6 +258,20 @@ public:
}; };
}; };
#ifdef MOZ_MAIL_NEWS
class SendPageCommand : public AlwaysEnabledCommand
{
public:
SendPageCommand(XFE_EditorView *v) : AlwaysEnabledCommand(xfeCmdSendPage, v) {};
void reallyDoCommand(XFE_View* view, XFE_CommandInfo*) {
void fe_mailto_cb(Widget , XtPointer, XtPointer);
fe_mailto_cb(CONTEXT_WIDGET (view->getContext()),
(XtPointer) view->getContext(), NULL);
};
};
#endif /* MOZ_MAIL_NEWS */
class DeleteTableCommand : public XFE_EditorViewCommand class DeleteTableCommand : public XFE_EditorViewCommand
{ {
public: public:
@ -821,6 +835,9 @@ static XFE_CommandParameters set_font_size_params[] = {
int int
XFE_CommandParametersGetIndexByName(XFE_CommandParameters* list, char* name) XFE_CommandParametersGetIndexByName(XFE_CommandParameters* list, char* name)
{ {
PR_ASSERT(name != 0); // we really do want a crash here if we see this
if (name == 0)
return -1;
unsigned i; unsigned i;
for (i = 0; list[i].name != NULL; i++) { for (i = 0; list[i].name != NULL; i++) {
if (XP_STRCASECMP(name, list[i].name) == 0) if (XP_STRCASECMP(name, list[i].name) == 0)
@ -2865,6 +2882,9 @@ XFE_EditorView::XFE_EditorView(XFE_Component *toplevel_component,
registerCommand(m_commands, new SaveCommand(ev)); registerCommand(m_commands, new SaveCommand(ev));
registerCommand(m_commands, new SaveAsCommand(ev)); registerCommand(m_commands, new SaveAsCommand(ev));
registerCommand(m_commands, new PublishCommand(ev)); registerCommand(m_commands, new PublishCommand(ev));
#ifdef MOZ_MAIL_NEWS
registerCommand(m_commands, new SendPageCommand(ev));
#endif /* MOZ_MAIL_NEWS */
registerCommand(m_commands, new DeleteTableCommand(ev)); registerCommand(m_commands, new DeleteTableCommand(ev));
registerCommand(m_commands, new DeleteTableCellCommand(ev)); registerCommand(m_commands, new DeleteTableCellCommand(ev));
registerCommand(m_commands, new DeleteTableRowCommand(ev)); registerCommand(m_commands, new DeleteTableRowCommand(ev));