|
goDoCommand('cmd_saveDefault') MsgComposeCommands.js cmd_saveDefault: { isEnabled: function() { return !gWindowLocked; }, doCommand: function() { Save(); } }, function Save() { switch (defaultSaveOperation) { case "file" : SaveAsFile(false); break; case "template" : SaveAsTemplate(false); break; case "send" : SaveAsSend(false); break; default : SaveAsDraft(false); break; } } GenericSendMessage_Ori(nsIMsgCompDeliverMode.SaveAsDraft); { var progress = Components.classes["@mozilla.org/messenger/progress;1"] .createInstance(Components.interfaces.nsIMsgProgress); if (progress) { //alert("1 registerListener"); progress.registerListener(progressListener); gSendOrSaveOperationInProgress = true; } gMsgCompose.SendMsg(msgType, getCurrentIdentity(), getCurrentAccountKey(), msgWindow, progress); } nsMsgComposeAndSend::SendToMagicFolder(nsMsgDeliverMode mode) { nsresult rv = MimeDoFCC(mTempFile, mode, mCompFields->GetBcc(), mCompFields->GetFcc(), mCompFields->GetNewspostUrl(), mCompFields->GetSendName()); if (NS_FAILED(rv)) rv = NotifyListenerOnStopCopy(rv); } MimeDoFCC(nsIFile *input_file,... { //nscopy.tmp } nsMsgComposeAndSend::NotifyListenerOnStopCopy(nsresult aStatus) { mComposeBundle->GetStringFromID(NS_MSG_START_COPY_MESSAGE_FAILED, getter_Copies(msg)); #ifdef PR_LOGGING nsAutoString tempString1(msg.get()); char * utf8String1 = ToNewUTF8String(tempString1); PR_LOG(gnsMsgSendLog, PR_LOG_ALWAYS,("NotifyListenerOnStopCopy msg:%s [%s:%d-%s]",utf8String1,__FILE__, __LINE__,__FUNCTION__)); #endif SetStatusMessage(msg); //复制失败。 ---- 进度条上显示的内容 if (NS_SUCCEEDED(rv)) { #ifdef PR_LOGGING nsAutoString tempString(msg.get()); char * utf8String = ToNewUTF8String(tempString); PR_LOG(gnsMsgSendLog, PR_LOG_ALWAYS,("NotifyListenerOnStopCopy msg2:%s [%s:%d-%s]",utf8String,__FILE__, __LINE__,__FUNCTION__)); #endif nsMsgDisplayMessageByString(prompt, msg.get(), nullptr); //保存邮件到 草稿箱 时出错 ----中间弹出的提示窗口,没有失败原因 } |
|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )
GMT+8, 2024-11-23 04:38 , Processed in 0.058491 second(s), 23 queries .
Powered by Discuz! X3
© 2001-2013 Comsenz Inc.