зеркало из https://github.com/mozilla/gecko-dev.git
Dynamic charset menu for mail edit.
This commit is contained in:
Родитель
a22256b169
Коммит
aad2e42f2c
|
@ -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
|
||||
|
|
|
@ -26,6 +26,8 @@ Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
|||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://messenger/locale/messengercompose/messengercompose.dtd">
|
||||
|
||||
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
|
@ -231,6 +233,7 @@ ACTUALLY, EVERY TIME YOU TYPE ANY OF THE KEY DEFINED HERE AFTER WITHOUT ANY OF T
|
|||
<menuseparator/>
|
||||
<menuitem value="&pageInfoCmd.label;" disabled="true" accesskey="&pageInfoCmd.accesskey;" cmd="nsCmd:ComposeNYI"/>
|
||||
<menuseparator/>
|
||||
<!-- Deprecated BEGIN
|
||||
<menu value="&dcharMenu.label;" oncreate="InitCharsetMenuCheckMark();">
|
||||
<menupopup>
|
||||
<menuitem id="ISO-8859-1" type="radio" name="charsetGroup" value="&dcharIso1Cmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
|
||||
|
@ -265,6 +268,8 @@ ACTUALLY, EVERY TIME YOU TYPE ANY OF THE KEY DEFINED HERE AFTER WITHOUT ANY OF T
|
|||
<menuitem value="&dcharDEFAULT.label;" oncommand="SetDefaultMailSendCharacterSet();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
END of Deprecated -->
|
||||
<menu id = "maileditCharsetMenu" />
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче