Changeset 69d5af


Ignore:
Timestamp:
Mar 4, 2010, 11:24:07 AM (10 years ago)
Author:
rene <rene@…>
Branches:
multiEdit, ng_0.6, ng_0.8, ng_0.9
Children:
0c6f0f
Parents:
16d9fd
Message:

optimized debug messages

Location:
chrome/content/v_identity
Files:
5 edited

Legend:

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

    r16d9fd r69d5af  
    9898    isExistingIdentity : function(ignoreFullNameWhileComparing) {
    9999        vI_notificationBar.dump("## vI_identityData: isExistingIdentity: ignoreFullNameWhileComparing='" + ignoreFullNameWhileComparing + "'\n");
     100        vI_notificationBar.dump("## vI_identityData base: fullName.toLowerCase()='" + this.fullName + " email.toLowerCase()='" + this.email + " smtp='" + this.smtp.key + "'\n");
     101
    100102        var accounts = queryISupportsArray(gAccountManager.accounts, Components.interfaces.nsIMsgAccount);
    101103        for (var i in accounts) {
     
    105107            var identities = queryISupportsArray(accounts[i].identities, Components.interfaces.nsIMsgIdentity);
    106108            for (var j in identities) {
     109                vI_notificationBar.dump("## vI_identityData comp: fullName.toLowerCase()='" + identities[j].fullName.toLowerCase() + " email.toLowerCase()='" + identities[j].email.toLowerCase() + " smtp='" + identities[j].smtpServerKey + "'\n");
     110
    107111                if (    (ignoreFullNameWhileComparing ||
    108112                    this.fullName.toLowerCase() == identities[j].fullName.toLowerCase()) &&
  • chrome/content/v_identity/vI_rdfDatasource.js

    r16d9fd r69d5af  
    272272        var id = vI_rdfDatasource.__getRDFValue(resource, "id")
    273273        var smtp = vI_rdfDatasource.__getRDFValue(resource, "smtp")
    274         vI_notificationBar.dump("## vI_rdfDatasource: email='" + email +
    275             "' fullName='" + fullName + "' id='" + id + "' smtp='" + smtp + "'\n");
    276274        if (!smtp) smtp = NO_SMTP_TAG;
    277275       
  • chrome/content/v_identity/vI_storage.js

    r16d9fd r69d5af  
    145145        matchResults.storageData[1] = vI_rdfDatasource.findMatchingFilter(recipient.recDesc);
    146146
     147        vI_notificationBar.dump("## vI_storage: updateVIdentityFromStorage add found Identities to CloneMenu.\n");
    147148        var matchIndex = null;
    148149        for (var i = 0; i <= 1; i++) {
    149             if (matchResults.storageData[i]) {
    150                 if (matchIndex == null) matchIndex = i;
     150            if (matchResults.storageData[i]) {          // check if there is a result in direct match or filter
     151                if (matchIndex == null) matchIndex = i;     // prefer direct match instead of filter
    151152                matchResults.menuItem[i] = document.getElementById("msgIdentity_clone")
    152153                                .addIdentityToCloneMenu(matchResults.storageData[i]);
    153154            }
    154155        }
    155         if (matchIndex == null) return;
    156        
     156        if (matchIndex == null) {
     157            vI_notificationBar.dump("## vI_storage: updateVIdentityFromStorage no usable Storage-Data found.\n");
     158            return;
     159        }
     160        else {
     161            vI_notificationBar.dump("## vI_storage: using data from " + ((matchIndex == 0)?"direct":"filter") + " match\n");
     162        }
    157163        // found storageData, so store InputElement
    158164        if (!vI_storage.firstUsedInputElement) vI_storage.firstUsedInputElement = inputElement;
    159165       
    160166        vI_notificationBar.dump("## vI_storage: compare with current Identity\n");
    161         if (vI.preferences.getBoolPref("storage_getOneOnly") &&
    162             vI_storage.firstUsedInputElement &&
    163             vI_storage.firstUsedInputElement != inputElement &&
    164             !matchResults.storageData[matchIndex].equalsCurrentIdentity(false).equal)
     167        if (vI.preferences.getBoolPref("storage_getOneOnly") &&                 // if requested to retrieve only storageID for first recipient entered
     168            vI_storage.firstUsedInputElement &&                     // and the request for the first recipient was already done
     169            vI_storage.firstUsedInputElement != inputElement &&             // and it's not the same element we changed now
     170            !matchResults.storageData[matchIndex].equalsCurrentIdentity(false).equal)   // and this id is different than the current used one
    165171                vI_notificationBar.setNote(vI.elements.strings
    166                     .getString("vident.smartIdentity.vIStorageCollidingIdentity"),
     172                    .getString("vident.smartIdentity.vIStorageCollidingIdentity"),  // than drop the potential changes
    167173                    "storage_notification");
    168174        // only update fields if new Identity is different than old one.
    169175        else {
     176            vI_notificationBar.dump("## vI_storage: updateVIdentityFromStorage check if storage-data matches current Identity.\n");
    170177            var compResult = matchResults.storageData[matchIndex].equalsCurrentIdentity(true);
    171178            if (!compResult.equal) {
     
    180187                            "storage_notification");
    181188                }
     189            }
     190            else {
     191                vI_notificationBar.dump("## vI_storage: updateVIdentityFromStorage doing nothing - equals current Identity.\n");
    182192            }
    183193        }
  • chrome/content/v_identity/v_identity.js

    r16d9fd r69d5af  
    183183            var currentIdentity = getCurrentIdentity();
    184184            var currentSMTPobj = new smtpObj(currentIdentity.smtpServerKey);
     185            vI_notificationBar.dump("\n## vI_identityData GenericSendMessage Final Check\n");
     186            vI_notificationBar.dump("## vI_identityData currentIdentity: fullName='" + currentIdentity.fullName + "' email='" + currentIdentity.email + "' smtp='" + currentSMTPobj.key + "'\n");
     187            vI_notificationBar.dump("## vI_identityData virtualIdentityData: fullName='" + virtualIdentityData.fullName + "' email='" + virtualIdentityData.email + "' smtp='" + virtualIdentityData.smtp.key + "'\n");
     188
    185189            if (    !vid ||
    186190                (currentIdentity.fullName == virtualIdentityData.fullName   &&
  • chrome/content/v_identity/v_identity.xml

    r16d9fd r69d5af  
    536536           
    537537            if (oldIdentityData) { // indicates that it's not first time after clean
     538                vI_notificationBar.dump("** v_identity.xml previousID: fullName='" + oldIdentityData.fullName + "' email='" + oldIdentityData.email + "' smtp='" + oldIdentityData.smtp.key + "' id='" + oldIdentityData.id.key + "'\n");
     539                vI_notificationBar.dump("** v_identity.xml newID: fullName='" + this._identityDataStorage.fullName + "' email='" + this._identityDataStorage.email + "' smtp='" + this._identityDataStorage.smtp.key + "' id='" + this._identityDataStorage.id.key + "'\n");
    538540                if (!this._identityDataStorage.id.key) {
    539541                    this._identityDataStorage.id.key = oldIdentityData.id.key;
     
    550552            this.label = this._identityDataStorage.combinedName;
    551553            this.value = this._identityDataStorage.id.key;
    552             // vI_notificationBar.dump("** v_identity.xml identityData setter value='" + this.value + "'\n")
    553554            this.description = this._identityDataStorage.sideDescription;
    554             // vI_notificationBar.dump("** v_identity.xml identityData setter smtp='" + this._identityDataStorage.smtp.keyNice + "'\n")
    555555            document.getAnonymousElementByAttribute(this, "anonid", "smtpServerListHbox").smtp = this._identityDataStorage.smtp.keyNice;
    556            
    557         }
    558         // vI_notificationBar.dump("** v_identity.xml identityData setter done.'\n")
     556            vI_notificationBar.dump("** v_identity.xml resultingID: fullName='" + this._identityDataStorage.fullName + "' email='" + this._identityDataStorage.email + "' smtp='" + this._identityDataStorage.smtp.key + "' id='" + this._identityDataStorage.id.key + "'\n");         
     557        }
     558        vI_notificationBar.dump("** v_identity.xml identityData setter done.'\n")
    559559        ]]></setter>
    560560    </property>
Note: See TracChangeset for help on using the changeset viewer.