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

Ignore:
Timestamp:
Sep 9, 2018, 2:36:02 AM (4 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
c5860f
Parents:
bc6c6b
Message:

removed everything related to smtp-storage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/bindings/v_identity.xml

    rbc6c6b r85fa10  
    8383                    "<td class='image'><img src='chrome://v_identity/skin/vi-info.png' /></td>" +
    8484                    "<td class='identityTable'>" +
    85                         "<div class='name'>" + this.elem.identityData.combinedNameHtml + "</div>" + 
    86                         "<table><tbody>" + this.elem.identityData.getMatrix() + "</tbody></table>" +
     85                        "<div class='name'>" + this.elem.identityData.combinedNameHtml + "</div>" +
     86                                                "<table><tbody>" + this.elem.identityData.getMatrix() + "</tbody></table>" +
    8787                    "</td>" +
    8888                "</tr></table>"
     
    135135
    136136        this.description = this._identityDataStorage.sideDescription?this._identityDataStorage.sideDescription:"";
    137         this.smtp = this._identityDataStorage.smtp.value;
     137        this.smtp = this._identityDataStorage.id.smtpServerName;
     138
    138139        // virtualIdentityExtension.MyLog.debug("v_identity.xml fromPopupItem_clone constructor smtp='" + this.smtp + "'")
    139140        this.smtpStyle = "width:" + document.getElementById("virtualIdentityExtension_SmtpServerList").clientWidth + "px;";
    140         this._identityDataStorage.smtp.value;
    141141       
    142142        document.getElementById("virtualIdentityExtension_tooltipPopupset").addTooltip(this, true);
     
    164164    </implementation>
    165165    </binding>
    166 
    167     <binding id="smtpServerList">
    168     <resources>
    169             <stylesheet src="chrome://global/skin/menu.css"/>
    170     </resources>
    171     <content sizetopopup="pref">
    172         <xul:hbox id="smtpServerHbox" class="smtpServerHbox">
    173             <xul:menulist class="smtpServerMenuList" anonid="smtpServerMenuList" allowevents="true" id="virtualIdentityExtension_SmtpServerList">
    174                 <xul:menupopup anonid="virtualIdentityExtension_SmtpServerList_popup" />
    175             </xul:menulist>
    176             <xul:checkbox  id="virtualIdentityExtension_SaveSmtpSwitch" class="vI_plain" allowevents="true" oncommand="event.stopPropagation();virtualIdentityExtension.vIprefs.set('storage_store_SMTP', this.checked);" >
    177                 <xul:observes element="virtualIdentityExtension_statusMenu_storage_saveSMTP" attribute="checked" />
    178                 <xul:observes element="virtualIdentityExtension_statusMenu_storage_saveSMTP" attribute="disabled" />
    179             </xul:checkbox>
    180             <xul:observes element="virtualIdentityExtension_statusMenu_storage_saveSMTP" attribute="checked" />
    181             <xul:observes element="virtualIdentityExtension_statusMenu_storage_saveSMTP" attribute="disabled" />
    182         </xul:hbox>
    183     </content>
    184     <implementation>
    185     <method name="addNoneServer">
    186         <body><![CDATA[
    187         var listitem = document.createElement("menuitem");
    188         listitem.setAttribute("class", "menuitem-non-iconic");
    189         listitem.setAttribute("type", "non-iconic-noaccel");
    190         listitem.setAttribute("label", " ");
    191         listitem.setAttribute("key", virtualIdentityExtension.NO_SMTP_TAG);
    192         this._smtpPopup.insertBefore(listitem, this._smtpPopup.firstChild);
    193         this._smtpMenu.selectedItem = listitem;
    194         ]]></body>
    195     </method>
    196     <method name="_addDefaultServer">
    197             <body><![CDATA[
    198         var listitem = document.createElement("menuitem");
    199         listitem.setAttribute("class", "menuitem-non-iconic");
    200         listitem.setAttribute("type", "non-iconic-noaccel");
    201         listitem.setAttribute("label",
    202           Components.classes["@mozilla.org/intl/stringbundle;1"]
    203             .getService(Components.interfaces.nsIStringBundleService)
    204             .createBundle("chrome://messenger/locale/messenger.properties")
    205             .GetStringFromName("defaultServerTag"));
    206         this._smtpPopup.appendChild(listitem);
    207         this._smtpMenu.selectedItem = listitem;
    208         ]]></body>
    209     </method>
    210     <method name="_addServer">
    211         <parameter name="server" />
    212             <body><![CDATA[
    213         if (server instanceof Components.interfaces.nsISmtpServer && !server.redirectorType) {
    214             var listitem = document.createElement("menuitem");
    215             listitem.setAttribute("class", "menuitem-non-iconic");
    216             listitem.setAttribute("type", "non-iconic-noaccel");
    217             listitem.setAttribute("label", (server.description?server.description:server.hostname));
    218             listitem.setAttribute("key", server.key);
    219             this._smtpPopup.appendChild(listitem);
    220         }
    221         ]]></body>
    222     </method>
    223     <method name="refresh">
    224         <body><![CDATA[
    225             this.unload();
    226             this.load();
    227         ]]></body>
    228     </method>
    229     <method name="load">
    230         <body><![CDATA[
    231             this._addDefaultServer();
    232             this._smtpPopup.appendChild(document.createElement("menuseparator"));
    233            
    234             var servers, smtpService = Components.classes["@mozilla.org/messengercompose/smtp;1"]
    235                 .getService(Components.interfaces.nsISmtpService);
    236             // check for new https://hg.mozilla.org/comm-central/rev/fab9e5145cd4 smtpService
    237             if (typeof(smtpService.servers) == "object") servers = smtpService.servers;
    238             else servers = smtpService.smtpServers;
    239            
    240             while (servers && servers.hasMoreElements())
    241                 this._addServer(servers.getNext());
    242         ]]></body>
    243     </method>
    244     <method name="unload">
    245         <body><![CDATA[
    246             var MenuItems = this._smtpPopup.childNodes
    247             while (MenuItems.length > 0) { this._smtpPopup.removeChild(MenuItems[0]) }
    248             this._smtpMenu.selectedItem = null;
    249         ]]></body>
    250     </method>
    251     <constructor>
    252         <![CDATA[
    253             this.load();
    254         ]]>
    255     </constructor>
    256     <property name="smtp" onget="return this._smtpMenu.selectedItem.getAttribute('key');" >
    257         <setter><![CDATA[
    258         if (val == virtualIdentityExtension.NO_SMTP_TAG) return; // dont overwrite if not set
    259         virtualIdentityExtension.MyLog.debug("v_identity.xml smtp set to '" + val + "'")
    260         var MenuItems = this._smtpPopup.childNodes
    261         for (var index = 0; index < MenuItems.length; index++) {
    262             if (MenuItems[index].localName == "menuseparator") continue;
    263             if (MenuItems[index].getAttribute("key") == val) {
    264                 this._smtpMenu.selectedItem = MenuItems[index];
    265                 break;
    266             }
    267         }
    268         ]]></setter>
    269     </property>
    270     <field name="_smtpPopup">document.getAnonymousElementByAttribute(this, "anonid", "virtualIdentityExtension_SmtpServerList_popup")</field>
    271     <field name="_smtpMenu">document.getAnonymousElementByAttribute(this, "anonid", "smtpServerMenuList")</field>
    272     <field name="_smtpService"></field>
    273 
    274     </implementation>
    275     </binding>
    276    
    277166   
    278167    <binding id="fromMenuList_new" extends="chrome://global/content/bindings/menulist.xml#menulist-editable">
     
    306195                </xul:hbox>
    307196              </xul:moz-input-box>
    308               <!--<xul:hbox oncommand="event.stopPropagation();document.getBindingParent(this).smtp = this.smtp" xbl:inherits="showSmtp" anonid="smtpServerListHbox" class="smtpServerListHbox" />-->
    309197              <xul:dropmarker class="menulist-dropmarker" type="menu" xbl:inherits="open,disabled,parentfocused=focused"/>
    310198              <xul:popupset id="virtualIdentityExtension_tooltipPopupset" />
     
    324212        // it will be done in v_identity.js init
    325213        // document.getElementById("virtualIdentityExtension_tooltipPopupset").addTooltip(this, false);
    326        
    327         virtualIdentityExtension.vIprefs.addObserver("show_smtp", this.observe, this);
    328                 this.observe(this);
    329214        ]]>
    330215    </constructor>
     
    333218        var tooltipPopupset = document.getElementById("virtualIdentityExtension_tooltipPopupset")
    334219        if (tooltipPopupset) tooltipPopupset.removeTooltip(this.tooltipElem.getAttribute("tooltip"));
    335         virtualIdentityExtension.vIprefs.removeObserver("show_smtp", this.observe);
    336220        ]]>
    337221          </destructor>
     
    438322        ]]></body>
    439323    </method>
    440         <property name="smtp" onget="return this.identityData.smtp.key;" > // used to detect changes from SMTP-Menu
    441         <setter><![CDATA[
    442         this.identityData.smtp.key = val;
    443        
    444         document.getElementById("virtualIdentityExtension_tooltipPopupset").addTooltip(this);
    445 
    446         var existingIdentity = this.checkForVirtualIdentity();
    447         if (existingIdentity) this.selectedMenuItem = existingIdentity;
    448         ]]></setter>
    449         </property>
    450324    <property name="identityData">
    451325        <getter><![CDATA[
     
    470344    <field name="tooltipElem">document.getAnonymousElementByAttribute(this, "anonid", "inputBox")</field>
    471345    <field name="textBoxElem">document.getAnonymousElementByAttribute(this, "anonid", "input");</field>
    472         <method name="observe">
    473           <parameter name="self" />
    474           <parameter name="aSubject" />
    475           <parameter name="aTopic" />
    476           <parameter name="aPrefName" />
    477           <body><![CDATA[
    478             self.showSmtp =
    479               virtualIdentityExtension.vIprefs.get("show_smtp");
    480             var MenuItems = self._popupElem.childNodes;
    481             for (var j = 0; j < MenuItems.length; j++) {
    482                 if (MenuItems[j].localName == "menuseparator") continue;
    483                 MenuItems[j].smtpStyle = "width:" + document.getElementById("virtualIdentityExtension_SmtpServerList").clientWidth + "px;";
    484             }
    485             ]]></body>
    486         </method>
    487346    <property name="email" onset="this.identityData.email = val; this.label = this.identityData.combinedName; this.inputEvent()" />
    488347    <property name="vid" onget="return (this.getAttribute('vid') == 'true');" onset="this.setAttribute('vid',val); return val;" />
     
    490349    <property name="extras" onget="return this.identityData.extras;" />
    491350    <property name="description" onget="return this.getAttribute('description');" onset="this.setAttribute('description', val); return val;" />
    492         <!--<property name="showSmtp" onget="return (this.getAttribute('showSmtp') == 'true');" onset="this.setAttribute('showSmtp',val?'true':'false'); return val;" />-->
    493351    </implementation>
    494352    </binding>
     
    522380              this.identityData = new virtualIdentityExtension.identityData(window, identity.email,
    523381                                    identity.fullName, identity.key,
    524                                     identity.smtpServerKey, null, null, true);
     382                                    null, null, true);
    525383              this._identityData.extras.readIdentityValues(identity);
    526384              }
     
    550408            this._setAttributeIfNotEmpty("label", this._identityData.combinedName);
    551409            this._setAttributeIfNotEmpty("value", this._identityData.combinedName);
    552             this._setAttributeIfNotEmpty("smtp", this._identityData.smtp.value);
     410            this._setAttributeIfNotEmpty("smtp", this._identityData.id.smtpServerName);
    553411            this._setAttributeIfNotEmpty("description", "");
    554412           
Note: See TracChangeset for help on using the changeset viewer.