diff --git a/mozilla/grendel/composition/Composition.java b/mozilla/grendel/composition/Composition.java index 0da61d503c6..93f443bffb9 100644 --- a/mozilla/grendel/composition/Composition.java +++ b/mozilla/grendel/composition/Composition.java @@ -143,7 +143,7 @@ public class Composition extends GeneralFrame { super.stopAnimation(); } - /** Initialize the headers of this composition as being a reply to + /** Initialize the headers and body of this composition as being a reply to the given message. */ public void initializeAsReply(Message msg, boolean replyall) { mCompositionPanel.setReferredMessage(msg); @@ -195,6 +195,22 @@ public class Composition extends GeneralFrame { } + /** Initialize the headers and body of this composition + as being a message that is forwarded 'quoted'. */ + public void initializeAsForward(Message msg) { + mCompositionPanel.setReferredMessage(msg); + MessageExtra mextra = MessageExtraFactory.Get(msg); + + try { + mCompositionPanel.setSubject("[Fwd: " + mextra.simplifiedSubject() + "]"); + } catch (MessagingException e) { + } + + // Quote the original text + mCompositionPanel.QuoteOriginalMessage(); + + } + class PanelListener implements CompositionPanelListener { public void sendingMail(ChangeEvent aEvent) { startAnimation(); diff --git a/mozilla/grendel/ui/FolderPanel.java b/mozilla/grendel/ui/FolderPanel.java index 6ae8b527dea..23bd877c002 100644 --- a/mozilla/grendel/ui/FolderPanel.java +++ b/mozilla/grendel/ui/FolderPanel.java @@ -173,6 +173,24 @@ public class FolderPanel extends GeneralPanel { public static final int kAll = 2; + /** + * Forward Quoted + */ + + public static final int kQuoted = 0; + + /** + * Forward Inline + */ + + public static final int kInline = 1; + + /** + * Forward as Attachment + */ + + public static final int kAttachment = 2; + // // Actions that can be enabled/disabled // @@ -183,6 +201,10 @@ public class FolderPanel extends GeneralPanel { ReplyAction fReplyAction = new ReplyAction("msgReply", false); ReplyAction fReplyAllAction = new ReplyAction("msgReplyAll", true); + ForwardAction fForwardQuoted = new ForwardAction("fwdQuoted", kQuoted); + ForwardAction fForwardInline = new ForwardAction("fwdInline", kInline); + ForwardAction fForwardAttachment = new ForwardAction("fwdAttachment", kAttachment); + MarkAction fMarkMsgReadAction = new MarkAction("markMsgRead", kMessage); MarkAction fMarkThreadReadAction = new MarkAction("markThreadRead", kThread); MarkAction fMarkAllReadAction = new MarkAction("markAllRead", kAll); @@ -199,6 +221,9 @@ public class FolderPanel extends GeneralPanel { fThreadAction, fReplyAction, fReplyAllAction, + fForwardQuoted, + fForwardInline, + fForwardAttachment, fMarkMsgReadAction, fMarkThreadReadAction, fMarkAllReadAction @@ -886,6 +911,33 @@ public class FolderPanel extends GeneralPanel { } } + // + // ForwardAction class + // + + class ForwardAction extends UIAction { + int fScope; + + ForwardAction(String aName, int aScope) { + super(aName); + fScope = aScope; + + this.setEnabled(aScope == kQuoted); + } + + public void actionPerformed(ActionEvent aEvent) { + Vector selection = getSelectedMessageVector(); + if (selection.size() != 1) { + Assert.Assertion(false, + "Need to have exactly one message selected to reply"); + } + Composition frame = new Composition(); + frame.initializeAsForward((Message) (selection.elementAt(0))); + frame.show(); + frame.requestFocus(); + } + } + // // MarkAction class // diff --git a/mozilla/grendel/ui/Menus.properties b/mozilla/grendel/ui/Menus.properties index 826dcf2c4b6..ab99f643ec6 100644 --- a/mozilla/grendel/ui/Menus.properties +++ b/mozilla/grendel/ui/Menus.properties @@ -24,9 +24,9 @@ multiMain=multiFile multiEdit multiView multiMessage multiFile=msgNew folderNew msgOpen msgSaveAs - msgGetNew - appExit multiEdit=editUndo - editCut editCopy editPaste - folderDelete - appSearch - appPrefs - appRunFilters multiView=viewLayout viewSort -multiMessage=msgNew - msgReply msgReplyAll msgForward msgForwardQuoted - msgMark +multiMessage=msgNew - msgReply msgReplyAll msgForward fwdQuoted - msgMark -multiToolBar=msgGetNew msgNew msgReply msgForward print msgDelete stop +multiToolBar=msgGetNew msgNew msgReply fwdQuoted print msgDelete stop #multiToolBar=msgGetNew msgNew msgReply msgDelete viewLayout=splitTop splitLeft splitRight stacked @@ -38,9 +38,9 @@ viewLayout=splitTop splitLeft splitRight stacked messageMain=messageFile messageEdit messageMessage window messageFile=msgSaveAs - appExit messageEdit=editUndo - editCut editCopy editPaste editClear - appPrefs -messageMessage=msgNew - msgReply msgReplyAll msgForward msgForwardQuoted +messageMessage=msgNew - msgReply msgReplyAll msgForward fwdQuoted -messageToolBar=msgGetNew msgNew msgReply msgReplyAll msgForward print msgDelete stop +messageToolBar=msgGetNew msgNew msgReply msgReplyAll fwdQuoted print msgDelete stop #messageToolBar=msgGetNew msgNew @@ -51,9 +51,9 @@ messageToolBar=msgGetNew msgNew msgReply msgReplyAll msgForward print msgDelete folderMain=folderFile folderEdit folderMessage window folderFile=msgNew msgOpen msgSaveAs - msgGetNew - appExit folderEdit=editUndo - editCut editCopy editPaste editClear - appPrefs -folderMessage=msgNew - msgReply msgReplyAll msgForward msgForwardQuoted +folderMessage=msgNew - msgReply msgReplyAll fwdQuoted msgForwardQuoted -folderToolBar=msgGetNew msgNew msgReply msgReplyAll msgForward markAllRead print msgDelete stop +folderToolBar=msgGetNew msgNew msgReply msgReplyAll fwdQuoted markAllRead print msgDelete stop #folderToolBar=msgGetNew msgNew msgDelete msgReply # diff --git a/mozilla/grendel/ui/Toolbar.properties b/mozilla/grendel/ui/Toolbar.properties index 089308fc116..c58b3ad3e42 100644 --- a/mozilla/grendel/ui/Toolbar.properties +++ b/mozilla/grendel/ui/Toolbar.properties @@ -20,7 +20,7 @@ msgGetNewLabel=Get Msg msgNewLabel=New Msg msgReplyLabel=Reply msgReplyAllLabel=Reply All -msgForwardLabel=Forward +fwdQuotedLabel=Forward markAllReadLabel=Mark Rd printLabel=Print msgDeleteLabel=Delete @@ -30,7 +30,7 @@ msgGetNewIcon=getmsg msgNewIcon=newmsg msgReplyIcon=reply msgReplyAllIcon=replyall -msgForwardIcon=forward +fwdQuotedIcon=forward markAllReadIcon=markallread printIcon=print msgDeleteIcon=delete @@ -40,7 +40,7 @@ msgGetNewTooltip=Get new messages msgNewTooltip=Compose a new message msgReplyTooltip=Reply msgReplyAllTooltip=Reply to all recipients -msgForwardTooltip=Forward +fwdQuotedTooltip=Forward markAllReadTooltip=Mark all messages read printTooltip=Print this message msgDeleteTooltip=Delete this message