Changeset 668208 for content/bindings/vI_rdfAccountMismatchDialog.xml
- Timestamp:
- Sep 11, 2018, 12:53:11 PM (4 years ago)
- Branches:
- ng_0.9
- Children:
- 37733f
- Parents:
- 2bdd22
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
content/bindings/vI_rdfAccountMismatchDialog.xml
r2bdd22 r668208 33 33 <xul:listcell> 34 34 <xul:label class="identityDesc-name" xbl:inherits="value=label,accesskey,crop" crop="end" flex="1"/> 35 <xul:label class="identityDesc-pre" value="(" crop="end" /> 35 36 <xul:label class="identityDesc-ext1" xbl:inherits="value=ext1" crop="end" /> 37 <xul:label class="identityDesc-mid" value="/" crop="end" /> 36 38 <xul:label class="identityDesc-ext2" xbl:inherits="value=ext2" crop="end" /> 39 <xul:label class="identityDesc-post" value=")" crop="end" /> 37 40 </xul:listcell> 38 <xul:listcell >41 <xul:listcell class="identityDesc-count-cell"> 39 42 <xul:label class="identityDesc-count" xbl:inherits="value=count" crop="end" /> 40 43 </xul:listcell> … … 53 56 </implementation> 54 57 </binding> 55 56 57 58 59 60 61 62 63 58 59 <binding id="mismatch-menuitem" extends="chrome://global/content/bindings/menu.xml#menuitem"> 60 <content> 61 <xul:label class="identityDesc-name" xbl:inherits="value=label,accesskey,crop" crop="end" flex="1"/> 62 <xul:label class="identityDesc-ext1" xbl:inherits="value=ext1" crop="end" /> 63 <xul:label class="identityDesc-ext2" xbl:inherits="value=ext2" crop="end" /> 64 </content> 65 </binding> 66 64 67 <binding id="mismatch-menulist" extends="chrome://global/content/bindings/menulist.xml#menulist"> 65 68 <content> … … 155 158 <method name="_addIdentities"> 156 159 <body><![CDATA[ 157 virtualIdentityExtension.Log.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: _addIdentities.");160 //virtualIdentityExtension.Log.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: _addIdentities."); 158 161 Components.utils.import("resource://v_identity/vI_accountUtils.js", virtualIdentityExtension); 159 162 var accounts = virtualIdentityExtension.getAccountsArray(); … … 175 178 ]]></body> 176 179 </method> 180 <method name="_addSmtp"> 181 <parameter name="server" /> 182 <body><![CDATA[ 183 //virtualIdentityExtension.Log.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: _addSmtp."); 184 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; 185 var menuitem = document.createElementNS(XUL_NS, "menuitem"); // create a new XUL menuitem 186 menuitem.setAttribute("class", "mismatchMenuitem"); 187 menuitem.setAttribute("label", (server.description?server.description:server.hostname)); 188 menuitem.setAttribute("ext1", server.hostname); 189 menuitem.setAttribute("ext2", server.username); 190 menuitem.setAttribute("key", server.key); 191 this.appendChild(menuitem); 192 ]]></body> 193 </method> 194 <method name="_addSmtpServers"> 195 <body><![CDATA[ 196 //virtualIdentityExtension.Log.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: _addSmtpServers."); 197 198 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; 199 var menuitem = document.createElementNS(XUL_NS, "menuitem"); // create a new XUL menuitem 200 menuitem.setAttribute("class", "mismatchMenuitem"); 201 menuitem.setAttribute("key", virtualIdentityExtension.DEFAULT_SMTP_TAG); 202 menuitem.setAttribute("label", Components.classes["@mozilla.org/intl/stringbundle;1"] 203 .getService(Components.interfaces.nsIStringBundleService) 204 .createBundle("chrome://messenger/locale/messenger.properties") 205 .GetStringFromName("defaultServerTag")); 206 this.appendChild(menuitem); 207 208 var servers, smtpService = Components.classes["@mozilla.org/messengercompose/smtp;1"] 209 .getService(Components.interfaces.nsISmtpService); 210 // check for new https://hg.mozilla.org/comm-central/rev/fab9e5145cd4 smtpService 211 if (typeof(smtpService.servers) == "object") servers = smtpService.servers; 212 else servers = smtpService.smtpServers; 213 214 while (servers && servers.hasMoreElements()) { 215 var server = servers.getNext(); 216 if (server instanceof Components.interfaces.nsISmtpServer && !server.redirectorType) this._addSmtp(server); 217 } 218 ]]></body> 219 </method> 220 177 221 <method name="_addIdentitiesWithSmtp"> 178 222 <body><![CDATA[ … … 213 257 <constructor> 214 258 <![CDATA[ 215 virtualIdentityExtension.Log.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: constructor.");259 //virtualIdentityExtension.Log.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: constructor."); 216 260 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; 217 261 this.appendChild(document.createElementNS(XUL_NS, "menuseparator")); // create a new XUL menuseparator … … 220 264 this._addIdentities(); 221 265 break; 266 case "smtp": 267 this._addSmtpServers(); 268 break; 222 269 case "smtpid": 223 270 this._addIdentitiesWithSmtp();
Note: See TracChangeset
for help on using the changeset viewer.