Changeset 998c9e
- Timestamp:
- Oct 16, 2014, 9:02:17 PM (8 years ago)
- Branches:
- ng_0.9
- Children:
- e23521
- Parents:
- fdd549
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
chrome.manifest
rfdd549 r998c9e 20 20 21 21 overlay chrome://v_identity/content/vI_rdfDataTree.xul chrome://v_identity/content/vI_rdfDataTree_dataExtrasOverlay.xul 22 overlay chrome://v_identity/content/vI_rdfDataEditor.xul chrome://v_identity/content/vI_rdfDataEditor_dataExtrasOverlay.xul 22 23 # only for Thunderbird <= 31.0a2 and Seamonkey < 2.30 24 overlay chrome://v_identity/content/vI_rdfDataEditor.xul chrome://v_identity/content/vI_rdfDataEditor_dataExtrasOverlay_legacy.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6} appversion<=31.0a2 25 overlay chrome://v_identity/content/vI_rdfDataEditor.xul chrome://v_identity/content/vI_rdfDataEditor_dataExtrasOverlay_legacy.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} appversion<2.30 26 27 # for current Thunderbird (> 31.0a2) and Seamonkey (>= 2.30) 28 overlay chrome://v_identity/content/vI_rdfDataEditor.xul chrome://v_identity/content/vI_rdfDataEditor_dataExtrasOverlay.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6} appversion>31.0a2 29 overlay chrome://v_identity/content/vI_rdfDataEditor.xul chrome://v_identity/content/vI_rdfDataEditor_dataExtrasOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} appversion>=2.30 30 31 23 32 24 33 overlay chrome://messenger/content/am-smtp.xul chrome://v_identity/content/accountManagerOverlays/vI_am-smtpOverlay.xul -
content/vI_rdfDataEditor_dataExtrasOverlay.xul
rfdd549 r998c9e 24 24 - ***** END LICENSE BLOCK ***** --> 25 25 26 <?xul-overlay href="chrome://communicator/content/charsetOverlay.xul"?> 27 26 28 <!DOCTYPE window [ 29 <!ENTITY % vIstorageExtrasDTD SYSTEM "chrome://v_identity/locale/vI_storageExtras.dtd" > 30 %vIstorageExtrasDTD; 31 <!ENTITY % charsetMenuDTD SYSTEM "chrome://global/locale/charsetMenu.dtd" > 32 %charsetMenuDTD; 27 33 <!ENTITY % messengercomposeDTD SYSTEM "chrome://messenger/locale/messengercompose/messengercompose.dtd" > 28 34 %messengercomposeDTD; 29 <!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetOverlay.dtd" >30 %charsetDTD;31 <!ENTITY % vIstorageExtrasDTD SYSTEM "chrome://v_identity/locale/vI_storageExtras.dtd" >32 %vIstorageExtrasDTD;33 35 ]> 34 35 36 <overlay id="vI_storageExtras" 36 37 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" > … … 64 65 oncommand="virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, 'maileditCharsetMenuLabel');virtualIdentityExtension.rdfDataEditor.identityExtras_adapt(this.id, 'maileditCharsetMenu');" /> 65 66 <hbox id="vI_storageExtras_characterEncoding"> 66 <vbox><spacer flex="1"/> 67 <label id="maileditCharsetMenuLabel" value="&charsetMenu.label;" 68 accesskey="&charsetMenu.accesskey;" control="maileditCharsetMenu" /> 69 <spacer flex="1"/></vbox> 70 <menulist id="maileditCharsetMenu" 71 datasources="rdf:charset-menu" ref="NC:MaileditCharsetMenuRoot" > 72 <template> 73 <rule> 74 <menupopup> 75 <menuitem type="radio" name="charsetGroup" checked="rdf:http://home.netscape.com/NC-rdf#Checked" uri="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/> 76 </menupopup> 77 </rule> 78 </template> 79 <menupopup> 80 <menuitem name="charsetCustomize" accesskey="&charsetCustomize.accesskey;" label="&charsetCustomize.label;" oncommand="window.openDialog('chrome://global/content/customizeCharset.xul','PrefWindow', 'chrome, dialog, modal, alwaysRaised, resizable=yes', 'mailedit')"/> 81 <menuseparator /> 82 </menupopup> 83 </menulist> 67 <script> 68 Components.utils.import("resource://gre/modules/CharsetMenu.jsm"); 69 </script> 70 <vbox><spacer flex="1"/> 71 <label id="maileditCharsetMenuLabel" value="&charsetMenu.label;" 72 accesskey="&charsetMenu.accesskey;" control="maileditCharsetMenu" /> 73 <spacer flex="1"/></vbox> 74 <menulist id="maileditCharsetMenu"> 75 <menupopup id="charsetPopup" 76 onpopupshowing="CharsetMenu.build(this, false, false);"/> 77 </menulist> 84 78 </hbox> 85 79 </hbox> -
modules/identityDataExtras/characterEncoding.js
rfdd549 r998c9e 32 32 Cu.import("resource://v_identity/vI_identityDataExtras.js"); 33 33 Cu.import("resource://v_identity/vI_log.js"); 34 let legacy = false; // use pre TB-32 legacy code 35 try { 36 Cu.import("resource://gre/modules/CharsetMenu.jsm"); 37 } catch (e) { 38 legacy = true; // pre TB-32-version, might be removed in the future 39 } 40 41 34 42 let Log = setupLogging("virtualIdentity.identityDataExtras.characterEncoding"); 35 43 … … 48 56 }, 49 57 58 // pre TB-32-version, might be removed in the future -------------------------------- 50 59 _setMenuMark: function() { 51 60 var maileditCharsetMenu = this.currentWindow.document.getElementById("maileditCharsetMenu") … … 58 67 } 59 68 }, 69 // ---------------------------------------------------------------------------------- 60 70 61 71 setValueToEnvironment_msgCompose: function() { 62 72 if (!this.value) 63 73 return; 64 var menuitem = this.currentWindow.document.getElementById(this.value); 65 if (menuitem) 66 menuitem.setAttribute('checked', 'true'); 67 else { // set menumark later if menu is not ready yet 68 var maileditCharsetMenu = this.currentWindow.document.getElementById("maileditCharsetMenu") 69 maileditCharsetMenu.setAttribute("unmarkedValue", this.value) 70 var onpopupshowing = maileditCharsetMenu.getAttribute("onpopupshowing") 71 this.currentWindow.document.getElementById("maileditCharsetMenu").setAttribute("onpopupshowing", 72 onpopupshowing + ";this.setMenuMark();") 74 // pre TB-32-version, might be removed in the future -------------------------------- 75 if (legacy) { 76 // old style 77 var menuitem = this.currentWindow.document.getElementById(this.value); 78 if (menuitem) 79 menuitem.setAttribute('checked', 'true'); 80 else { // set menumark later if menu is not ready yet 81 var maileditCharsetMenu = this.currentWindow.document.getElementById("maileditCharsetMenu") 82 maileditCharsetMenu.setAttribute("unmarkedValue", this.value) 83 var onpopupshowing = maileditCharsetMenu.getAttribute("onpopupshowing") 84 this.currentWindow.document.getElementById("maileditCharsetMenu").setAttribute("onpopupshowing", 85 onpopupshowing + ";this._setMenuMark();") 86 } 73 87 } 88 // ---------------------------------------------------------------------------------- 74 89 this.currentWindow.gMsgCompose.compFields.characterSet = this.value; 75 90 this.currentWindow.SetDocumentCharacterSet(this.value); … … 77 92 78 93 setValueToEnvironment_dataEditor: function() { 79 this.currentWindow.CreateMenu('mailedit'); // this is part of the magic included by the xul-binding 80 if (this.value != null) { 81 this.currentWindow.document.getElementById("maileditCharsetMenu").selectedItem = this.currentWindow.document.getElementById(this.value); 82 this.currentWindow.document.getElementById("vI_" + this.option + "_store").setAttribute("checked", "true"); 94 // pre TB-32-version, might be removed in the future -------------------------------- 95 if (legacy) { 96 this.currentWindow.CreateMenu('mailedit'); // this is part of the magic included by the xul-binding 97 if (this.value != null) { 98 this.currentWindow.document.getElementById("maileditCharsetMenu").selectedItem = this.currentWindow.document.getElementById(this.value); 99 this.currentWindow.document.getElementById("vI_" + this.option + "_store").setAttribute("checked", "true"); 100 } 101 } 102 // ---------------------------------------------------------------------------------- 103 else { 104 CharsetMenu.build(this.currentWindow.document.getElementById("charsetPopup"), false, false) 105 if (this.value != null) { 106 CharsetMenu.update(this.currentWindow.document.getElementById("maileditCharsetMenu"), this.value); 107 this.currentWindow.document.getElementById("maileditCharsetMenu").setAttribute("label",CharsetMenu._getCharsetLabel(this.value)); 108 this.currentWindow.document.getElementById("vI_" + this.option + "_store").setAttribute("checked", "true"); 109 } 83 110 } 84 111 this.currentWindow.document.getElementById("vI_" + this.option + "_store").doCommand(); … … 100 127 // check if element is selected (list might not contain relevant entry) 101 128 if (this.currentWindow.document.getElementById("maileditCharsetMenu").selectedItem) 102 this.value = this.currentWindow.document.getElementById("maileditCharsetMenu").selectedItem.id 129 // pre TB-32-version, might be removed in the future -------------------------------- 130 if (legacy) { 131 this.value = this.currentWindow.document.getElementById("maileditCharsetMenu").selectedItem.id 132 } 133 // ---------------------------------------------------------------------------------- 134 else { 135 this.value = this.currentWindow.document.getElementById("maileditCharsetMenu").selectedItem.getAttribute('charset'); 136 } 103 137 else 104 138 this.value = null; -
skin/v_identity.css
rfdd549 r998c9e 542 542 margin-top: 20px; 543 543 } 544 545 #virtualIdentityExtension_rdfDataEditorContent .menu-iconic-text { 546 padding-left: 20px; 547 }
Note: See TracChangeset
for help on using the changeset viewer.