This is just some static backup of the original site, don't expect every link to work!

Ignore:
Timestamp:
Sep 11, 2018, 12:53:11 PM (4 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
37733f
Parents:
2bdd22
Message:

changed layout mismatch-dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/bindings/vI_rdfAccountMismatchDialog.xml

    r2bdd22 r668208  
    3333        <xul:listcell>
    3434            <xul:label class="identityDesc-name" xbl:inherits="value=label,accesskey,crop" crop="end" flex="1"/>
     35            <xul:label class="identityDesc-pre" value="(" crop="end" />
    3536            <xul:label class="identityDesc-ext1" xbl:inherits="value=ext1" crop="end" />
     37            <xul:label class="identityDesc-mid" value="/" crop="end" />
    3638            <xul:label class="identityDesc-ext2" xbl:inherits="value=ext2" crop="end" />
     39            <xul:label class="identityDesc-post" value=")" crop="end" />
    3740        </xul:listcell>
    38         <xul:listcell>
     41        <xul:listcell class="identityDesc-count-cell">
    3942            <xul:label class="identityDesc-count" xbl:inherits="value=count" crop="end" />
    4043        </xul:listcell>
     
    5356    </implementation>
    5457    </binding>
    55          
    56     <binding id="mismatch-menuitem" extends="chrome://global/content/bindings/menu.xml#menuitem">
    57     <content>
    58         <xul:label class="identityDesc-name" xbl:inherits="value=label,accesskey,crop" crop="end" flex="1"/>
    59         <xul:label class="identityDesc-ext1" xbl:inherits="value=ext1" crop="end" />
    60         <xul:label class="identityDesc-ext2" xbl:inherits="value=ext2" crop="end" />
    61     </content>
    62     </binding>
    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
    6467    <binding id="mismatch-menulist" extends="chrome://global/content/bindings/menulist.xml#menulist">
    6568    <content>
     
    155158    <method name="_addIdentities">
    156159        <body><![CDATA[
    157         virtualIdentityExtension.Log.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: _addIdentities.");
     160        //virtualIdentityExtension.Log.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: _addIdentities.");
    158161        Components.utils.import("resource://v_identity/vI_accountUtils.js", virtualIdentityExtension);
    159162        var accounts = virtualIdentityExtension.getAccountsArray();
     
    175178        ]]></body>
    176179    </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
    177221    <method name="_addIdentitiesWithSmtp">
    178222        <body><![CDATA[
     
    213257    <constructor>
    214258        <![CDATA[       
    215         virtualIdentityExtension.Log.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: constructor.");
     259        //virtualIdentityExtension.Log.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: constructor.");
    216260        const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    217261        this.appendChild(document.createElementNS(XUL_NS, "menuseparator")); // create a new XUL menuseparator
     
    220264            this._addIdentities();
    221265            break;
     266          case "smtp":
     267            this._addSmtpServers();
     268            break;
    222269          case "smtpid":
    223270            this._addIdentitiesWithSmtp();
Note: See TracChangeset for help on using the changeset viewer.