From 3579d0b3bc404d8fff6ae582e9ba417fca86eefe Mon Sep 17 00:00:00 2001 From: "ducarroz%netscape.com" Date: Fri, 11 Jun 1999 00:34:32 +0000 Subject: [PATCH] Replace MsgComposeAppCore by a XPConnect object --- xpfe/browser/src/navigator.js | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/xpfe/browser/src/navigator.js b/xpfe/browser/src/navigator.js index 10003ce5df22..5d2e8a6223d2 100644 --- a/xpfe/browser/src/navigator.js +++ b/xpfe/browser/src/navigator.js @@ -639,26 +639,12 @@ function MsgNewMessage() { - // Generate a unique number, do we have a better way? - var date = new Date(); - var composeAppCoreName = "ComposeAppCore:" + date.getTime() + Math.random(); - var composeAppCore = XPAppCoresManager.Find(composeAppCoreName); - if (! composeAppCore) - { - composeAppCore = new ComposeAppCore(); - if (composeAppCore) - { - composeAppCore.Init(composeAppCoreName); - //argument: - // name= - // editorType=[default | html | text] ; default means use the prefs value send_html - var args = "name=" + composeAppCoreName + ",editorType=default"; - composeAppCore.NewMessage("chrome://messengercompose/content/", args, null, null, 0); - dump("Created a compose appcore from Navigator.xul, " + args); - } - } + var msgComposeService = Components.classes['component://netscape/messengercompose'].getService(); + msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService); + if (msgComposeService) + msgComposeService.OpenComposeWindow(null, null, 0, 0, null); } - + function DoPreferences() { if (!prefwindow)