From 355f89a34cb7266402371b4c4fa38bf6b0ece27f Mon Sep 17 00:00:00 2001 From: "ducarroz%netscape.com" Date: Sat, 13 Mar 1999 07:51:15 +0000 Subject: [PATCH] Part of implementation of Reply and Forward. Use new SendMessage command --- mailnews/ui/compose/resources/compose.xul | 36 +++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/mailnews/ui/compose/resources/compose.xul b/mailnews/ui/compose/resources/compose.xul index 88fa8009251..28eba9a998b 100644 --- a/mailnews/ui/compose/resources/compose.xul +++ b/mailnews/ui/compose/resources/compose.xul @@ -48,17 +48,6 @@ function startup() { dump("Compose: StartUp\n"); - compAppCore = XPAppCoresManager.Find("ComposeAppCore"); - if (compAppCore==null) { - compAppCore = new ComposeAppCore(); - if (compAppCore != null) { - dump("ComposeAppCore was created!\n"); - compAppCore.Init("ComposeAppCore"); - compAppCore.SetWindow(window); - compAppCore.CompleteCallback("MessageSent();"); - XPAppCoresManager.Add(compAppCore); - } - } editAppCore = XPAppCoresManager.Find("EditorAppCore"); dump("Looking up EditorAppCore...\n"); @@ -78,6 +67,20 @@ else { dump("EditorAppCore has already been created! Why?\n"); } + + compAppCore = XPAppCoresManager.Find("ComposeAppCore"); + if (compAppCore==null) { + compAppCore = new ComposeAppCore(); + if (compAppCore != null) { + dump("ComposeAppCore was created!\n"); + compAppCore.Init("ComposeAppCore"); + compAppCore.SetWindow(window); + compAppCore.SetEditor(editAppCore); + compAppCore.CompleteCallback("MessageSent();"); + XPAppCoresManager.Add(compAppCore); + } + } + } function EditorGetText() @@ -95,12 +98,13 @@ { dump("SendMessage!\n"); if (compAppCore != null) { - compAppCore.SendMessage(document.getElementById('msgTo').value, - document.getElementById('msgCc').value, - document.getElementById('msgBcc').value, - document.getElementById('msgSubject').value, +// compAppCore.SendMessage(document.getElementById('msgTo').value, +// document.getElementById('msgCc').value, +// document.getElementById('msgBcc').value, +// document.getElementById('msgSubject').value, // window.parent.frames[0].document.forms["fbody"].elements["body"].value); - EditorGetText()); +// EditorGetText()); + compAppCore.SendMessage2(); } }