fix for bugs-70392-prettying send format prefs panel;52328-quitting while sending message; 71361- wrapping signature in compose;76330-focus on to field in reply;77798-UI should use Msgcompose abort and not msgsend;r=ducarroz;sr=bienvenu

This commit is contained in:
varada%netscape.com 2001-04-27 20:54:29 +00:00
parent 6eecf2d1a3
commit a01b35f59b
6 changed files with 39 additions and 13 deletions

View File

@ -39,8 +39,6 @@
<box class="box-smallheader" title="&pane.title;"/>
<titledbox orient="vertical">
<label><html>&sendMail.label;</html></label>
<html>&sendMaildesc.label;</html>
<radiogroup id="mailDefaultHTMLAction" orient="vertical" autostretch="never"
@ -54,14 +52,13 @@
<html>&override.label;</html>
</titledbox>
<titledbox orient="vertical" flex="1">
<label value="&domain.title;"/>
<html>&domaindesc.label;</html>
<box orient="horizontal" flex="1">
<titledbox orient="vertical" id="html_box" flex="1">
<label value = "&HTMLdomaintitle.label;"/>
<box orient="vertical" id="html_box" flex="1">
<html>&HTMLdomaintitle.label;</html>
<tree class="inset" id="html_domains" flex="1"
datasources="rdf:null" multiple="true"
onkeypress="if (event.keyCode == 8 || event.keyCode == 46) RemoveDomains(htmlobj);">
@ -80,9 +77,9 @@
</button>
<spring flex="1"/>
</box>
</titledbox>
<titledbox orient="vertical" id="plaintext_box" flex="1">
<label value = "&PlainTexttitle.label;"/>
</box>
<box orient="vertical" id="plaintext_box" flex="1">
<html>&PlainTexttitle.label;</html>
<tree class="inset" id="plaintext_domains" flex="1"
datasources="rdf:null" multiple="true"
onkeypress="if (event.keyCode == 8 || event.keyCode == 46) RemoveDomains(plainobj);">
@ -101,7 +98,7 @@
</button>
<spring flex="1"/>
</box>
</titledbox>
</box>
</box>
</titledbox>
</window>

View File

@ -124,6 +124,9 @@ interface nsIMsgCompose : nsISupports {
/* ... */
void CloseWindow();
/* ... */
void Abort();
/*
AttachmentPrettyName will return only the leafName if the it's a file URL.

View File

@ -1454,8 +1454,22 @@ function SetComposeWindowTitle(event)
function ComposeCanClose()
{
if (sendOrSaveOperationInProgress)
return false;
{
if (promptService)
{
var promptTitle = gComposeMsgsBundle.getString("quitComposeWindowTitle");
var promptMsg = gComposeMsgsBundle.getString("quitComposeWindowMessage");
if (promptService.confirm(window, promptTitle, promptMsg))
{
msgCompose.Abort();
return true;
}
else
{
return false;
}
}
}
// Returns FALSE only if user cancels save action
if (contentChanged || msgCompose.bodyModified)
{

View File

@ -136,7 +136,7 @@ function CompFields2Recipients(msgCompFields, msgType)
//If it's a new message, we need to add an extrat empty recipient.
var msgComposeType = Components.interfaces.nsIMsgCompType;
if (msgType == msgComposeType.New || top.MAX_RECIPIENTS == 0)
if (msgType == msgComposeType.New || msgComposeType.ForwardAsAttachment || msgComposeType.ForwardInline || top.MAX_RECIPIENTS == 0)
_awSetInputAndPopup("", "addr_to", newTreeChildrenNode, templateNode);
dump("replacing child in comp fields 2 recips \n");
var parent = treeChildren.parentNode;

View File

@ -204,3 +204,7 @@ SaveDialogTitle=Save Message
## LOCALIZATION NOTE (SaveDialogMsg): %1$S is folder name, %2$S is host name
SaveDialogMsg=Your message has been saved to the folder %1$S on %2$S.
CheckMsg=Do not show me this dialog box again.
## Strings used by prompt when Quitting while in progress
quitComposeWindowTitle=Close Mail Window
quitComposeWindowMessage="There is mail being sent, do you want to quit now or cancel and quit after the mail is sent?"

View File

@ -775,6 +775,14 @@ nsresult nsMsgCompose::CloseWindow()
return rv;
}
nsresult nsMsgCompose::Abort()
{
if (mMsgSend)
mMsgSend->Abort();
return NS_OK;
}
nsresult nsMsgCompose::GetEditor(nsIEditorShell * *aEditor)
{
*aEditor = m_editor;
@ -2226,7 +2234,7 @@ nsMsgCompose::ProcessSignature(nsIMsgIdentity *identity, nsString *aMsgBody)
4.x' HTML editor, it will not be able to
break this HTML sig, if quoted (for the user to
interleave a comment). */
static const char preopen[] = "<pre class=\"moz-signature\">";
static const char preopen[] = "<pre class=\"moz-signature\" cols=$mailwrapcol>";
static const char preclose[] = "</pre>";
if (imageSig)