From aad2e42f2cb3cfdc2ced8919340e5eea496a4bbd Mon Sep 17 00:00:00 2001 From: "cata%netscape.com" Date: Wed, 26 Apr 2000 21:29:51 +0000 Subject: [PATCH] Dynamic charset menu for mail edit. --- .../resources/content/MsgComposeCommands.js | 14 ++++++++++---- .../compose/resources/content/messengercompose.xul | 5 +++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/mailnews/compose/resources/content/MsgComposeCommands.js b/mailnews/compose/resources/content/MsgComposeCommands.js index 6ca254482bb8..5d35f4953f53 100644 --- a/mailnews/compose/resources/content/MsgComposeCommands.js +++ b/mailnews/compose/resources/content/MsgComposeCommands.js @@ -338,8 +338,10 @@ function ComposeUnload(calledFromExit) //...and what's about the editor appcore, how can we release it? } -function SetDocumentCharacterSet(aCharset) +function SetDocumentCharacterSet(event) { + var aCharset = event.target.getAttribute('id'); + dump("SetDocumentCharacterSet Callback!\n"); dump(aCharset + "\n"); @@ -404,11 +406,15 @@ function InitCharsetMenuCheckMark() prefs = null; } var send_default_charset = prefs.CopyCharPref("mailnews.send_default_charset"); +// send_default_charset = send_default_charset.toUpperCase(); + dump("send_default_charset is " + send_default_charset + "\n"); + var compFieldsCharset = msgCompose.compFields.GetCharacterSet(); - compFieldsCharset = compFieldsCharset.toUpperCase(); - if (compFieldsCharset == "US-ASCII") +// compFieldsCharset = compFieldsCharset.toUpperCase(); + dump("msgCompose.compFields is " + compFieldsCharset + "\n"); + + if (compFieldsCharset == "us-ascii") compFieldsCharset = "ISO-8859-1"; - send_default_charset = send_default_charset.toUpperCase(); menuitem = document.getElementById(compFieldsCharset); // charset may have been set implicitly in case of reply/forward diff --git a/mailnews/compose/resources/content/messengercompose.xul b/mailnews/compose/resources/content/messengercompose.xul index 7349955abdbc..6fce218c8261 100644 --- a/mailnews/compose/resources/content/messengercompose.xul +++ b/mailnews/compose/resources/content/messengercompose.xul @@ -26,6 +26,8 @@ Copyright (C) 1998-1999 Netscape Communications Corporation. All Rights Reserved. --> + + + +