Changeset e561f9


Ignore:
Timestamp:
Sep 19, 2008, 1:08:06 PM (13 years ago)
Author:
rene <rene@…>
Branches:
lite_0.1, multiEdit, ng_0.6, ng_0.6_help, ng_0.8, ng_0.9
Children:
db41a0
Parents:
1b7cff
Message:

collection of changes to 0.6 branch

Location:
chrome/content/v_identity
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_identityData.js

    r1b7cff re561f9  
    2424
    2525function identityData(email, fullName, id, smtp, extras, sideDescription) {
    26     this.smtpService =
    27             Components.classes["@mozilla.org/messengercompose/smtp;1"].getService(Components.interfaces.nsISmtpService);
    2826    this.email = email;
    2927    this.fullName = (fullName?fullName:'');
     
    4745
    4846    comp : null,   
    49 
    50     smtpService : null,
    51     ignoreFullNameWhileComparing : false,
    5247
    5348    get combinedName() {
     
    8883    },
    8984
    90     isExistingIdentity : function() {
     85    isExistingIdentity : function(ignoreFullNameWhileComparing) {
    9186        var accounts = queryISupportsArray(gAccountManager.accounts, Components.interfaces.nsIMsgAccount);
    9287        for (var i in accounts) {
     
    9691            var identities = queryISupportsArray(accounts[i].identities, Components.interfaces.nsIMsgIdentity);
    9792            for (var j in identities) {
    98                 if (    (this.ignoreFullNameWhileComparing || this.fullName == identities[j].fullName) &&
     93                if (    (ignoreFullNameWhileComparing || this.fullName == identities[j].fullName) &&
    9994                    (this.email == identities[j].email) &&
    10095                    this.smtp.equal(new smtpObj(identities[j].smtpServerKey))   ) {
     
    121116        this.comp.compareID = compareIdentityData;
    122117
    123         this.comp.equals.fullName = (this.ignoreFullNameWhileComparing || this.fullName == compareIdentityData.fullName)
     118        this.comp.equals.fullName = (this.fullName == compareIdentityData.fullName)
    124119        this.comp.equals.email = (this.email == compareIdentityData.email)
    125120        this.comp.equals.smtp = this.smtp.equal(compareIdentityData.smtp);
     
    131126
    132127    equalsCurrentIdentity : function(getCompareMatrix) {
    133         var compareIdentityData = document.getElementById("msgIdentity_clone").identityData;
    134         var retValue = { equal : null, compareMatrix : null };
    135         retValue.equal = this.equals(compareIdentityData);
    136         if (getCompareMatrix && !retValue.equal) // generate CompareMatrix only if asked and non-equal
    137             retValue.compareMatrix = this.getCompareMatrix();
    138         return retValue;
     128        var equal = this.equals(document.getElementById("msgIdentity_clone").identityData);
     129        var compareMatrix = null;
     130        // generate CompareMatrix only if asked and non-equal
     131        if (getCompareMatrix && !equal) compareMatrix = this.getCompareMatrix();
     132        return { equal : equal, compareMatrix : compareMatrix };
    139133    },
    140134
  • chrome/content/v_identity/vI_smartIdentity.js

    r1b7cff re561f9  
    317317           
    318318                for (var index = 0; index < smartIdentities.number; index++) {
    319                     smartIdentities.identityDataCollection[index].ignoreFullNameWhileComparing = true;
    320                     var idKey = smartIdentities.identityDataCollection[index].isExistingIdentity();
    321                     smartIdentities.identityDataCollection[index].ignoreFullNameWhileComparing = false;
     319                    var idKey = smartIdentities.identityDataCollection[index].isExistingIdentity(true);
    322320                    if (idKey) {
    323321                        var newFullName = gAccountManager.getIdentity(idKey).fullName;
  • chrome/content/v_identity/v_identity.xml

    r1b7cff re561f9  
    449449    <method name="checkForVirtualIdentity">
    450450        <body><![CDATA[
    451         var existingIdentity = this.identityData.isExistingIdentity();
     451        var existingIdentity = this.identityData.isExistingIdentity(false);
    452452        if (!existingIdentity) { this.vid = true; vI_msgIdentityCloneTools.updateReplyTo(); }
    453453        else this.vid = false;
Note: See TracChangeset for help on using the changeset viewer.