Bug 1572149 - Add missing SetDocumentCharacterSet() back to SeaMonkey. r=frg a=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Sun, 11 Aug 2019 14:19:58 +0200
changeset 32266 97ed3c58b08a9d5b8d468e774e96fbf0de467ba3
parent 32265 b5591f82670fdfc851993e69e7821b36b78f8801
child 32267 7a01e33fff91f15473f4a1fca6130ae6d9bad54f
push id209
push userfrgrahl@gmx.net
push dateSun, 11 Aug 2019 12:21:39 +0000
treeherdercomm-esr60@7a01e33fff91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg, frg
bugs1572149, 943732
Bug 1572149 - Add missing SetDocumentCharacterSet() back to SeaMonkey. r=frg a=frg Accidently removed in Bug 943732 "Port the new Character Encoding menu to SeaMonkey".
suite/mailnews/components/compose/content/MsgComposeCommands.js
--- a/suite/mailnews/components/compose/content/MsgComposeCommands.js
+++ b/suite/mailnews/components/compose/content/MsgComposeCommands.js
@@ -1510,25 +1510,29 @@ function ComposeUnload()
   if (gMsgCompose)
     gMsgCompose.UnregisterStateListener(stateListener);
   if (gAutoSaveTimeout)
     clearTimeout(gAutoSaveTimeout);
 }
 
 function ComposeSetCharacterSet(aEvent)
 {
-  if (gMsgCompose) {
-    gMsgCompose.SetDocumentCharset(aEvent.target.getAttribute("charset"));
-    gCharsetTitle = null;
-    SetComposeWindowTitle();
-  }
+  if (gMsgCompose)
+    SetDocumentCharacterSet(aEvent.target.getAttribute("charset");
   else
     dump("Compose has not been created!\n");
 }
 
+function SetDocumentCharacterSet(aCharset)
+{
+  gMsgCompose.SetDocumentCharset(aCharset);
+  gCharsetTitle = null;
+  SetComposeWindowTitle();
+}
+
 function GetCharsetUIString()
 {
   var charset = gMsgCompose.compFields.characterSet;
   if (gSendDefaultCharset == null) {
     gSendDefaultCharset = gMsgCompose.compFields.defaultCharacterSet;
   }
 
   charset = charset.toUpperCase();