Fix for bug 86398. Display a different message when we cannot fetch an attachment depending if we are saving or sending the message. R=varada, SR=mscott

This commit is contained in:
ducarroz%netscape.com 2001-10-30 23:28:51 +00:00
Родитель d3b903775a
Коммит 0532eb4efb
5 изменённых файлов: 20 добавлений и 3 удалений

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

@ -250,6 +250,7 @@ interface nsIMsgSend : nsISupports
[noscript] nsMsgAttachmentHandler getAttachmentHandlers();
[noscript] readonly attribute unsigned long attachmentCount;
[noscript] attribute unsigned long pendingAttachmentCount;
[noscript] readonly attribute nsMsgDeliverMode deliveryMode;
[noscript] nsIMsgProgress getProgress();

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

@ -117,6 +117,9 @@
## @name NS_MSG_FAILED_COPY_OPERATION
12532=Your Send operation was successful, but copying the message to your Sent folder failed.
## @name NS_MSG_FAILURE_ON_OBJ_EMBED_WHILE_SAVING
12533=There was a problem including the file %.200s in the message. Would you like to continue saving the message without this file?
## @name NS_MSG_ASSEMBLING_MESSAGE
12534=Assembling mail information...
@ -126,7 +129,7 @@
## @name NS_MSG_CREATING_MESSAGE
12536=Creating mail message...
## @name NS_MSG_FAILURE_ON_OBJ_EMBED
## @name NS_MSG_FAILURE_ON_OBJ_EMBED_WHILE_SENDING
12537=There was a problem including the file %.200s in the message. Would you like to continue sending the message without this file?
## @name NS_MSG_START_COPY_MESSAGE

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

@ -980,7 +980,12 @@ nsMsgAttachmentHandler::UrlExit(nsresult status, const PRUnichar* aMsg)
PRUnichar *printfString = nsnull;
nsCOMPtr<nsIMsgStringService> composebundle (do_GetService(NS_MSG_COMPOSESTRINGSERVICE_CONTRACTID));
composebundle->GetStringByID(NS_MSG_FAILURE_ON_OBJ_EMBED, getter_Copies(msg));
nsMsgDeliverMode mode = nsIMsgSend::nsMsgDeliverNow;
m_mime_delivery_state->GetDeliveryMode(&mode);
if (mode == nsIMsgSend::nsMsgSaveAsDraft || mode == nsIMsgSend::nsMsgSaveAsTemplate)
composebundle->GetStringByID(NS_MSG_FAILURE_ON_OBJ_EMBED_WHILE_SAVING, getter_Copies(msg));
else
composebundle->GetStringByID(NS_MSG_FAILURE_ON_OBJ_EMBED_WHILE_SENDING, getter_Copies(msg));
if (m_real_name && *m_real_name)
printfString = nsTextFormatter::smprintf(msg, m_real_name);

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

@ -96,10 +96,11 @@ private:
#define NS_MSG_FAILED_COPY_OPERATION NS_MSG_GENERATE_FAILURE(12532)
// For message sending operations...
#define NS_MSG_FAILURE_ON_OBJ_EMBED_WHILE_SAVING NS_MSG_GENERATE_SUCCESS(12533)
#define NS_MSG_ASSEMBLING_MESSAGE NS_MSG_GENERATE_SUCCESS(12534)
#define NS_MSG_GATHERING_ATTACHMENT NS_MSG_GENERATE_SUCCESS(12535)
#define NS_MSG_CREATING_MESSAGE NS_MSG_GENERATE_SUCCESS(12536)
#define NS_MSG_FAILURE_ON_OBJ_EMBED NS_MSG_GENERATE_FAILURE(12537)
#define NS_MSG_FAILURE_ON_OBJ_EMBED_WHILE_SENDING NS_MSG_GENERATE_FAILURE(12537)
#define NS_MSG_START_COPY_MESSAGE NS_MSG_GENERATE_SUCCESS(12538)
#define NS_MSG_START_COPY_MESSAGE_COMPLETE NS_MSG_GENERATE_SUCCESS(12539)
#define NS_MSG_START_COPY_MESSAGE_FAILED NS_MSG_GENERATE_FAILURE(12540)

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

@ -4359,6 +4359,13 @@ NS_IMETHODIMP nsMsgComposeAndSend::SetPendingAttachmentCount(PRUint32 aPendingAt
return NS_OK;
}
NS_IMETHODIMP nsMsgComposeAndSend::GetDeliveryMode(nsMsgDeliverMode *aDeliveryMode)
{
NS_ENSURE_ARG(aDeliveryMode);
*aDeliveryMode = m_deliver_mode;
return NS_OK;
}
NS_IMETHODIMP nsMsgComposeAndSend::GetProgress(nsIMsgProgress **_retval)
{
NS_ENSURE_ARG(_retval);