Bug 943732 - Port the new Character Encoding menu to SeaMonkey - Comm-Aurora bustagefix. r+a=RattyAway on a CLOSED TREE BETA_BASE_20140428
authorEdmund Wong <ewong@pw-wspx.org>
Mon, 28 Apr 2014 14:46:29 +0800
changeset 19700 ffacfc0539ea995c384fd3cc9d2ddc6e41d17e2a
parent 19699 06046995a33d3917f254076bb2dd0ec499bb35bd
child 19701 ebcaac24ae6e0ba51d0e5da49bf823ca0b3822f1
push id1133
push usermbanner@mozilla.com
push dateMon, 28 Apr 2014 19:42:02 +0000
treeherdercomm-beta@ca498fc736fc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs943732
Bug 943732 - Port the new Character Encoding menu to SeaMonkey - Comm-Aurora bustagefix. r+a=RattyAway on a CLOSED TREE
suite/common/charsetOverlay.xul
new file mode 100644
--- /dev/null
+++ b/suite/common/charsetOverlay.xul
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<!DOCTYPE overlay SYSTEM "chrome://global/locale/charsetMenu.dtd">
+<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+  <script>
+    Components.utils.import("resource://gre/modules/CharsetMenu.jsm");
+
+    function UpdateCharsetMenu(aCharset, aNode)
+    {
+      var bundle = document.getElementById("charsetBundle");
+      CharsetMenu.update(aNode, bundle.getString(aCharset.toLowerCase()));
+    }
+  </script>
+
+  <stringbundleset>
+    <stringbundle id="charsetBundle"
+                  src="chrome://communicator/content/labelsencodings.properties"/>
+  </stringbundleset>
+
+  <menu id="charsetMenu"
+        label="&charsetMenu.label;"
+        accesskey="&charsetMenu.accesskey;">
+    <menupopup id="charsetPopup"
+               onpopupshowing="CharsetMenu.build(this, true, this.getAttribute('detectors') != 'false');"/>
+  </menu>
+</overlay>