From 10411b603648f06ff18f56b9ce28bf38a16fb0ce Mon Sep 17 00:00:00 2001 From: "akkana%netscape.com" Date: Thu, 24 Sep 1998 21:46:32 +0000 Subject: [PATCH] Remove rosetta references from mail compose code git-svn-id: svn://10.0.0.236/trunk@10972 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cmd/xfe/commands.c | 2 -- mozilla/cmd/xfe/icons/Makefile | 14 +++++++++----- mozilla/cmd/xfe/src/AddressFolderView.cpp | 4 ++-- mozilla/cmd/xfe/src/Command.h | 2 +- mozilla/cmd/xfe/src/ComposeFrame.cpp | 2 ++ mozilla/cmd/xfe/src/ComposeView.cpp | 2 ++ mozilla/cmd/xfe/src/EditorFrame.cpp | 18 ++++++++++-------- mozilla/cmd/xfe/src/EditorFrame.h | 2 +- mozilla/cmd/xfe/src/HTMLView.cpp | 6 ++---- mozilla/cmd/xfe/xfe.h | 4 ++-- mozilla/include/msgcom.h | 4 +--- mozilla/lib/libmime/mimedrft.c | 7 ++----- mozilla/lib/mailto/msgcpane.cpp | 10 ---------- mozilla/lib/mailto/msgglue.cpp | 16 +--------------- mozilla/lib/mailto/msgsend.cpp | 19 +------------------ mozilla/lib/mailto/msgsend.h | 1 - mozilla/lib/mailto/msgsendp.cpp | 6 ------ mozilla/network/protocol/smtp/mksmtp.c | 2 +- 18 files changed, 37 insertions(+), 84 deletions(-) diff --git a/mozilla/cmd/xfe/commands.c b/mozilla/cmd/xfe/commands.c index ad2b64b4f28..1c328821fe2 100644 --- a/mozilla/cmd/xfe/commands.c +++ b/mozilla/cmd/xfe/commands.c @@ -2331,8 +2331,6 @@ fe_mailto_action (Widget widget, XEvent *event, String *av, Cardinal *ac) 0, /* attachment */ 0, /* newspost_url */ 0, /* body */ - FALSE, /* encrypt_p */ - FALSE, /* sign_p */ FALSE, /* force_plain_text */ 0 /* html_part */ ); diff --git a/mozilla/cmd/xfe/icons/Makefile b/mozilla/cmd/xfe/icons/Makefile index c5619995309..9b9eeec620b 100644 --- a/mozilla/cmd/xfe/icons/Makefile +++ b/mozilla/cmd/xfe/icons/Makefile @@ -81,14 +81,18 @@ ICONS += $(wildcard images/hidecolumn*.gif images/showcolumn*.gif) \ ICONS += $(wildcard images/M_*.gif) MAIL_OR_COMPOSE_ICONS = $(wildcard images/MNC*.gif \ - images/MNTB_Next*.gif \ - images/MNTB_Forward*.gif \ - images/MNAB_NewPerson*.gif \ - images/MN_*) + images/MNTB_Next*.gif \ + images/MNTB_Forward*.gif \ + images/MNAB_NewPerson*.gif \ + images/MN_Draft*.gif \ + images/MN_Collect*.gif \ + images/MN_MailAttach.gif \ + images/MN_P*.gif \ + images/MN_Template*.gif ) ifdef MOZ_MAIL_NEWS ICONS += $(MAIL_OR_COMPOSE_ICONS) \ - $(wildcard images/MNTB*.gif images/MNAB*.gif) \ + $(wildcard images/MNTB*.gif images/MNAB*.gif images/MN_*.gif) \ images/threadoff.gif \ images/threadon.gif images/Desk_Address.gif \ diff --git a/mozilla/cmd/xfe/src/AddressFolderView.cpp b/mozilla/cmd/xfe/src/AddressFolderView.cpp index 3896b3b3c39..7cd09c1ffb5 100644 --- a/mozilla/cmd/xfe/src/AddressFolderView.cpp +++ b/mozilla/cmd/xfe/src/AddressFolderView.cpp @@ -961,7 +961,7 @@ XFE_AddressFolderView::setupIcons() MN_People.mask_bits, FALSE); - +#ifdef MOZ_MAIL_NEWS // News fe_NewMakeIcon(getToplevel()->getBaseWidget(), BlackPixelOfScreen(XtScreen(base)), // umm. fix me @@ -972,8 +972,8 @@ XFE_AddressFolderView::setupIcons() MN_Newsgroup.mono_bits, MN_Newsgroup.color_bits, MN_Newsgroup.mask_bits, FALSE); - HG82687 +#endif /* MOZ_MAIL_NEWS */ } } diff --git a/mozilla/cmd/xfe/src/Command.h b/mozilla/cmd/xfe/src/Command.h index 38ee2c975f3..0a169d7c032 100644 --- a/mozilla/cmd/xfe/src/Command.h +++ b/mozilla/cmd/xfe/src/Command.h @@ -150,7 +150,7 @@ public: virtual XP_Bool isSelected(XFE_Frame*, XFE_CommandInfo*); virtual XP_Bool isDeterminate(XFE_Frame*, XFE_CommandInfo*); - XFE_CommandParameters* getParameters(XFE_Frame*); + virtual XFE_CommandParameters* getParameters(XFE_Frame*); virtual int getParameterIndex(XFE_Frame*); virtual void setParameterIndex(XFE_Frame*, unsigned); virtual char* getLabel(XFE_Frame*, XFE_CommandInfo*); diff --git a/mozilla/cmd/xfe/src/ComposeFrame.cpp b/mozilla/cmd/xfe/src/ComposeFrame.cpp index fbfa02c4a76..2625706b851 100644 --- a/mozilla/cmd/xfe/src/ComposeFrame.cpp +++ b/mozilla/cmd/xfe/src/ComposeFrame.cpp @@ -213,7 +213,9 @@ ToolbarSpec XFE_ComposeFrame::toolbar_spec[] = { { xfeCmdSpellCheck, PUSHBUTTON, &MNC_SpellCheck_group }, { xfeCmdSaveDraft, PUSHBUTTON, &MNC_Save_group }, TOOLBAR_SEPARATOR, +#ifdef MOZ_MAIL_NEWS HG82981 +#endif { xfeCmdStopLoading, PUSHBUTTON, &TB_Stop_group }, { NULL } }; diff --git a/mozilla/cmd/xfe/src/ComposeView.cpp b/mozilla/cmd/xfe/src/ComposeView.cpp index 515ea822bfd..fad54b5a3e1 100644 --- a/mozilla/cmd/xfe/src/ComposeView.cpp +++ b/mozilla/cmd/xfe/src/ComposeView.cpp @@ -1479,7 +1479,9 @@ XDEBUG( printf ("Do Command: %s \n", Command::getString(command));) { toggleAddressArea(); } +#ifdef ROSETTA_DOES_DECLARATIONS HG81210 +#endif /* ROSETTA_DOES_DECLARATIONS */ else if (command == xfeCmdDeleteItem) { if ( m_focusW ) { if ( m_focusW != m_addrTypeW ) { diff --git a/mozilla/cmd/xfe/src/EditorFrame.cpp b/mozilla/cmd/xfe/src/EditorFrame.cpp index cb291e09698..aa78e4342ba 100644 --- a/mozilla/cmd/xfe/src/EditorFrame.cpp +++ b/mozilla/cmd/xfe/src/EditorFrame.cpp @@ -100,12 +100,12 @@ MenuSpec XFE_EditorFrame::file_menu_spec[] = { MENU_SEPARATOR, { xfeCmdSave, PUSHBUTTON }, { xfeCmdSaveAs, PUSHBUTTON }, -#ifdef MOZ_MAIL_NEWS +#if defined(MOZ_MAIL_NEWS) || defined(MOZ_MAIL_COMPOSE) { "publishMenu", CASCADEBUTTON, (MenuSpec*)&XFE_EditorFrame::publish_submenu_spec }, -#else /* MOZ_MAIL_NEWS */ +#else /* MOZ_MAIL_NEWS || MOZ_MAIL_COMPOSE */ { xfeCmdPublish, PUSHBUTTON }, -#endif /* MOZ_MAIL_NEWS */ +#endif /* MOZ_MAIL_NEWS || MOZ_MAIL_COMPOSE */ MENU_SEPARATOR, { xfeCmdSendPage, PUSHBUTTON }, { xfeCmdBrowsePage, PUSHBUTTON }, @@ -376,13 +376,13 @@ MenuSpec XFE_EditorFrame::save_submenu_spec[] = { { NULL } }; -#ifdef MOZ_MAIL_NEWS +#if defined(MOZ_MAIL_NEWS) || defined(MOZ_MAIL_COMPOSE) MenuSpec XFE_EditorFrame::publish_submenu_spec[] = { MENU_PUSHBUTTON(xfeCmdPublish), MENU_PUSHBUTTON(xfeCmdSendPage), { NULL } }; -#endif /* MOZ_MAIL_NEWS */ +#endif /* MOZ_MAIL_NEWS || MOZ_MAIL_COMPOSE */ static ToolbarSpec editor_file_toolbar_spec[] = { { @@ -411,21 +411,21 @@ static ToolbarSpec editor_file_toolbar_spec[] = { }, { xfeCmdBrowsePage, PUSHBUTTON, &ed_browse_group }, { -#ifdef MOZ_MAIL_NEWS +#if defined(MOZ_MAIL_NEWS) || defined(MOZ_MAIL_COMPOSE) "publishMenu", CASCADEBUTTON, &ed_publish_group, NULL, NULL, NULL, // Icons (MenuSpec*) &XFE_EditorFrame::publish_submenu_spec, // Submenu spec NULL , NULL, // Generate proc XFE_TOOLBAR_DELAY_LONG // Popup delay -#else /* MOZ_MAIL_NEWS */ +#else /* MOZ_MAIL_NEWS || MOZ_MAIL_COMPOSE */ 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 */ +#endif /* MOZ_MAIL_NEWS || MOZ_MAIL_COMPOSE */ }, TOOLBAR_SEPARATOR, { xfeCmdPrint, PUSHBUTTON, &ed_print_group }, @@ -717,6 +717,8 @@ fe_editor_create_plugin_menu(MenuSpec* static_spec) menu_spec[nstatics+category_index].submenu = category_spec; category_index++; } + + category_index++; menu_spec[nstatics+category_index].menuItemName = NULL; // delimit paranoia return menu_spec; diff --git a/mozilla/cmd/xfe/src/EditorFrame.h b/mozilla/cmd/xfe/src/EditorFrame.h index 1e60a199907..c96eabcfbba 100644 --- a/mozilla/cmd/xfe/src/EditorFrame.h +++ b/mozilla/cmd/xfe/src/EditorFrame.h @@ -79,7 +79,7 @@ public: static MenuSpec new_submenu_spec[]; static MenuSpec save_submenu_spec[]; -#ifdef MOZ_MAIL_NEWS +#if defined(MOZ_MAIL_NEWS) || defined(MOZ_MAIL_COMPOSE) static MenuSpec publish_submenu_spec[]; #endif diff --git a/mozilla/cmd/xfe/src/HTMLView.cpp b/mozilla/cmd/xfe/src/HTMLView.cpp index 684865b5e84..904c5513b56 100644 --- a/mozilla/cmd/xfe/src/HTMLView.cpp +++ b/mozilla/cmd/xfe/src/HTMLView.cpp @@ -585,9 +585,7 @@ XFE_HTMLView::doCommand(CommandType cmd, void *callData, XFE_CommandInfo* info) NULL, // other_random_headers NULL, // priority NULL, // attachment - NULL, // newspost_url - FALSE, // xxx_p - FALSE); // xxx2_p + NULL); // newspost_url // Since they are only sending the link, // I am guessing that they want a plaintext editor. @@ -598,7 +596,7 @@ XFE_HTMLView::doCommand(CommandType cmd, void *callData, XFE_CommandInfo* info) getToplevel()->notifyInterested(XFE_View::chromeNeedsUpdating); return; } -#endif // MOZ_MAIL_NEWS +#endif /* MOZ_MAIL_NEWS || MOZ_MAIL_COMPOSE */ else if (IS_CMD(xfeCmdCut)) { MWContext *context = fe_GetFocusGridOfContext(m_contextData); diff --git a/mozilla/cmd/xfe/xfe.h b/mozilla/cmd/xfe/xfe.h index e67ed611fb1..89841f3564a 100644 --- a/mozilla/cmd/xfe/xfe.h +++ b/mozilla/cmd/xfe/xfe.h @@ -390,8 +390,8 @@ extern void fe_DrawShadows (MWContext *cx, fe_Drawable *drawable, int x, int y, extern void fe_HistoryDialog (MWContext *context); extern void fe_RegenerateHistoryMenu (MWContext *context); extern void fe_HistoryItemAction (Widget, XEvent *, String *, Cardinal *); -extern MWContext * fe_findcommand_context(); -extern void fe_unset_findcommand_context(); +extern MWContext * fe_findcommand_context(void); +extern void fe_unset_findcommand_context(void); extern void fe_FindDialog (MWContext *context, Boolean really_do_it_p); extern void fe_FindAndReplaceDialog (MWContext *context, Boolean really_do_it_p); diff --git a/mozilla/include/msgcom.h b/mozilla/include/msgcom.h index 15dbc9823f1..269dcc9665a 100644 --- a/mozilla/include/msgcom.h +++ b/mozilla/include/msgcom.h @@ -2810,7 +2810,6 @@ extern MSG_Pane* MSG_ComposeMessage(MWContext *old_context, const char *attachment, const char *newspost_url, const char *body, - HG00282 XP_Bool force_plain_text, const char* html_part); @@ -2829,8 +2828,7 @@ extern MSG_CompositionFields* MSG_CreateCompositionFields( const char *other_random_headers, const char *priority, const char *attachment, - const char *newspost_url - HG66663); + const char *newspost_url); extern void MSG_DestroyCompositionFields(MSG_CompositionFields *fields); diff --git a/mozilla/lib/libmime/mimedrft.c b/mozilla/lib/libmime/mimedrft.c index f3a20001cf7..6c2d9595bad 100644 --- a/mozilla/lib/libmime/mimedrft.c +++ b/mozilla/lib/libmime/mimedrft.c @@ -375,8 +375,7 @@ mime_parse_stream_complete (NET_StreamClass *stream) mime_intl_mimepart_2_str(&subj, mdd->mailcsid); fields = MSG_CreateCompositionFields( from, repl, to, cc, bcc, fcc, grps, foll, - org, subj, refs, 0, priority, 0, news_host, - altform_p, sign_p); + org, subj, refs, 0, priority, 0, news_host); draftInfo = MimeHeaders_get(mdd->headers, HEADER_X_MOZILLA_DRAFT_INFO, FALSE, FALSE); if (draftInfo && fields) { @@ -506,9 +505,7 @@ mime_parse_stream_complete (NET_StreamClass *stream) else { fields = MSG_CreateCompositionFields( from, repl, to, cc, bcc, fcc, grps, foll, - org, subj, refs, 0, priority, 0, news_host, - HG09843, - HG09844 ); + org, subj, refs, 0, priority, 0, news_host ); if (fields) cpane = FE_CreateCompositionPane(mdd->context, fields, NULL, MSG_DEFAULT); } diff --git a/mozilla/lib/mailto/msgcpane.cpp b/mozilla/lib/mailto/msgcpane.cpp index 1579a602f09..b6a4fb0ae03 100644 --- a/mozilla/lib/mailto/msgcpane.cpp +++ b/mozilla/lib/mailto/msgcpane.cpp @@ -439,8 +439,6 @@ void MSG_CompositionPane::NotifyPrefsChange(NotifyCode) { } -HG02070 - char* MSG_CompositionPane::FigureBcc(XP_Bool newsBcc) @@ -804,9 +802,6 @@ MSG_CompositionPane::InitializeHeaders(MWContext* old_context, } -HG00729 - - if (!*m_fields->GetOrganization()) { m_fields->SetOrganization(FE_UsersOrganization()); } @@ -2043,7 +2038,6 @@ MSG_CompositionPane::SanityCheck(int skippast) if (skippast == MK_MSG_DOUBLE_INCLUDE) goto AFTER_DOUBLE_INCLUDE; if (skippast == MK_MSG_EMPTY_MESSAGE) goto AFTER_EMPTY_MESSAGE; if (skippast == MK_MSG_MISSING_SUBJECT) goto AFTER_MISSING_SUBJECT; - HG60283 // Check if they have quoted a document and not edited it, and also // attached the same document. @@ -2074,7 +2068,6 @@ AFTER_EMPTY_MESSAGE: } AFTER_MISSING_SUBJECT: -HG60207 return 0; } @@ -2248,8 +2241,6 @@ MSG_CompositionPane::DoneComposeMessage( MSG_Deliver_Mode deliver_mode ) } } - HG42440 - const char* body = m_fields->GetBody(); uint32 body_length = XP_STRLEN(body); @@ -2547,7 +2538,6 @@ MSG_CompositionPane::GetCompositionMessageID() return m_messageId; } -HG20026 int diff --git a/mozilla/lib/mailto/msgglue.cpp b/mozilla/lib/mailto/msgglue.cpp index 91004a80444..7854d87c731 100644 --- a/mozilla/lib/mailto/msgglue.cpp +++ b/mozilla/lib/mailto/msgglue.cpp @@ -397,10 +397,6 @@ MSG_MailDocumentURL (MWContext *old_context,const char *url) MSG_CompositionFields* fields = new MSG_CompositionFields(); if (!fields) return NULL; // Out of memory. - /* It's so cool that there are half a dozen entrypoints to - composition-window-creation. */ - HG62239 - /* If url is not specified, grab current history entry. */ if (!url) { History_entry *h = @@ -447,10 +443,6 @@ MSG_Mail (MWContext *old_context) MSG_CompositionFields* fields = new MSG_CompositionFields(); if (!fields) return NULL; // Out of memory. - /* It's so cool that there are half a dozen entrypoints to - composition-window-creation. */ - HG42933 - XP_Bool prefBool = FALSE; PREF_GetBoolPref("mail.attach_vcard",&prefBool); fields->SetAttachVCard(prefBool); @@ -490,7 +482,6 @@ MSG_CreateCompositionFields ( const char *priority, const char *attachment, const char *newspost_url - HG66663 ) { MSG_CompositionFields* fields = new MSG_CompositionFields(); @@ -510,7 +501,6 @@ MSG_CreateCompositionFields ( fields->SetAttachments(attachment); fields->SetNewspostUrl(newspost_url); fields->SetPriority(priority); - HG65243 return fields; } @@ -572,7 +562,6 @@ MSG_ComposeMessage (MWContext *old_context, const char *attachment, const char *newspost_url, const char *body, - HG00282 XP_Bool force_plain_text, const char* html_part ) @@ -584,15 +573,12 @@ MSG_ComposeMessage (MWContext *old_context, return NULL; - HG02872 - - MSG_CompositionFields* fields = MSG_CreateCompositionFields(from, reply_to, to, cc, bcc, fcc, newsgroups, followup_to, organization, subject, references, other_random_headers, priority, attachment, - newspost_url HG65241); + newspost_url); fields->SetForcePlainText(force_plain_text); fields->SetHTMLPart(html_part); diff --git a/mozilla/lib/mailto/msgsend.cpp b/mozilla/lib/mailto/msgsend.cpp index b4f10b23163..149d1cc703b 100644 --- a/mozilla/lib/mailto/msgsend.cpp +++ b/mozilla/lib/mailto/msgsend.cpp @@ -37,7 +37,6 @@ #include "msgprefs.h" #include "msgmast.h" #include "msgcpane.h" -#include HG02902 #include "msgcflds.h" #include "prefapi.h" #include "abdefn.h" @@ -2438,8 +2437,6 @@ int MSG_SendMimeDeliveryState::GatherMimeAttachments () status = toppart->Write(); if (status < 0) goto FAIL; - HG75442 - if (m_msg_file) XP_FileClose (m_msg_file); m_msg_file = 0; @@ -2507,8 +2504,6 @@ int MSG_SendMimeDeliveryState::GatherMimeAttachments () in_file = NULL; } - HG59731 - if (status < 0) { m_status = status; @@ -2549,16 +2544,6 @@ FAILMEM: #pragma optimization_level 4 #endif // XP_MAC && DEBUG -static void FROB (const char *src, char *dest) -{ - if (src && *src && dest) - { - if (*dest) XP_STRCAT(dest, ","); - XP_STRCAT(dest, src); - } -} - -HG53784 #if defined(XP_MAC) && defined(DEBUG) #pragma global_optimizer reset @@ -2569,7 +2554,6 @@ int mime_write_message_body (MSG_SendMimeDeliveryState *state, char *buf, int32 size) { - HG56898 { if (int32(XP_FileWrite (buf, size, state->m_msg_file)) < size) { @@ -3358,8 +3342,7 @@ MIME_GenerateMailtoFormPostHeaders (const char *old_post_url, fields = MSG_CreateCompositionFields(from, 0, to, cc, 0, 0, 0, 0, FE_UsersOrganization(), 0, 0, - extra_headers, 0, 0, 0 - HG15448); + extra_headers, 0, 0, 0); if (!fields) { status = MK_OUT_OF_MEMORY; diff --git a/mozilla/lib/mailto/msgsend.h b/mozilla/lib/mailto/msgsend.h index 13728024b78..ba0c4747850 100644 --- a/mozilla/lib/mailto/msgsend.h +++ b/mozilla/lib/mailto/msgsend.h @@ -93,7 +93,6 @@ public: void Clear(); // Callback from msgsendp.cpp into msgsend.cpp. - HG89377 MWContext *GetContext() { return m_pane->GetContext(); } int SetMimeHeader(MSG_HEADER_SET header, const char *value); diff --git a/mozilla/lib/mailto/msgsendp.cpp b/mozilla/lib/mailto/msgsendp.cpp index b98038890bc..9cf30b2acf4 100644 --- a/mozilla/lib/mailto/msgsendp.cpp +++ b/mozilla/lib/mailto/msgsendp.cpp @@ -540,12 +540,6 @@ int MSG_SendPart::Write() message_headers = 0; } - if (!m_parent) - { - HG78478 - if (status < 0) goto FAIL; - } - /* Now make sure there's a Content-Type header. */ if (!content_type_header) diff --git a/mozilla/network/protocol/smtp/mksmtp.c b/mozilla/network/protocol/smtp/mksmtp.c index d16a62637aa..1b84960a853 100644 --- a/mozilla/network/protocol/smtp/mksmtp.c +++ b/mozilla/network/protocol/smtp/mksmtp.c @@ -1305,7 +1305,7 @@ HG61365 newsgroups, followup_to, organization, subject, references, other_random_headers, priority, attachment, newspost_url, body, - encrypt_p, sign_p, force_plain_text, + force_plain_text, html_part); #ifdef MOZ_MAIL_NEWS