зеркало из https://github.com/mozilla/pjs.git
fix for #36159, get send unsent messages to work again. while I'm here, remove
the rosetta_mailnews.h horse crap. r=mscott.
This commit is contained in:
Родитель
c99b96e79b
Коммит
7838c32762
|
@ -34,7 +34,6 @@
|
|||
#include "nsIPref.h"
|
||||
#include "nsIMimeConverter.h"
|
||||
#include "msgCore.h"
|
||||
#include "rosetta_mailnews.h"
|
||||
#include "nsMsgI18N.h"
|
||||
#include "nsFileSpec.h"
|
||||
#include "nsFileStream.h"
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
%{C++
|
||||
#include "nsIURL.h"
|
||||
#include "rosetta_mailnews.h"
|
||||
%}
|
||||
|
||||
interface nsIURI;
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
*/
|
||||
|
||||
#include "rosetta_mailnews.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsMsgCompFields.h"
|
||||
#include "nsMsgCompFieldsFact.h"
|
||||
|
@ -533,29 +532,6 @@ nsMsgCompFields::GetUseMultipartAlternativeFlag(PRBool *_retval)
|
|||
}
|
||||
|
||||
|
||||
HJ36954
|
||||
{
|
||||
/* Here's where we allow URLs in the newsgroups: header */
|
||||
|
||||
int status = -1;
|
||||
if (hostPort && group) { /* must have a group */
|
||||
char *newsPostUrl = HJ57077
|
||||
if (newsPostUrl) {
|
||||
const char *existingHeader = GetHeader(MSG_NEWSPOSTURL_HEADER_MASK);
|
||||
if (existingHeader && *existingHeader && nsCRT::strcasecmp(newsPostUrl, existingHeader))
|
||||
status = NS_MSG_CANT_POST_TO_MULTIPLE_NEWS_HOSTS; /* can only send to one news host at a time */
|
||||
else {
|
||||
SetAsciiHeader (MSG_NEWSPOSTURL_HEADER_MASK, newsPostUrl);
|
||||
status = 0; /* we succeeded, no need to keep looking at this header */
|
||||
}
|
||||
PR_Free(newsPostUrl);
|
||||
} else
|
||||
status = NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
nsresult nsMsgCompFields::SetBody(const PRUnichar *value)
|
||||
{
|
||||
long retval = 0;
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "nsMsgZapIt.h"
|
||||
#include "xp_core.h"
|
||||
#include "msgcom.h"
|
||||
#include "rosetta_mailnews.h"
|
||||
|
||||
/* Note that all the "Get" methods never return NULL (except in case of serious
|
||||
error, like an illegal parameter); rather, they return "" if things were set
|
||||
|
@ -237,9 +236,6 @@ public:
|
|||
protected:
|
||||
nsresult DecodeHeader(MSG_HEADER_SET header);
|
||||
|
||||
// These methods allow news URLs in the newsgroups header
|
||||
HJ30181
|
||||
|
||||
#define MAX_HEADERS 32
|
||||
char* m_headers[MAX_HEADERS];
|
||||
char* m_body;
|
||||
|
|
|
@ -509,7 +509,7 @@ mime_generate_headers (nsMsgCompFields *fields,
|
|||
// HEADER_X_MOZILLA_NEWSHOST which can contain the "news:" URL's.
|
||||
//
|
||||
// Since n2 can contain data in the form of:
|
||||
// "news://news.mozilla.org./netscape.test,news://news.mozilla.org./netscape.junk"
|
||||
// "news://news.mozilla.org/netscape.test,news://news.mozilla.org/netscape.junk"
|
||||
// we need to turn that into: "netscape.test,netscape.junk"
|
||||
//
|
||||
NS_WITH_SERVICE(nsINntpService, nntpService, kNntpServiceCID, &rv);
|
||||
|
@ -518,7 +518,7 @@ mime_generate_headers (nsMsgCompFields *fields,
|
|||
if (NS_SUCCEEDED(rv) && nntpService)
|
||||
{
|
||||
// caller frees the memory in newHeader
|
||||
// ConvertNewsgroupsString takes "news://news.mozilla.org./netscape.test,news://news.mozilla.org./netscape.junk"
|
||||
// ConvertNewsgroupsString takes "news://news.mozilla.org/netscape.test,news://news.mozilla.org/netscape.junk"
|
||||
// and turns it into "netscape.test,netscape.junk"
|
||||
rv = nntpService->ConvertNewsgroupsString(n2, &newHeader);
|
||||
if (NS_FAILED(rv)) {
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
#include "msgCore.h"
|
||||
#include "nsCRT.h"
|
||||
#include "rosetta_mailnews.h"
|
||||
#include "nsMsgLocalFolderHdrs.h"
|
||||
#include "nsMsgSendPart.h"
|
||||
#include "nsMsgSendFact.h"
|
||||
|
@ -294,8 +293,6 @@ nsMsgComposeAndSend::Clear()
|
|||
}
|
||||
}
|
||||
|
||||
HJ82388
|
||||
|
||||
if (m_attachments)
|
||||
{
|
||||
PRUint32 i;
|
||||
|
@ -479,7 +476,6 @@ nsMsgComposeAndSend::GatherMimeAttachments()
|
|||
attachments[i].ctl_count = ma->m_ctl_count;
|
||||
attachments[i].null_count = ma->m_null_count;
|
||||
attachments[i].max_line_length = ma->m_max_column;
|
||||
HJ08239
|
||||
|
||||
/* Doesn't really matter, but let's not lie about encoding
|
||||
in case it does someday. */
|
||||
|
@ -1153,8 +1149,6 @@ nsMsgComposeAndSend::PreProcessPart(nsMsgAttachmentHandler *ma,
|
|||
PL_strcat(recipients, X); \
|
||||
}
|
||||
|
||||
HJ91531
|
||||
|
||||
#if defined(XP_MAC) && defined(DEBUG)
|
||||
#pragma global_optimizer reset
|
||||
#endif // XP_MAC && DEBUG
|
||||
|
@ -1163,8 +1157,6 @@ HJ91531
|
|||
int
|
||||
mime_write_message_body(nsMsgComposeAndSend *state, char *buf, PRInt32 size)
|
||||
{
|
||||
HJ62011
|
||||
|
||||
if (PRInt32(state->mOutputFile->write(buf, size)) < size)
|
||||
{
|
||||
return NS_MSG_ERROR_WRITING_FILE;
|
||||
|
@ -2304,9 +2296,9 @@ nsMsgComposeAndSend::InitCompositionFields(nsMsgCompFields *fields)
|
|||
}
|
||||
|
||||
pStr = fields->GetNewspostUrl();
|
||||
if (!pStr || !*pStr)
|
||||
if (pStr && *pStr)
|
||||
{
|
||||
HJ41792
|
||||
mCompFields->SetNewspostUrl((char *)pStr);
|
||||
}
|
||||
|
||||
// Now, we will look for a URI defined as the default FCC pref. If this is set,
|
||||
|
@ -2623,8 +2615,6 @@ NewsDeliveryCallback(nsIURI *aUrl, nsresult aExitCode, void *tagData)
|
|||
return aExitCode;
|
||||
}
|
||||
|
||||
HJ70669
|
||||
|
||||
nsresult
|
||||
nsMsgComposeAndSend::DeliverMessage()
|
||||
{
|
||||
|
|
|
@ -126,7 +126,6 @@
|
|||
//
|
||||
#include "msgCore.h"
|
||||
#include "prprf.h"
|
||||
#include "rosetta_mailnews.h"
|
||||
#include "nsFileStream.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsIMsgSend.h"
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
* Contributor(s):
|
||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
*/
|
||||
#include "rosetta_mailnews.h"
|
||||
#include "nsMsgLocalFolderHdrs.h"
|
||||
#include "nsMsgSend.h"
|
||||
#include "nsMsgSendPart.h"
|
||||
|
@ -547,13 +546,6 @@ nsMsgSendPart::Write()
|
|||
message_headers = 0;
|
||||
}
|
||||
|
||||
/* Now allow the crypto library to (potentially) insert some text
|
||||
(it may want to wrap the body in an envelope.)
|
||||
*/
|
||||
if (!m_parent) {
|
||||
HJ67078
|
||||
}
|
||||
|
||||
/* Now make sure there's a Content-Type header.
|
||||
*/
|
||||
if (!content_type_header)
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..
|
||||
|
||||
EXPORTS = MailNewsTypes.h \
|
||||
rosetta_mailnews.h\
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist:mailnews directory
|
||||
#
|
||||
|
||||
MailNewsTypes.h
|
||||
rosetta_mailnews.h
|
|
@ -30,7 +30,6 @@ MODULE = mailnews
|
|||
|
||||
EXPORTS = \
|
||||
MailNewsTypes.h \
|
||||
rosetta_mailnews.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = MailNewsTypes2.idl
|
||||
|
|
|
@ -27,7 +27,6 @@ XPIDLSRCS = \
|
|||
$(NULL)
|
||||
|
||||
EXPORTS = MailNewsTypes.h \
|
||||
rosetta_mailnews.h\
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
#include "nsIPlatformCharset.h"
|
||||
#undef NS_IMPL_IDS
|
||||
|
||||
#define CHROME_STYLE nsIWebBrowserChrome::allChrome | nsIWebBrowserChrome::centerScreen
|
||||
|
||||
/* Network */
|
||||
|
||||
|
@ -328,7 +329,7 @@ nsPrefMigration::ProcessPrefs(PRBool showProgressAsModalWindow)
|
|||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = PMProgressAppShell->CreateTopLevelWindow(nsnull, pmprogressURL,
|
||||
PR_TRUE, PR_TRUE, nsIWebBrowserChrome::allChrome,
|
||||
PR_TRUE, PR_TRUE, CHROME_STYLE,
|
||||
NS_SIZETOCONTENT, NS_SIZETOCONTENT,
|
||||
getter_AddRefs(mPMProgressWindow));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче