Changeset bf505e
- Timestamp:
- Nov 15, 2011, 12:22:28 PM (11 years ago)
- Branches:
- ng_0.9
- Children:
- d8da4b
- Parents:
- f17e5d3
- Location:
- content
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
content/bindings/vI_rdfAccountMismatchDialog.xml
rf17e5d3 rbf505e 155 155 <method name="_addIdentities"> 156 156 <body><![CDATA[ 157 MyLog.debug(" ##mismatchID-menupopup: _addIdentities.\n");157 MyLog.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: _addIdentities.\n"); 158 158 var AccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"] 159 159 .getService(Components.interfaces.nsIMsgAccountManager); … … 177 177 <parameter name="server" /> 178 178 <body><![CDATA[ 179 MyLog.debug(" ##mismatchID-menupopup: _addSmtp.\n");179 MyLog.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: _addSmtp.\n"); 180 180 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; 181 181 var menuitem = document.createElementNS(XUL_NS, "menuitem"); // create a new XUL menuitem … … 190 190 <method name="_addSmtpServers"> 191 191 <body><![CDATA[ 192 MyLog.debug(" ##mismatchID-menupopup: _addSmtpServers.\n");192 MyLog.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: _addSmtpServers.\n"); 193 193 194 194 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; … … 209 209 <constructor> 210 210 <![CDATA[ 211 MyLog.debug(" ##mismatchID-menupopup: constructor.\n");211 MyLog.debug("rdfAccountMismatchDialog.xml mismatchID-menupopup: constructor.\n"); 212 212 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; 213 213 this.appendChild(document.createElementNS(XUL_NS, "menuseparator")); // create a new XUL menuseparator -
content/modules/plugins/conversation.js
rf17e5d3 rbf505e 29 29 30 30 let _changeIdentityToSmartIdentity = function(identityData) { 31 Log.debug(" ##changeIdentityToSmartIdentity\n");31 Log.debug("changeIdentityToSmartIdentity\n"); 32 32 33 33 if ( identityData.id.key != null ) { 34 34 currentParams.identity = AccountManager.getIdentity(identityData.id.key); 35 Log.debug(" ##changed base identity to ", identityData.id.key);35 Log.debug("changed base identity to ", identityData.id.key); 36 36 virtualSenderNameElem.text(currentIdSenderName); 37 37 } 38 38 virtualIdInUse = !(identityData.isExistingIdentity(false)); 39 Log.debug(" ##changeIdentityToSmartIdentity virtualIdInUse=" + virtualIdInUse + "\n");39 Log.debug("changeIdentityToSmartIdentity virtualIdInUse=" + virtualIdInUse + "\n"); 40 40 if (virtualIdInUse) { 41 41 currentIdentityData = identityData; … … 73 73 var existingIDIndex = localSmartIdentityCollection._foundExistingIdentity(); 74 74 if (existingIDIndex) { 75 Log.debug(" ##smartIdentity: found existing Identity, use without interaction.\n", existingIDIndex.key);75 Log.debug("smartIdentity: found existing Identity, use without interaction.\n", existingIDIndex.key); 76 76 changeIdentityToSmartIdentity(localSmartIdentityCollection._allIdentities, existingIDIndex.key); 77 77 return; … … 93 93 onMessageBeforeSendOrPopout: function(aAddress, aStatus, aPopout) { 94 94 let toAddrList = aAddress.to.concat(aAddress.cc); 95 Log.debug(" ##onMessageBeforeSendOrPopup");95 Log.debug("onMessageBeforeSendOrPopup"); 96 96 97 97 if (virtualIdInUse) { -
content/modules/vI_account.js
rf17e5d3 rbf505e 43 43 .getService(Components.interfaces.nsIMsgAccountManager); 44 44 45 Log.debug("\n ##prepareSendMsg " + msgType + " " + Components.interfaces.nsIMsgCompDeliverMode.Now + "\n");45 Log.debug("\nprepareSendMsg " + msgType + " " + Components.interfaces.nsIMsgCompDeliverMode.Now + "\n"); 46 46 47 47 returnValue = {}; … … 61 61 var returnValue = localeDatasourceAccess.storeVIdentityToAllRecipients(identityData, recipients) 62 62 if ( returnValue.update == "abort" || returnValue.update == "takeover" ) { 63 Log.debug(" ##prepareSendMsg: sending aborted\n");63 Log.debug("prepareSendMsg: sending aborted\n"); 64 64 return returnValue; 65 65 } 66 66 } 67 else Log.debug(" ##prepareSendMsg: storage deactivated\n");67 else Log.debug("prepareSendMsg: storage deactivated\n"); 68 68 } 69 69 if (vid) { … … 80 80 var currentIdentityData = new vI.identityData(currentIdentity.email, currentIdentity.fullName, null, currentIdentity.smtpServerKey, null, null, null); 81 81 82 Log.debug("\n ## vI.identityDataSendMessage Final Check\n");83 Log.debug(" ## vI.identityDatacurrentIdentity: fullName='" + currentIdentityData.fullName + "' email='" + currentIdentityData.email + "' smtp='" + currentIdentityData.smtp.key + "'\n");84 Log.debug(" ## vI.identityDatavirtualIdentityData: fullName='" + virtualIdentityData.fullName + "' email='" + virtualIdentityData.email + "' smtp='" + virtualIdentityData.smtp.key + "'\n");82 Log.debug("\nSendMessage Final Check\n"); 83 Log.debug("currentIdentity: fullName='" + currentIdentityData.fullName + "' email='" + currentIdentityData.email + "' smtp='" + currentIdentityData.smtp.key + "'\n"); 84 Log.debug("virtualIdentityData: fullName='" + virtualIdentityData.fullName + "' email='" + virtualIdentityData.email + "' smtp='" + virtualIdentityData.smtp.key + "'\n"); 85 85 86 86 if (currentIdentityData.fullName.toLowerCase() == virtualIdentityData.fullName.toLowerCase() && … … 90 90 } 91 91 else { 92 if (!(currentIdentityData.fullName.toLowerCase() == virtualIdentityData.fullName.toLowerCase())) Log. debug("\n## vI.identityDatafailed check for fullName.\n");93 if (!(currentIdentityData.email.toLowerCase() == virtualIdentityData.email.toLowerCase())) Log. debug("\n## vI.identityDatafailed check for email.\n");94 if (!(virtualIdentityData.smtp.equal(currentIdentityData.smtp))) Log. debug("\n## vI.identityDatafailed check for SMTP.\n");92 if (!(currentIdentityData.fullName.toLowerCase() == virtualIdentityData.fullName.toLowerCase())) Log.error("\nfailed check for fullName.\n"); 93 if (!(currentIdentityData.email.toLowerCase() == virtualIdentityData.email.toLowerCase())) Log.error("\nfailed check for email.\n"); 94 if (!(virtualIdentityData.smtp.equal(currentIdentityData.smtp))) Log.error("\nfailed check for SMTP.\n"); 95 95 alert(stringBundle.getStringFromName("vident.genericSendMessage.error")); 96 96 return false … … 140 140 if (account._pref.getBoolPref("copySMIMESettings")) { 141 141 // SMIME settings 142 Log.debug(" ## account:copy S/MIME settings\n")142 Log.debug("copy S/MIME settings\n") 143 143 account._copyUnicharAttribute("signing_cert_name"); 144 144 account._copyUnicharAttribute("encryption_cert_name"); … … 148 148 if (account._pref.getBoolPref("copyEnigmailSettings")) { 149 149 // pgp/enigmail settings 150 Log.debug(" ## account:copy PGP settings\n")150 Log.debug("copy PGP settings\n") 151 151 account._copyBoolAttribute("pgpSignEncrypted"); 152 152 account._copyBoolAttribute("pgpSignPlain"); … … 161 161 if (account._pref.getBoolPref("copyAttachVCardSettings")) { 162 162 // attach vcard 163 Log.debug(" ## account:copy VCard settings\n")163 Log.debug("copy VCard settings\n") 164 164 account._copyBoolAttribute("attachVCard"); 165 165 account._copyCharAttribute("escapedVCard"); … … 185 185 186 186 __cleanupDirectories : function() { 187 Log.debug(" ## account:checking for leftover VirtualIdentity directories ")187 Log.debug("checking for leftover VirtualIdentity directories ") 188 188 189 189 var file = Components.classes["@mozilla.org/file/directory_service;1"] … … 217 217 218 218 cleanupSystem : function() { 219 Log.debug(" ## account:checking for leftover VirtualIdentity accounts ")219 Log.debug("checking for leftover VirtualIdentity accounts ") 220 220 for (var i=0; i < account._AccountManager.accounts.Count(); i++) { 221 221 var checkAccount = account._AccountManager.accounts.QueryElementAt(i, Components.interfaces.nsIMsgAccount); … … 240 240 241 241 __removeAccount : function(checkAccount) { 242 Log.debug(" ## account:__removeAccount\n")242 Log.debug("__removeAccount\n") 243 243 // in new (post 0.5.0) Virtual Identity accounts the incomingServer of the account 244 244 // points to an incoming server of a different account. Cause the internal … … 256 256 257 257 var key = checkAccount.key; 258 Log.debug(" ## account:removing account " + key + ".\n")258 Log.debug("removing account " + key + ".\n") 259 259 // remove the account 260 260 account._AccountManager.removeAccount(checkAccount); … … 329 329 account._account.defaultIdentity.smtpServerKey = baseIdentity.smtpServerKey; 330 330 331 Log.debug(" ## account:Stored virtualIdentity (name "331 Log.debug("Stored virtualIdentity (name " 332 332 + account._account.defaultIdentity.fullName + " email " 333 333 + account._account.defaultIdentity.email + " smtp " … … 345 345 { 346 346 case "2" : 347 Log.debug (" ## account:preparing Fcc --- use Settings of Default Account\n");347 Log.debug ("preparing Fcc --- use Settings of Default Account\n"); 348 348 account._account.defaultIdentity.doFcc = account._AccountManager.defaultAccount.defaultIdentity.doFcc; 349 349 account._account.defaultIdentity.fccFolder = account._AccountManager.defaultAccount.defaultIdentity.fccFolder; … … 352 352 break; 353 353 case "3" : 354 Log.debug (" ## account:preparing Fcc --- use Settings of Modified Account\n");354 Log.debug ("preparing Fcc --- use Settings of Modified Account\n"); 355 355 account._account.defaultIdentity.doFcc = account._baseIdentity.doFcc; 356 356 account._account.defaultIdentity.fccFolder = account._baseIdentity.fccFolder; … … 359 359 break; 360 360 default : 361 Log.debug (" ## account:preparing Fcc --- use Virtual Identity Settings\n");361 Log.debug ("preparing Fcc --- use Virtual Identity Settings\n"); 362 362 account._account.defaultIdentity.doFcc 363 363 = account._pref.getBoolPref("doFcc"); … … 372 372 } 373 373 else { 374 dump (" ## account:dont performing Fcc\n");374 dump ("dont performing Fcc\n"); 375 375 account._account.defaultIdentity.doFcc = false; 376 376 } 377 Log.debug(" ## account:Stored (doFcc " + account._account.defaultIdentity.doFcc + " fccFolder " +377 Log.debug("Stored (doFcc " + account._account.defaultIdentity.doFcc + " fccFolder " + 378 378 account._account.defaultIdentity.fccFolder + " fccFolderPickerMode " + 379 379 account._account.defaultIdentity.fccFolderPickerMode + "(" + … … 385 385 { 386 386 case "2" : 387 Log.debug (" ## account:preparing Draft --- use Settings of Default Account\n");387 Log.debug ("preparing Draft --- use Settings of Default Account\n"); 388 388 account._account.defaultIdentity.draftFolder = account._AccountManager.defaultAccount.defaultIdentity.draftFolder; 389 389 account._account.defaultIdentity.draftsFolderPickerMode = account._AccountManager.defaultAccount.defaultIdentity.draftsFolderPickerMode; 390 390 break; 391 391 case "3" : 392 Log.debug (" ## account:preparing Draft --- use Settings of Modified Account\n");392 Log.debug ("preparing Draft --- use Settings of Modified Account\n"); 393 393 account._account.defaultIdentity.draftFolder = account._baseIdentity.draftFolder; 394 394 account._account.defaultIdentity.draftsFolderPickerMode = account._baseIdentity.draftsFolderPickerMode; 395 395 break; 396 396 default : 397 Log.debug (" ## account:preparing Draft --- use Virtual Identity Settings\n");397 Log.debug ("preparing Draft --- use Virtual Identity Settings\n"); 398 398 account._account.defaultIdentity.draftFolder 399 399 = account._unicodeConverter.ConvertToUnicode(account._pref.getCharPref("draftFolder")); … … 402 402 break; 403 403 } 404 Log.debug(" ## account:Stored (draftFolder " +404 Log.debug("Stored (draftFolder " + 405 405 account._account.defaultIdentity.draftFolder + " draftsFolderPickerMode " + 406 406 account._account.defaultIdentity.draftsFolderPickerMode + "(" + … … 412 412 { 413 413 case "2" : 414 Log.debug (" ## account:preparing Templates --- use Settings of Default Account\n");414 Log.debug ("preparing Templates --- use Settings of Default Account\n"); 415 415 account._account.defaultIdentity.stationeryFolder = account._AccountManager.defaultAccount.defaultIdentity.stationeryFolder; 416 416 account._account.defaultIdentity.tmplFolderPickerMode = account._AccountManager.defaultAccount.defaultIdentity.tmplFolderPickerMode; 417 417 break; 418 418 case "3" : 419 Log.debug (" ## account:preparing Templates --- use Settings of Modified Account\n");419 Log.debug ("preparing Templates --- use Settings of Modified Account\n"); 420 420 account._account.defaultIdentity.stationeryFolder = account._baseIdentity.stationeryFolder; 421 421 account._account.defaultIdentity.tmplFolderPickerMode = account._baseIdentity.tmplFolderPickerMode; 422 422 break; 423 423 default : 424 Log.debug (" ## account:preparing Templates --- use Virtual Identity Settings\n");424 Log.debug ("preparing Templates --- use Virtual Identity Settings\n"); 425 425 account._account.defaultIdentity.stationeryFolder 426 426 = account._unicodeConverter.ConvertToUnicode(account._pref.getCharPref("stationeryFolder")); … … 429 429 break; 430 430 } 431 Log.debug(" ## account:Stored (stationeryFolder " +431 Log.debug("Stored (stationeryFolder " + 432 432 account._account.defaultIdentity.stationeryFolder + " tmplFolderPickerMode " + 433 433 account._account.defaultIdentity.tmplFolderPickerMode + "(" + -
content/modules/vI_identityData.js
rf17e5d3 rbf505e 74 74 this._fullName += RegExp.leftContext + RegExp.rightContext; 75 75 this._email = RegExp.lastMatch; 76 // Log.debug(" ## identityData:parseEmail _fullName = '" + this._fullName + "'\n");77 // Log.debug(" ## identityData:parseEmail _email = '" + this._email + "'\n");76 // Log.debug("parseEmail _fullName = '" + this._fullName + "'\n"); 77 // Log.debug("parseEmail _email = '" + this._email + "'\n"); 78 78 } 79 79 this._emailParsed = true; … … 86 86 87 87 cleanName : function(fullName) { 88 // Log.debug(" ## identityData:cleanName init '" + fullName + "'\n");88 // Log.debug("cleanName init '" + fullName + "'\n"); 89 89 var _fullName = fullName.replace(/^\s+|\s+$/g,""); 90 90 if (_fullName.search(/^\".+\"$|^'.+'$/g) != -1) { 91 91 _fullName = this.cleanName(_fullName.replace(/^\"(.+)\"$|^'(.+)'$/g,"$1$2")); 92 92 } 93 // Log.debug(" ## identityData:cleanName done '" + _fullName + "'\n");93 // Log.debug("cleanName done '" + _fullName + "'\n"); 94 94 return _fullName; 95 95 }, … … 136 136 // dependent on MsgComposeCommands, should/will only be called in ComposeDialog 137 137 isExistingIdentity : function(ignoreFullNameWhileComparing) { 138 Log.debug(" ## identityData:isExistingIdentity: ignoreFullNameWhileComparing='" + ignoreFullNameWhileComparing + "'\n");139 // Log.debug(" ## identityDatabase: fullName.toLowerCase()='" + this.fullName + "' email.toLowerCase()='" + this.email + "' smtp='" + this.smtp.key + "'\n");138 Log.debug("isExistingIdentity: ignoreFullNameWhileComparing='" + ignoreFullNameWhileComparing + "'\n"); 139 // Log.debug("base: fullName.toLowerCase()='" + this.fullName + "' email.toLowerCase()='" + this.email + "' smtp='" + this.smtp.key + "'\n"); 140 140 141 141 var ignoreFullNameMatchKey = null; … … 147 147 for (let j = 0; j < account.identities.Count(); j++) { 148 148 var identity = account.identities.QueryElementAt(j, Components.interfaces.nsIMsgIdentity); 149 // Log.debug(" ## identityDatacomp: fullName.toLowerCase()='" + identity.fullName.toLowerCase() + "' email.toLowerCase()='" + identity.email.toLowerCase() + "' smtp='" + identity.smtpServerKey + "'\n");149 // Log.debug("comp: fullName.toLowerCase()='" + identity.fullName.toLowerCase() + "' email.toLowerCase()='" + identity.email.toLowerCase() + "' smtp='" + identity.smtpServerKey + "'\n"); 150 150 var email = this.email?this.email:""; // might be null if no identity is set 151 151 var idEmail = identity.email?identity.email:""; // might be null if no identity is set … … 154 154 // if fullName matches, than this is a final match 155 155 if ( this.fullName.toLowerCase() == identity.fullName.toLowerCase() ) { 156 Log.debug(" ## identityData:isExistingIdentity: " + this.combinedName + " found, id='" + identity.key + "'\n");156 Log.debug("isExistingIdentity: " + this.combinedName + " found, id='" + identity.key + "'\n"); 157 157 return identity.key; // return key and stop searching 158 158 } … … 164 164 165 165 if ( ignoreFullNameWhileComparing && ignoreFullNameMatchKey ) { 166 Log.debug(" ## identityData:isExistingIdentity: " + this.combinedName + " found, id='" + ignoreFullNameMatchKey + "'\n");166 Log.debug("isExistingIdentity: " + this.combinedName + " found, id='" + ignoreFullNameMatchKey + "'\n"); 167 167 return ignoreFullNameMatchKey; 168 168 } 169 169 170 Log.debug(" ## identityData:isExistingIdentity: " + this.combinedName + " not found\n");170 Log.debug("isExistingIdentity: " + this.combinedName + " not found\n"); 171 171 return null; 172 172 }, … … 243 243 244 244 dropIdentity : function(index) { 245 Log.debug(" ## identityCollection:dropping address from inputList: " + this.identityDataCollection[index].combinedName + "\n");245 Log.debug("dropping address from inputList: " + this.identityDataCollection[index].combinedName + "\n"); 246 246 while (index < (this.number - 1)) { this.identityDataCollection[index] = this.identityDataCollection[++index]; }; 247 247 this.identityDataCollection[--this.number] = null; … … 258 258 if (this.identityDataCollection[index].fullName == "" && identityData.fullName != "") { 259 259 this.identityDataCollection[index].fullName = identityData.fullName; 260 Log.debug(" ## identityCollection:added fullName '" + identityData.fullName260 Log.debug("added fullName '" + identityData.fullName 261 261 + "' to stored email '" + this.identityDataCollection[index].email +"'\n") 262 262 } … … 267 267 this.identityDataCollection[index].smtp.key = identityData.smtp.key; 268 268 this.identityDataCollection[index].extras = identityData.extras; 269 Log.debug(" ## identityCollection:added id '" + identityData.id.value269 Log.debug("added id '" + identityData.id.value 270 270 + "' smtp '" + identityData.smtp.value + "' (+extras) to stored email '" + this.identityDataCollection[index].email +"'\n") 271 271 } … … 273 273 } 274 274 } 275 Log.debug(" ## identityCollection:add new address to result: " + identityData.combinedName + "\n")275 Log.debug("add new address to result: " + identityData.combinedName + "\n") 276 276 this.identityDataCollection[index] = identityData; 277 277 this.number = index + 1; -
content/modules/vI_rdfDatasource.js
rf17e5d3 rbf505e 94 94 95 95 init: function() { 96 // Log.debug(" ## rdfDatasourceinit.\n");96 // Log.debug("init.\n"); 97 97 98 98 this._openRdfDataSource(); … … 105 105 106 106 // this.refreshAccountInfo(); 107 // Log.debug(" ## rdfDatasourceinit done.\n");107 // Log.debug("init done.\n"); 108 108 }, 109 109 … … 123 123 var fileURI = protoHandler.newFileURI(newFile); 124 124 125 Log.debug(" ## rdfDatasourceinit: read rdf from '" + fileURI.spec + "'\n");125 Log.debug("init: read rdf from '" + fileURI.spec + "'\n"); 126 126 127 127 this._rdfDataSource = 128 128 this._rdfService.GetDataSourceBlocking(fileURI.spec); 129 129 130 // Log.debug(" ## rdfDatasourceread rdf from '" + fileURI.spec + "' done." + this._rdfService + "\n");130 // Log.debug("read rdf from '" + fileURI.spec + "' done." + this._rdfService + "\n"); 131 131 }, 132 132 … … 348 348 349 349 cleanAccountInfo : function() { 350 Log.debug(" ## rdfDatasource:cleanAccountInfo\n");350 Log.debug("cleanAccountInfo\n"); 351 351 352 352 var enumerator = this._identityContainer.GetElements(); … … 389 389 390 390 searchIdentityMismatch : function() { 391 Log.debug(" ## rdfDatasource:searchIdentityMismatch");391 Log.debug("searchIdentityMismatch"); 392 392 393 393 var relevantIDs = this.getRelevantIDs(); … … 432 432 var keyField = (type == "identity")?"id":"smtp" // field to change is 'id' or 'smtp' dependent on type 433 433 for (var i = 0; i < mismatchItems.length; i++) { 434 Log.debug(" ## rdfDatasource:repairAccountMismatch change " + mismatchItems[i].oldkey + " into " + mismatchItems[i].key + ": ");434 Log.debug("repairAccountMismatch change " + mismatchItems[i].oldkey + " into " + mismatchItems[i].key + ": "); 435 435 // search relevant Identities 436 436 for each (treeType in Array("email", "maillist", "newsgroup", "filter")) { … … 468 468 469 469 searchSmtpMismatch : function() { 470 Log.debug(" ## rdfDatasource:searchSmtpMismatch");470 Log.debug("searchSmtpMismatch"); 471 471 472 472 var relevantSMTPs = this.getRelevantSMTPs(); … … 505 505 506 506 storeAccountInfo : function() { 507 Log.debug(" ## rdfDatasource:storeAccounts\n");507 Log.debug("storeAccounts\n"); 508 508 509 509 var AccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"] … … 513 513 for (let j = 0; j < account.identities.Count(); j++) { 514 514 var identity = account.identities.QueryElementAt(j, Components.interfaces.nsIMsgIdentity); 515 // Log.debug(" ## rdfDatasource:storeAccounts identity store id " + identity.key + "\n");515 // Log.debug("storeAccounts identity store id " + identity.key + "\n"); 516 516 517 517 var resource = this._rdfService.GetResource(this._rdfNS + this._rdfNSIdentities + "/" + identity.key); … … 527 527 528 528 function storeSmtp(server, parent) { 529 // Log.debug(" ## rdfDatasource:storeAccounts smtp store id " + server.key + "\n");529 // Log.debug("storeAccounts smtp store id " + server.key + "\n"); 530 530 var resource = parent._rdfService.GetResource(parent._rdfNS + parent._rdfNSSMTPservers + "/" + server.key); 531 531 parent._setRDFValue(resource, "label", (server.description?server.description:server.hostname)); … … 544 544 } 545 545 546 // Log.debug(" ## rdfDatasource:storeAccounts done\n");546 // Log.debug("storeAccounts done\n"); 547 547 }, 548 548 … … 569 569 if (!this._rdfDataSource) return null; 570 570 if (!recDescription) { 571 Log.debug(" ## rdfDatasource:_getRDFResourceForVIdentity: no Recipient given.\n");571 Log.debug("_getRDFResourceForVIdentity: no Recipient given.\n"); 572 572 return null; 573 573 } … … 585 585 586 586 removeVIdentityFromRDF : function (resource, recType) { 587 // Log.debug(" ## rdfDatasource:removeVIdentityFromRDF " + resource.ValueUTF8 + ".\n");587 // Log.debug("removeVIdentityFromRDF " + resource.ValueUTF8 + ".\n"); 588 588 this._unsetRDFValue(resource, "email", this._getRDFValue(resource, "email")) 589 589 this._unsetRDFValue(resource, "fullName", this._getRDFValue(resource, "fullName")) … … 598 598 599 599 _unsetRDFValue : function (resource, field, value) { 600 // Log.debug(" ## rdfDatasource_unsetRDFValue " + this._rdfService + " " + this._rdfDataSource + "\n");600 // Log.debug("_unsetRDFValue " + this._rdfService + " " + this._rdfDataSource + "\n"); 601 601 var predicate = this._rdfService.GetResource(this._rdfNS + "rdf#" + field); 602 602 var name = this._rdfService.GetLiteral(value?value:""); … … 611 611 // this will be used from rdfDataTree to get all RDF values, callFunction is vI.rdfDataTreeCollection.__addNewDatum 612 612 readAllEntriesFromRDF : function (addNewDatum, treeType, idData) { 613 // Log.debug(" ## rdfDatasource:readAllEntriesFromRDF " + this._rdfService + " " + this._rdfDataSource + " " + this + "\n");613 // Log.debug("readAllEntriesFromRDF " + this._rdfService + " " + this._rdfDataSource + " " + this + "\n"); 614 614 var enumerator = this.getContainer(treeType).GetElements(); 615 615 while (enumerator && enumerator.hasMoreElements()) { … … 632 632 if (recipientType == "addr_newsgroups") return { recDesc : recipient, recType : "newsgroup" } 633 633 else if (this.__isMailingList(recipient)) { 634 Log.debug(" ##__getDescriptionAndType: '" + recipient + "' is MailList\n");634 Log.debug("__getDescriptionAndType: '" + recipient + "' is MailList\n"); 635 635 return { recDesc : this.__getMailListName(recipient), recType : "maillist" } 636 636 } 637 637 else { 638 Log.debug(" ##__getDescriptionAndType: '" + recipient + "' is no MailList\n");638 Log.debug("__getDescriptionAndType: '" + recipient + "' is no MailList\n"); 639 639 var localIdentityData = new vI.identityData(recipient, null, null, null, null, null, null); 640 640 return { recDesc : localIdentityData.combinedName, recType : "email" } … … 678 678 findMatchingFilter : function (recipient, recipientType) { 679 679 var recDescription = this.__getDescriptionAndType(recipient, recipientType).recDesc; 680 Log.debug(" ## rdfDatasource:findMatchingFilter for " + recDescription + ".\n");680 Log.debug("findMatchingFilter for " + recDescription + ".\n"); 681 681 var enumerator = this._filterContainer.GetElements(); 682 682 while (enumerator && enumerator.hasMoreElements()) { … … 690 690 if (filter == "") continue; 691 691 if (/^\/(.*)\/$/.exec(filter)) 692 { Log.debug(" ## rdfDatasource:findMatchingFilter with RegExp '"692 { Log.debug("findMatchingFilter with RegExp '" 693 693 + filter.replace(/\\/g,"\\\\") + "'\n"); recentfilterType = filterType.RegExp; } 694 else { Log.debug(" ## rdfDatasource:findMatchingFilter, compare with '"694 else { Log.debug("findMatchingFilter, compare with '" 695 695 + filter + "'\n"); recentfilterType = filterType.StrCmp; } 696 696 … … 699 699 try { /^\/(.*)\/$/.exec(filter); 700 700 if (recDescription.match(new RegExp(RegExp.$1,"i"))) { 701 Log.debug(" ## rdfDatasource:findMatchingFilter found stored data.\n");701 Log.debug("findMatchingFilter found stored data.\n"); 702 702 return this._readVIdentityFromRDF(resource); 703 703 } … … 706 706 case filterType.StrCmp: 707 707 if (recDescription.toLowerCase().indexOf(filter.toLowerCase()) != -1) { 708 Log.debug(" ## rdfDatasource:findMatchingFilter found stored data.\n");708 Log.debug("findMatchingFilter found stored data.\n"); 709 709 return this._readVIdentityFromRDF(resource); 710 710 } … … 712 712 } 713 713 } 714 Log.debug(" ## rdfDatasource:findMatchingFilter no match found.\n");714 Log.debug("findMatchingFilter no match found.\n"); 715 715 return null; 716 716 }, … … 723 723 if (!this._rdfDataSource.hasArcOut(resource, email)) { 724 724 // no data available --> give up. 725 Log.debug(" ## rdfDatasource:readVIdentityFromRDF no data found.\n");725 Log.debug("readVIdentityFromRDF no data found.\n"); 726 726 return null; 727 727 } 728 Log.debug(" ## rdfDatasource:readVIdentityFromRDF found stored data.\n");728 Log.debug("readVIdentityFromRDF found stored data.\n"); 729 729 730 730 return this._readVIdentityFromRDF(resource); … … 738 738 if (!smtp) smtp = vI.NO_SMTP_TAG; 739 739 740 Log.debug(" ## rdfDatasource:email='" + email +740 Log.debug("email='" + email + 741 741 "' fullName='" + fullName + "' id='" + id + "' smtp='" + smtp + "'\n"); 742 742 743 743 var extras = (typeof(vI.storageExtras)=='function')?new vI.storageExtras(this, resource):null; 744 744 var extras_status = (typeof(vI.storageExtras)=='function')?extras.status():" not used"; 745 Log.debug(" ## rdfDatasource:extras:" + extras_status + "\n");745 Log.debug("extras:" + extras_status + "\n"); 746 746 747 747 var localIdentityData = new vI.identityData(email, fullName, id, smtp, extras) … … 750 750 751 751 _getRDFValue : function (resource, field) { 752 // Log.debug(" ## rdfDatasource_getRDFValue " + this._rdfService + " " + this._rdfDataSource + " " + this + "\n");752 // Log.debug("_getRDFValue " + this._rdfService + " " + this._rdfDataSource + " " + this + "\n"); 753 753 var predicate = this._rdfService.GetResource(this._rdfNS + "rdf#" + field); 754 754 var target = this._rdfDataSource.GetTarget(resource, predicate, true); … … 775 775 776 776 updateRDF : function (recDescription, recType, localIdentityData, storeBaseID, storeSMTP, prevRecDescription, prevRecType) { 777 // Log.debug(" ## rdfDatasource(" + this._rdfNS + "): updateRDF recDescription=" + recDescription + " localIdentityData.email=" + localIdentityData.email + ".\n");777 // Log.debug("(" + this._rdfNS + "): updateRDF recDescription=" + recDescription + " localIdentityData.email=" + localIdentityData.email + ".\n"); 778 778 779 779 // if (!localIdentityData.email) { 780 // Log.debug(" ## rdfDatasource:updateRDF: no Sender-email for Recipient, aborting.\n");780 // Log.debug("updateRDF: no Sender-email for Recipient, aborting.\n"); 781 781 // return; 782 782 // } … … 788 788 var resource = this._getRDFResourceForVIdentity(prevRecDescription, prevRecType); 789 789 if (!resource) return; 790 // Log.debug(" ## rdfDatasource:updateRDF " + resource.ValueUTF8 + ".\n");790 // Log.debug("updateRDF " + resource.ValueUTF8 + ".\n"); 791 791 792 792 var position = this.getContainer(recType).IndexOf(resource); // check for index in new recType … … 807 807 if (localIdentityData.extras) localIdentityData.extras.loopForRDF(this, resource, "set"); 808 808 809 Log.debug(" ## rdfDatasource:updateRDF add " + resource.ValueUTF8 + " at position " + position + ".\n");809 Log.debug("updateRDF add " + resource.ValueUTF8 + " at position " + position + ".\n"); 810 810 if (position != -1) this.getContainer(recType).InsertElementAt(resource, position, true); 811 811 else this.getContainer(recType).AppendElement(resource); … … 813 813 814 814 _setRDFValue : function (resource, field, value) { 815 // Log.debug(" ## rdfDatasource:_setRDFValue " + resource.ValueUTF8 + " " + field + " " + value + ".\n");815 // Log.debug("_setRDFValue " + resource.ValueUTF8 + " " + field + " " + value + ".\n"); 816 816 if (!value) return value; // return if some value was not set. 817 // Log.debug(" ## rdfDatasource_setRDFValue " + this._rdfService + " " + this._rdfDataSource + "\n");817 // Log.debug("_setRDFValue " + this._rdfService + " " + this._rdfDataSource + "\n"); 818 818 var predicate = this._rdfService.GetResource(this._rdfNS + "rdf#" + field); 819 819 var name = this._rdfService.GetLiteral(value); … … 831 831 observe : function(subject, topic, data) { 832 832 if (topic == "am-smtpChanges" || topic == "am-acceptChanges") { 833 Log.debug(" ## rdfDatasource:account/smtp changes observed\n");833 Log.debug("account/smtp changes observed\n"); 834 834 this.searchIdentityMismatch(); 835 835 this.searchSmtpMismatch(); … … 838 838 }, 839 839 register : function() { 840 Log.debug(" ## rdfDatasource:register AccountManagerObserver\n");840 Log.debug("register AccountManagerObserver\n"); 841 841 var obsService = Components.classes["@mozilla.org/observer-service;1"]. 842 842 getService(Components.interfaces.nsIObserverService) … … 876 876 var localIdentities = new vI.identityCollection(); 877 877 localIdentities.addWithoutDuplicates(this._rdfDataSource.readVIdentityFromRDF(recipientName, recipientType)); 878 if (localIdentities.number == 1) Log.debug(" ## rdfDatasourceAccess:using data from direct match\n");878 if (localIdentities.number == 1) Log.debug("using data from direct match\n"); 879 879 localIdentities.addWithoutDuplicates(this._rdfDataSource.findMatchingFilter(recipientName, recipientType)); 880 880 881 881 var returnValue = {}; returnValue.identityCollection = localIdentities; returnValue.result = "drop"; 882 882 if (localIdentities.number == 0) { 883 Log.debug(" ## rdfDatasourceAccess:updateVIdentityFromStorage no usable Storage-Data found.\n");883 Log.debug("updateVIdentityFromStorage no usable Storage-Data found.\n"); 884 884 } 885 885 else { 886 Log.debug(" ## rdfDatasourceAccess:compare with current Identity\n");886 Log.debug("compare with current Identity\n"); 887 887 if (this._pref.getBoolPref("storage_getOneOnly") && // if requested to retrieve only storageID for first recipient entered 888 888 isNotFirstInputElement && // and it is now not the first recipient entered … … 893 893 // only update fields if new Identity is different than old one. 894 894 else { 895 Log.debug(" ## rdfDatasourceAccess:updateVIdentityFromStorage check if storage-data matches current Identity.\n");895 Log.debug("updateVIdentityFromStorage check if storage-data matches current Identity.\n"); 896 896 var compResult = localIdentities.identityDataCollection[0].equalsIdentity(currentIdentity, true); 897 897 if (!compResult.equal) { … … 914 914 var multipleRecipients = (recipients.length > 1); 915 915 var dontUpdateMultipleNoEqual = (this._pref.getBoolPref("storage_dont_update_multiple") && multipleRecipients) 916 Log.debug(" ## rdfDatasource:storeVIdentityToAllRecipients dontUpdateMultipleNoEqual='" + dontUpdateMultipleNoEqual + "'\n")916 Log.debug("storeVIdentityToAllRecipients dontUpdateMultipleNoEqual='" + dontUpdateMultipleNoEqual + "'\n") 917 917 918 918 for (var j = 0; j < recipients.length; j++) { … … 925 925 getVIdentityFromAllRecipients : function(allIdentities, recipients) { 926 926 if (!this._pref.getBoolPref("storage")) 927 { Log.debug(" ## storage:Storage deactivated\n"); return; }927 { Log.debug("Storage deactivated\n"); return; } 928 928 var initnumber = allIdentities.number; 929 929 for (var j = 0; j < recipients.length; j++) { … … 931 931 allIdentities.addWithoutDuplicates(this._rdfDataSource.findMatchingFilter(recipients[j].recipient, recipients[j].recipientType)); 932 932 } 933 Log.debug(" ## storage:found " + (allIdentities.number-initnumber) + " address(es)\n")933 Log.debug("found " + (allIdentities.number-initnumber) + " address(es)\n") 934 934 }, 935 935 936 936 __updateStorageFromVIdentity : function(identityData, recipient, recipientType, dontUpdateMultipleNoEqual) { 937 Log.debug(" ## rdfDatasource:__updateStorageFromVIdentity.\n")937 Log.debug("__updateStorageFromVIdentity.\n") 938 938 var storageDataByType = this._rdfDataSource.readVIdentityFromRDF(recipient, recipientType); 939 939 var storageDataByFilter = this._rdfDataSource.findMatchingFilter(recipient, recipientType); … … 948 948 if ( (!storageDataByType && !storageDataByFilterEqual) || 949 949 (!storageDataByTypeEqual && !storageDataByFilterEqual && !dontUpdateMultipleNoEqual) ) { 950 Log.debug(" ## storage:__updateStorageFromVIdentity updating\n")950 Log.debug("__updateStorageFromVIdentity updating\n") 951 951 if (storageDataByType && !storageDataByTypeEqual && this._pref.getBoolPref("storage_warn_update")) { 952 Log.debug(" ## storage:__updateStorageFromVIdentity overwrite warning\n");952 Log.debug("__updateStorageFromVIdentity overwrite warning\n"); 953 953 doUpdate = this.__askWarning(this.__getWarning("updateStorage", recipient, storageDataByTypeCompResult.compareMatrix)); 954 954 } … … 1036 1036 values.id = values.id?values.id:"import_" + id 1037 1037 relevantIDs[id] = values; 1038 Log.debug(" ## rdfDatasourceImporterimport: translate relevant ID from previous '" + id + "' to current '" + relevantIDs[id].id + "'\n");1038 Log.debug("import: translate relevant ID from previous '" + id + "' to current '" + relevantIDs[id].id + "'\n"); 1039 1039 } 1040 1040 return relevantIDs; … … 1068 1068 values.smtp = values.smtp?values.smtp:"import_" + smtp; 1069 1069 relevantSMTPs[smtp] = values; 1070 Log.debug(" ## rdfDatasourceImporterimport: translate relevant SMTP from previous '" + smtp + "' to current '" + relevantSMTPs[smtp].smtp + "'\n");1070 Log.debug("import: translate relevant SMTP from previous '" + smtp + "' to current '" + relevantSMTPs[smtp].smtp + "'\n"); 1071 1071 } 1072 1072 return relevantSMTPs; … … 1098 1098 1099 1099 if (filePicker.show() == Components.interfaces.nsIFilePicker.returnOK) { 1100 Log.debug("\n ## rdfDatasourceImporter IMPORT\n## rdfDatasourceImporterimport: preparation:\n");1100 Log.debug("\nIMPORT\nimport: preparation:\n"); 1101 1101 1102 1102 var importRdfDataFile = Components.classes["@mozilla.org/file/local;1"] … … 1108 1108 filePicker.file.copyTo(importRdfDataFile.parent,importRdfDataFile.leafName); 1109 1109 1110 Log.debug(" ## rdfDatasourceImporterimport: copied file from " + filePicker.file.path + " to " + importRdfDataFile.path + "'\n");1110 Log.debug("import: copied file from " + filePicker.file.path + " to " + importRdfDataFile.path + "'\n"); 1111 1111 1112 1112 // init Datasources … … 1117 1117 var relevantSMTPs = this._translateRelevantSMTPs(); 1118 1118 1119 Log.debug(" ## rdfDatasourceImporterimport: preparation done.\n");1120 Log.debug(" ## rdfDatasourceImporterimport: starting import:\n");1119 Log.debug("import: preparation done.\n"); 1120 Log.debug("import: starting import:\n"); 1121 1121 1122 1122 for each (treeType in Array("email", "maillist", "newsgroup", "filter")) { … … 1125 1125 var container = this._rdfImportDataSource.getContainer(treeType) 1126 1126 if (container.GetCount() == 0) continue; 1127 Log.debug(" ## rdfDatasourceImporterimporting " + treeType + ": " + container.GetCount()+ " datasets from " + this._rdfImportDataSource._rdfDataSource.URI + "\n");1127 Log.debug("importing " + treeType + ": " + container.GetCount()+ " datasets from " + this._rdfImportDataSource._rdfDataSource.URI + "\n"); 1128 1128 var enumerator = container.GetElements(); 1129 1129 // re-initialize dataSource to point rdfService to the right Resources … … 1133 1133 var resource = enumerator.getNext(); count += 1; 1134 1134 resource.QueryInterface(Components.interfaces.nsIRDFResource); 1135 Log.debug(" ##" + count + " ");1135 Log.debug(" " + count + " "); 1136 1136 var name = this._rdfImportDataSource._getRDFValue(resource, "name") 1137 1137 var email = this._rdfImportDataSource._getRDFValue(resource, "email") … … 1151 1151 } 1152 1152 1153 Log.debug(" ## rdfDatasourceImporterimport: removing temporary file " + importRdfDataFile.path + ".\n");1153 Log.debug("import: removing temporary file " + importRdfDataFile.path + ".\n"); 1154 1154 this._rdfImportDataSource = null; importRdfDataFile.remove(false); 1155 Log.debug(" ## rdfDatasourceImporterimport: import done.\n");1156 1157 Log.debug(" ## rdfDatasourceImporterimport: cleaning ID/SMTP storages:\n");1155 Log.debug("import: import done.\n"); 1156 1157 Log.debug("import: cleaning ID/SMTP storages:\n"); 1158 1158 this._rdfDataSource = new rdfDatasource(this._rdfFileName, true); 1159 1159 … … 1166 1166 this._rdfDataSource.clean(); 1167 1167 this._rdfDataSource = null; 1168 Log.debug(" ## rdfDatasourceImporterimport: cleaning ID/SMTP storages done.\n");1169 Log.debug(" ## rdfDatasourceImporterIMPORT DONE.\n");1168 Log.debug("import: cleaning ID/SMTP storages done.\n"); 1169 Log.debug("IMPORT DONE.\n"); 1170 1170 } 1171 1171 } -
content/modules/vI_smartIdentityCollection.js
rf17e5d3 rbf505e 31 31 32 32 function smartIdentityCollection(msgHdr, preseletedID, currentIDisVID, newsgroup, recipients) { 33 dump(" ## smartIdentityCollection:constructor\n");33 dump("constructor\n"); 34 34 this._IDisVID = currentIDisVID; 35 35 this._preselectedID = preseletedID; … … 40 40 this._rdfDatasourceAccess = new vI.rdfDatasourceAccess(); 41 41 this._allIdentities = new vI.identityCollection(); 42 dump(" ## smartIdentityCollection:constructor done \n");42 dump("constructor done \n"); 43 43 }; 44 44 … … 65 65 // this function adds a timestamp to the current sender 66 66 __autoTimestamp : function() { 67 Log.debug(" ## smartIdentity:__autoTimestamp()\n");67 Log.debug("__autoTimestamp()\n"); 68 68 if (this._IDisVID) { 69 Log.debug(" ## smartIdentity:Virtual Identity in use, aborting\n");69 Log.debug("Virtual Identity in use, aborting\n"); 70 70 return; 71 71 } … … 75 75 var domain = current_email[1]; 76 76 77 Log.debug(" ## smartIdentity:current email: " + current_email[0] + "@" + current_email[1] + "\n");77 Log.debug("current email: " + current_email[0] + "@" + current_email[1] + "\n"); 78 78 79 79 var autoString = this._pref.getCharPref("autoString"); … … 87 87 88 88 var new_email = autoString.replace(/%l/g, localpart).replace(/%d/g, domain).replace(/%t/g,dateString); 89 Log.debug(" ## smartIdentity:new email: " + new_email + "\n");89 Log.debug("new email: " + new_email + "\n"); 90 90 91 91 var newIdentity = new vI.identityData(new_email, … … 97 97 98 98 __ignoreID : function() { 99 Log.debug(" ## smartIdentity:checking " + this._pref.getCharPref("idSelection_ignoreIDs") + " against " + this._preselectedID.key + "\n")99 Log.debug("checking " + this._pref.getCharPref("idSelection_ignoreIDs") + " against " + this._preselectedID.key + "\n") 100 100 // check if usage if virtual Identities should be used at all for the currently selected ID 101 101 if (this._pref.getCharPref("idSelection_ignoreIDs").indexOf(":" + this._preselectedID.key + ":") != -1) { 102 Log.debug(" ## smartIdentity:not using virtual Identites for ID " + this._preselectedID.key + "\n");102 Log.debug("not using virtual Identites for ID " + this._preselectedID.key + "\n"); 103 103 return true; 104 104 } … … 107 107 108 108 NewMail : function() { 109 Log.debug(" ## smartIdentity:NewMail()\n");109 Log.debug("NewMail()\n"); 110 110 if (this.__ignoreID()) return; 111 111 this._rdfDatasourceAccess.getVIdentityFromAllRecipients(this._allIdentities, this._recipients); … … 121 121 // reorder list of Identities to prefer it on autoselect 122 122 // has to be done before Identities are added to the Menu 123 Log.debug(" ## smartIdentity:found existing Identity, reorder to prefer this one.\n");123 Log.debug("found existing Identity, reorder to prefer this one.\n"); 124 124 var firstIdentity = this._allIdentities.identityDataCollection[index]; 125 125 for (var i = index; index > 0; index--) { … … 134 134 135 135 ReplyOnSent : function() { 136 Log.debug(" ## smartIdentity:ReplyOnSent() (rules like SmartDraft)\n");136 Log.debug("ReplyOnSent() (rules like SmartDraft)\n"); 137 137 this.__SmartDraftOrReplyOnSent(); 138 138 this._rdfDatasourceAccess.getVIdentityFromAllRecipients(this._allIdentities, this._recipients); … … 140 140 141 141 Draft : function() { 142 Log.debug(" ## smartIdentity:Draft()\n");142 Log.debug("Draft()\n"); 143 143 144 144 this.__SmartDraftOrReplyOnSent(); … … 159 159 __SmartDraftOrReplyOnSent : function() { 160 160 if (!this._pref.getBoolPref("smart_draft")) 161 { Log.debug(" ## smartIdentity:SmartDraft deactivated\n"); return; }162 163 Log.debug(" ## smartIdentity:__SmartDraftOrReplyOnSent()\n");161 { Log.debug("SmartDraft deactivated\n"); return; } 162 163 Log.debug("__SmartDraftOrReplyOnSent()\n"); 164 164 165 165 if (this._msgHdr) { 166 166 this.__parseHeadersWithArray(this._msgHdr.author, this._allIdentities) 167 Log.debug(" ## smartIdentity:sender '" + this._allIdentities.identityDataCollection[0].combinedName + "'\n");168 } 169 else Log.debug(" ## smartIdentity:__SmartDraftOrReplyOnSent: No Header found, shouldn't happen\n");167 Log.debug("sender '" + this._allIdentities.identityDataCollection[0].combinedName + "'\n"); 168 } 169 else Log.debug("__SmartDraftOrReplyOnSent: No Header found, shouldn't happen\n"); 170 170 }, 171 171 … … 181 181 var recentfilterType; var skipRegExp = false; 182 182 if (filterList.length <= 1 && filterList[0] == "") 183 { Log.debug(" ## smartIdentity:no filters configured\n"); recentfilterType = filterType.None; }183 { Log.debug("no filters configured\n"); recentfilterType = filterType.None; } 184 184 else if (/^[+-]?\/(.*)\/$/.exec(filterList[i])) 185 { Log.debug(" ## smartIdentity:filter emails with RegExp '"185 { Log.debug("filter emails with RegExp '" 186 186 + filterList[i].replace(/\\/g,"\\\\") + "'\n"); recentfilterType = filterType.RegExp; } 187 else { Log.debug(" ## smartIdentity:filter emails, compare with '"187 else { Log.debug("filter emails, compare with '" 188 188 + filterList[i] + "'\n"); recentfilterType = filterType.StrCmp; } 189 189 for (var j = 0; j < this._allIdentities.number; j++) { // check if recent email-address (pre-choosen identity) is found in … … 240 240 // if mailing-list ignore to-header (usually the mailing list address) 241 241 if (replyHeaderNameToRead == "to" && this._msgHdr.getStringProperty("vI_list-id")) { 242 Log.debug(" ## smartIdentity:header 'list-id' found (mailinglist), skipping header 'to'\n");242 Log.debug("header 'list-id' found (mailinglist), skipping header 'to'\n"); 243 243 continue; 244 244 } … … 250 250 .getMostRecentWindow("mail:3pane"); 251 251 252 Log.debug(" ## smartIdentity:found stored header '" +252 Log.debug("found stored header '" + 253 253 replyHeaderNameToRead + "': '" + window3pane.virtualIdentityExtension.storedHeaders["vI_" + replyHeaderNameToRead] + "'\n");*/ 254 254 255 Log.debug(" ## smartIdentity:reading header '" +255 Log.debug("reading header '" + 256 256 replyHeaderNameToRead + "': '" + value + "'\n"); 257 257 … … 264 264 // if there is no email than it makes no sense to use it as a sender 265 265 if (!splitted.identityDataCollection[i].email.match(/^.*@.*$/)) { 266 Log.debug(" ## smartIdentity:skipping '" +266 Log.debug(" skipping '" + 267 267 splitted.identityDataCollection[i].email + "', no email\n") 268 268 continue; … … 273 273 this._allIdentities.addWithoutDuplicates(splitted.identityDataCollection[i]); 274 274 275 Log.debug(" ## smartIdentity:found '" +275 Log.debug(" found '" + 276 276 splitted.identityDataCollection[i].combinedName + "'\n") 277 277 } … … 280 280 281 281 Reply : function() { 282 Log.debug(" ## smartIdentity:Reply()\n");282 Log.debug("Reply()\n"); 283 283 284 284 if (this._msgHdr && this._newsgroup && !this._msgHdr.getStringProperty("vI_content_base")) { … … 294 294 if (this._pref.getBoolPref("smart_detectByReceivedHeader")) { 295 295 if (!this._msgHdr.getStringProperty("vI_received")) { // mail was not received 296 Log.debug(" ## smartIdentity:reply on non-received (sent?) mail. Using SmartDraft. \n");296 Log.debug("reply on non-received (sent?) mail. Using SmartDraft. \n"); 297 297 this.ReplyOnSent(); 298 298 return; … … 305 305 306 306 if (this._msgHdr && (this._msgHdr.folder.flags & MSG_FOLDER_FLAG_SENTMAIL)) { 307 Log.debug(" ## smartIdentity:reply from Sent folder.");307 Log.debug("reply from Sent folder."); 308 308 if (this._msgHdr.folder.flags & MSG_FOLDER_FLAG_INBOX) 309 309 Log.debug(" Folder is INBOX, assuming Reply-Case. \n"); … … 324 324 if (storageIdentities.number == 0 || !this._pref.getBoolPref("idSelection_storage_ignore_smart_reply")) 325 325 this.__SmartReply(); 326 else Log.debug(" ## smartIdentity:SmartReply skipped, Identities in Storage found.\n");326 else Log.debug("SmartReply skipped, Identities in Storage found.\n"); 327 327 328 328 // merge SmartReply-Identities and Storage-Identites … … 335 335 } 336 336 337 Log.debug(" ## smartIdentity:merged SmartReply & Storage, " + this._allIdentities.number + " address(es) left\n")337 Log.debug("merged SmartReply & Storage, " + this._allIdentities.number + " address(es) left\n") 338 338 }, 339 339 … … 341 341 __SmartReply : function() { 342 342 if (!this._pref.getBoolPref("smart_reply")) 343 { Log.debug(" ## smartIdentity:SmartReply deactivated\n"); return; }343 { Log.debug("SmartReply deactivated\n"); return; } 344 344 if (this._newsgroup && !this._pref.getBoolPref("smart_reply_for_newsgroups")) { 345 Log.debug(" ## smartIdentity:SmartReply, answering to a newsgroup, aborting\n");345 Log.debug("SmartReply, answering to a newsgroup, aborting\n"); 346 346 return; 347 347 } 348 348 349 Log.debug(" ## smartIdentity:__SmartReply()\n");350 Log.debug(" ## smartIdentity:----------------------------------------------------------\n")349 Log.debug("__SmartReply()\n"); 350 Log.debug("----------------------------------------------------------\n") 351 351 if (this._msgHdr) { 352 352 /* first step: collect addresses */ 353 353 this.__smartReplyCollectAddresses(); 354 Log.debug(" ## smartIdentity:" + this._allIdentities.number + " address(es) after parsing, before filtering\n")354 Log.debug("" + this._allIdentities.number + " address(es) after parsing, before filtering\n") 355 355 356 356 /* second step: filter (and sort) addresses */ 357 357 this.__filterAddresses(); 358 358 359 Log.debug(" ## smartIdentity:filtering done, " + this._allIdentities.number + " address(es) left\n")359 Log.debug("filtering done, " + this._allIdentities.number + " address(es) left\n") 360 360 361 361 /* set default FullName */ … … 365 365 if (this._allIdentities.identityDataCollection[index].fullName == "") { 366 366 this._allIdentities.identityDataCollection[index].fullName = smart_reply_defaultFullName 367 Log.debug(" ## smartIdentity:added default FullName '" +367 Log.debug("added default FullName '" + 368 368 smart_reply_defaultFullName + "' to '" + this._allIdentities.identityDataCollection[index].email + "'\n") 369 369 } … … 375 375 /* will not be added to the menu but probably choosen with __smartIdentitySelection */ 376 376 if (this._pref.getBoolPref("smart_reply_ignoreFullName")) { 377 Log.debug(" ## smartIdentity:compare with existing Identities (ignoring FullNames).\n")377 Log.debug("compare with existing Identities (ignoring FullNames).\n") 378 378 379 379 for (var index = 0; index < this._allIdentities.number; index++) { … … 382 382 var newFullName = gAccountManager.getIdentity(idKey).fullName; 383 383 this._allIdentities.identityDataCollection[index].fullName = newFullName; 384 Log.debug(" ## smartIdentity:replaced Fullname of '" + this._allIdentities.identityDataCollection[index].email + "' with '" + newFullName + "' \n");384 Log.debug("replaced Fullname of '" + this._allIdentities.identityDataCollection[index].email + "' with '" + newFullName + "' \n"); 385 385 } 386 386 } 387 387 } 388 388 } 389 else Log.debug(" ## smartIdentity:SmartReply skipped. No Header-information found.\n");390 391 Log.debug(" ## smartIdentity:----------------------------------------------------------\n")389 else Log.debug("SmartReply skipped. No Header-information found.\n"); 390 391 Log.debug("----------------------------------------------------------\n") 392 392 }, 393 393 -
content/prefDialog/vI_prefDialog.xml
rf17e5d3 rbf505e 34 34 <![CDATA[ 35 35 with (virtualIdentityExtension.LIB) { 36 MyLog.debug(" ##identitySelector: constructor\n");36 MyLog.debug("prefDialog.xml identitySelector: constructor\n"); 37 37 var AccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"] 38 38 .getService(Components.interfaces.nsIMsgAccountManager); … … 62 62 <setter><![CDATA[ 63 63 with (virtualIdentityExtension.LIB) { 64 MyLog.debug(" ##identitySelector: setting value to '" + val + "'\n");64 MyLog.debug("prefDialog.xml identitySelector: setting value to '" + val + "'\n"); 65 65 var listItems = this.childNodes; 66 66 for (var index = 0; index < listItems.length; index++) { 67 67 var key = listItems[index].getAttribute("value"); 68 68 listItems[index].checked = (val.indexOf(":" + key + ":") == -1); 69 MyLog.debug(" ##identitySelector: setting value, '" + listItems[index].getAttribute("value") + "' '" + listItems[index].checked + "' '" + listItems[index].getAttribute("checked") + "'\n")69 MyLog.debug("prefDialog.xml identitySelector: setting value, '" + listItems[index].getAttribute("value") + "' '" + listItems[index].checked + "' '" + listItems[index].getAttribute("checked") + "'\n") 70 70 } 71 71 this._value = val; … … 74 74 <getter><![CDATA[ 75 75 with (virtualIdentityExtension.LIB) { 76 MyLog.debug(" ##identitySelector: getting value\n");76 MyLog.debug("prefDialog.xml identitySelector: getting value\n"); 77 77 var returnVal = ""; 78 78 var listItems = this.childNodes; 79 79 for (var index = 0; index < listItems.length; index++) { 80 MyLog.debug(" ##identitySelector: getting value, '" + listItems[index].getAttribute("value") + "' '" + listItems[index].checked + "' '" + listItems[index].getAttribute("checked") + "'\n");80 MyLog.debug("prefDialog.xml identitySelector: getting value, '" + listItems[index].getAttribute("value") + "' '" + listItems[index].checked + "' '" + listItems[index].getAttribute("checked") + "'\n"); 81 81 if (!listItems[index].checked) returnVal += " :" + listItems[index].getAttribute("value") + ": " 82 82 } 83 MyLog.debug(" ##identitySelector: getting value, result '" + returnVal + "'\n");83 MyLog.debug("prefDialog.xml identitySelector: getting value, result '" + returnVal + "'\n"); 84 84 return returnVal; 85 85 } -
content/vI_getHeader.js
rf17e5d3 rbf505e 76 76 if (aHeaders.has("list-id")) { 77 77 getHeader.hdr.setStringProperty("vI_list-id","found"); 78 Log.debug(" ## getHeader:found header: list-id ...stored to recognize mailing-list\n");78 Log.debug("found header: list-id ...stored to recognize mailing-list\n"); 79 79 } 80 80 if (aHeaders.has("received")) { 81 81 getHeader.hdr.setStringProperty("vI_received","found"); 82 Log.debug(" ## getHeader:found header: received ...stored to recognize received mail\n");82 Log.debug("found header: received ...stored to recognize received mail\n"); 83 83 } 84 84 if (aHeaders.has("content-base")) { 85 85 getHeader.hdr.setStringProperty("vI_content_base","found"); 86 Log.debug(" ## getHeader:found header: content-base ...stored to recognize blog/news-feed\n");86 Log.debug("found header: content-base ...stored to recognize blog/news-feed\n"); 87 87 } 88 88 for (let index = 0; index < getHeader.headerToSearch.length; index++) { … … 103 103 let storedConvValue = getHeader.unicodeConverter.ConvertToUnicode(storedValue); 104 104 105 Log.debug(" ## getHeader:found header: " + headerNameToStore +105 Log.debug("found header: " + headerNameToStore + 106 106 " - stored as '" + storedConvValue + "'\n"); 107 107 label += (label)?"\n":"" … … 164 164 getHeader.headerToSearch = null; 165 165 166 Log.debug(" ## prefObserver:reload Message\n");166 Log.debug("reload Message\n"); 167 167 MsgReload(); 168 168 } -
content/vI_msgIdentityCloneTools.js
rf17e5d3 rbf505e 33 33 34 34 copySelectedIdentity : function(id_key) { 35 Log.debug(" ## msgIdentityCloneTools:copySelectedIdentity\n");35 Log.debug("copySelectedIdentity\n"); 36 36 var msgIdentityElem = document.getElementById("msgIdentity"); 37 37 var msgIdentityPopupElem = document.getElementById("msgIdentityPopup"); … … 52 52 try { setSecuritySettings(1); enigSetMenuSettings(''); } catch(vErr) { }; 53 53 if (!existingIdentity) { 54 Log.debug(" ## msgIdentityCloneTools:signatureSwitch hide/remove signatures\n");54 Log.debug("signatureSwitch hide/remove signatures\n"); 55 55 // code to hide the text signature 56 56 try { if (msgIdentityCloneTools._pref.getBoolPref("hide_signature") && ss_signature.length == 0) { 57 Log.debug(" ## msgIdentityCloneTools:hide text/html signature");57 Log.debug("hide text/html signature"); 58 58 ss_main.signatureSwitch() 59 59 Log.debug("\n"); … … 63 63 var element = document.getElementById("menu_securitySign1"); 64 64 if (element.getAttribute("checked") == "true") { 65 Log.debug(" ##signatureSwitch hide_sMime_messageSignature with doCommand\n");65 Log.debug("signatureSwitch hide_sMime_messageSignature with doCommand\n"); 66 66 element.doCommand(); 67 67 } … … 82 82 } 83 83 if (skipChangeGPGsign) 84 Log.debug(" ##signatureSwitch skip hide_openPGP_messageSignature - EnigMail AlertWindow open\n");84 Log.debug("signatureSwitch skip hide_openPGP_messageSignature - EnigMail AlertWindow open\n"); 85 85 else { 86 Log.debug(" ##signatureSwitch hide_openPGP_messageSignature with doCommand\n");86 Log.debug("signatureSwitch hide_openPGP_messageSignature with doCommand\n"); 87 87 element.doCommand(); 88 88 } … … 93 93 } 94 94 else { 95 Log.debug(" ## msgIdentityCloneTools:signatureSwitch restore signature\n");95 Log.debug("signatureSwitch restore signature\n"); 96 96 // code to show the text signature 97 97 try { if (ss_signature.length > 0) { 98 Log.debug(" ## msgIdentityCloneTools:show text/html signature");98 Log.debug("show text/html signature"); 99 99 ss_main.signatureSwitch() 100 100 Log.debug("\n"); … … 117 117 var awType = awGetPopupElement(row).selectedItem.getAttribute("value"); 118 118 if (awType == "addr_reply") { 119 Log.debug(" ## msgIdentityCloneTools:removed ReplyTo found in row " + row + "\n");119 Log.debug("removed ReplyTo found in row " + row + "\n"); 120 120 awDeleteRow(row--); // removed one line therefore decrease row-value 121 121 } … … 127 127 if (!document.getElementById("autoReplyToSelfLabel").hasAttribute("hidden")) { 128 128 awAddRecipient("addr_reply",document.getElementById("msgIdentity_clone").label); 129 Log.debug(" ## msgIdentityCloneTools:added ReplyToSelf");129 Log.debug("added ReplyToSelf"); 130 130 document.getElementById("autoReplyToSelfLabel").setAttribute("hidden","true"); 131 131 } -
content/vI_rdfDataTree.js
rf17e5d3 rbf505e 61 61 //this function is called every time the tree is sorted, filtered, or reloaded 62 62 loadTable : function() { 63 // Log.debug(" ## rdfDataTree:loadTable.\n");63 // Log.debug("loadTable.\n"); 64 64 //remember scroll position. this is useful if this is an editable table 65 65 //to prevent the user from losing the row they edited … … 97 97 // set Tab label 98 98 this.tabElem.setAttribute("label", this.treeType + " (" + this.idTable.length + ")"); 99 // Log.debug(" ## rdfDataTree:loadTable done.\n");99 // Log.debug("loadTable done.\n"); 100 100 }, 101 101 … … 110 110 resource : resource, 111 111 identityData : localIdentityData} 112 // Log.debug(" ##addNewDatum.\n");112 // Log.debug("addNewDatum.\n"); 113 113 localIdentityData.extras.addPrefs(pref); 114 114 idData.push(pref); 115 115 }, 116 116 sort : function(columnName) { 117 // Log.debug(" ##sort: " + columnName + ".\n");117 // Log.debug("sort: " + columnName + ".\n"); 118 118 var order = this.treeElem.getAttribute("sortDirection") == "ascending" ? 1 : -1; 119 119 //if the column is passed and it's already sorted by that column, reverse sort -
content/vI_smartIdentity.js
rf17e5d3 rbf505e 44 44 var newsgroup = gMsgCompose.compFields.newsgroups; 45 45 var autocreate = false; 46 Log.debug(" ## smartIdentity:msgComposeTypeReference = " + gMsgCompose.type + "\n");46 Log.debug("msgComposeTypeReference = " + gMsgCompose.type + "\n"); 47 47 switch (gMsgCompose.type) { 48 48 case msgComposeTypeReference.Reply: … … 53 53 case msgComposeTypeReference.ReplyWithTemplate: 54 54 case msgComposeTypeReference.ReplyToList: 55 Log.debug(" ## smartIdentity:Reply\n");55 Log.debug("Reply\n"); 56 56 msgHdr = smartIdentity.messenger. 57 57 messageServiceFromURI(gMsgCompose.originalMsgURI).messageURIToMsgHdr(gMsgCompose.originalMsgURI); … … 61 61 case msgComposeTypeReference.Draft: 62 62 case msgComposeTypeReference.Template: 63 Log.debug(" ## smartIdentity:Draft\n");63 Log.debug("Draft\n"); 64 64 msgHdr = smartIdentity.messenger. 65 65 messageServiceFromURI(gMsgCompose.compFields.draftId).messageURIToMsgHdr(gMsgCompose.compFields.draftId); … … 72 72 case msgComposeTypeReference.NewsPost: 73 73 case msgComposeTypeReference.MailToUrl: 74 Log.debug(" ## smartIdentity:New Mail\n");74 Log.debug("New Mail\n"); 75 75 smartIdentity._smartIdentityCollection = new vI.smartIdentityCollection(null, getCurrentIdentity(), document.getElementById("msgIdentity_clone").vid, newsgroup, this._getRecipients()); 76 76 // to enable composing new email with new identity: identity is hidden in subject line … … 78 78 var subject = gMsgCompose.compFields.subject.split(/\n/); 79 79 if (subject.length > 1 && subject[1] == "virtualIdentityExtension") { 80 Log.debug(" ## smartIdentity:NewMail() found stored identity preset: " + subject[2] + "\n");80 Log.debug("NewMail() found stored identity preset: " + subject[2] + "\n"); 81 81 smartIdentity._smartIdentityCollection.__parseHeadersWithArray(subject[2], smartIdentity._smartIdentityCollection._allIdentities); 82 82 gMsgCompose.compFields.subject = subject[0]; … … 101 101 102 102 __smartIdentitySelection : function(autocreate) { 103 Log.debug(" ##__smartIdentitySelection autocreate=" + autocreate + "\n");103 Log.debug("__smartIdentitySelection autocreate=" + autocreate + "\n"); 104 104 105 105 if (smartIdentity._pref.getBoolPref("idSelection_preferExisting")) { 106 106 var existingIDIndex = smartIdentity._smartIdentityCollection._foundExistingIdentity(); 107 107 if (existingIDIndex) { 108 Log.debug(" ## smartIdentity:found existing Identity, use without interaction.\n");108 Log.debug("found existing Identity, use without interaction.\n"); 109 109 // add all Indentities to Clone Menu before selecting and leaving the function 110 110 document.getElementById("msgIdentity_clone").addIdentitiesToCloneMenu(smartIdentity._smartIdentityCollection._allIdentities); … … 115 115 116 116 document.getElementById("msgIdentity_clone").addIdentitiesToCloneMenu(smartIdentity._smartIdentityCollection._allIdentities); 117 Log.debug(" ##__smartIdentitySelection smartIdentity._smartIdentityCollection._allIdentities.number=" +117 Log.debug("__smartIdentitySelection smartIdentity._smartIdentityCollection._allIdentities.number=" + 118 118 smartIdentity._smartIdentityCollection._allIdentities.number + 119 119 " smartIdentity._pref.getBoolPref('idSelection_ask_always')=" + … … 125 125 || smartIdentity._smartIdentityCollection._allIdentities.number > 1)) { 126 126 for (var index = 0; index < smartIdentity._smartIdentityCollection._allIdentities.number; index++) { 127 Log.debug(" ##smartIdentityReplyDialog index=" + index + ": '" + smartIdentity._smartIdentityCollection._allIdentities.identityDataCollection[index].combinedName + "' "127 Log.debug("smartIdentityReplyDialog index=" + index + ": '" + smartIdentity._smartIdentityCollection._allIdentities.identityDataCollection[index].combinedName + "' " 128 128 + "(" + smartIdentity._smartIdentityCollection._allIdentities.identityDataCollection[index].id.value + "," + smartIdentity._smartIdentityCollection._allIdentities.identityDataCollection[index].smtp.value + ")\n"); 129 129 } … … 139 139 140 140 changeIdentityToSmartIdentity : function(allIdentities, selectedValue) { 141 Log.debug(" ##changeIdentityToSmartIdentity selectedValue=" + selectedValue + " from " + allIdentities.number + "\n");142 Log.debug(" ##changeIdentityToSmartIdentity selectedValue=" + selectedValue + ": '" + allIdentities.identityDataCollection[selectedValue].combinedName + "' "141 Log.debug("changeIdentityToSmartIdentity selectedValue=" + selectedValue + " from " + allIdentities.number + "\n"); 142 Log.debug("changeIdentityToSmartIdentity selectedValue=" + selectedValue + ": '" + allIdentities.identityDataCollection[selectedValue].combinedName + "' " 143 143 + "(" + allIdentities.identityDataCollection[selectedValue].id.value + "," + allIdentities.identityDataCollection[selectedValue].smtp.value + ")\n"); 144 144 document.getElementById("msgIdentity_clone").selectedMenuItem = allIdentities.menuItems[selectedValue]; -
content/vI_storage.js
rf17e5d3 rbf505e 46 46 47 47 clean: function() { 48 Log.debug(" ## storage:clean.\n");48 Log.debug("clean.\n"); 49 49 storage.multipleRecipients = null; 50 50 storage.lastCheckedEmail = {}; … … 60 60 replacement_functions : { 61 61 awSetInputAndPopupValue : function (inputElem, inputValue, popupElem, popupValue, rowNumber) { 62 Log.debug(" ## storage:awSetInputAndPopupValue '" + inputElem.id +"'\n");62 Log.debug("awSetInputAndPopupValue '" + inputElem.id +"'\n"); 63 63 storage.original_functions.awSetInputAndPopupValue(inputElem, inputValue, popupElem, popupValue, rowNumber); 64 64 storage.updateVIdentityFromStorage(inputElem); … … 69 69 // only react on events triggered by addressCol2 - textinput Elements 70 70 if (!element || ! element.id.match(/^addressCol2*/)) return; 71 Log.debug("\n ## storage:awOnBlur '" + element.id +"'\n");71 Log.debug("\nawOnBlur '" + element.id +"'\n"); 72 72 storage.updateVIdentityFromStorage(element); 73 73 storage.focusedElement = null; … … 80 80 81 81 awPopupOnCommand : function (element) { 82 Log.debug("\n ## storage:awPopupOnCommand'" + element.id +"'\n");82 Log.debug("\nawPopupOnCommand'" + element.id +"'\n"); 83 83 storage.updateVIdentityFromStorage(document.getElementById(element.id.replace(/^addressCol1/,"addressCol2"))); 84 84 if (element.selectedItem.getAttribute("value") == "addr_reply") // if reply-to is manually entered disable AutoReplyToSelf … … 132 132 updateVIdentityFromStorage: function(inputElement) { 133 133 if (!storage._pref.getBoolPref("storage")) 134 { Log.debug(" ## storage:Storage deactivated\n"); return; }135 Log.debug(" ## storage:updateVIdentityFromStorage()\n");134 { Log.debug("Storage deactivated\n"); return; } 135 Log.debug("updateVIdentityFromStorage()\n"); 136 136 137 137 var recipientType = document.getElementById(inputElement.id.replace(/^addressCol2/,"addressCol1")) … … 142 142 if (storage.firstUsedInputElement == inputElement) 143 143 storage.firstUsedInputElement = null; 144 Log.debug(" ## storage:field is a 'reply-to' or 'followup-to' or preconfigured 'doBcc'. not searched.\n")144 Log.debug("field is a 'reply-to' or 'followup-to' or preconfigured 'doBcc'. not searched.\n") 145 145 return; 146 146 } 147 147 148 148 if (inputElement.value == "") { 149 Log.debug(" ## storage:no recipient found, not checked.\n"); return;149 Log.debug("no recipient found, not checked.\n"); return; 150 150 } 151 151 152 152 var row = inputElement.id.replace(/^addressCol2#/,"") 153 153 if (storage.lastCheckedEmail[row] && storage.lastCheckedEmail[row] == inputElement.value) { 154 Log.debug(" ## storage:same email than before, not checked again.\n"); return;154 Log.debug("same email than before, not checked again.\n"); return; 155 155 } 156 156 storage.lastCheckedEmail[row] = inputElement.value; … … 163 163 164 164 if (storageResult.identityCollection.number == 0) return; // return if there was no match 165 Log.debug(" ## storage:updateVIdentityFromStorage result: " + storageResult.result + "\n");165 Log.debug("updateVIdentityFromStorage result: " + storageResult.result + "\n"); 166 166 // found storageData, so store InputElement 167 167 if (!storage.firstUsedInputElement) storage.firstUsedInputElement = inputElement; … … 170 170 if (storageResult.result != "equal") { 171 171 for (var j = 0; j < storageResult.identityCollection.number; j++) { 172 Log.debug(" ## storage:updateVIdentityFromStorage adding: " + storageResult.identityCollection.identityDataCollection[j].combinedName + "\n");172 Log.debug("updateVIdentityFromStorage adding: " + storageResult.identityCollection.identityDataCollection[j].combinedName + "\n"); 173 173 selectedMenuItem = document.getElementById("msgIdentity_clone").addIdentityToCloneMenu(storageResult.identityCollection.identityDataCollection[j]) 174 174 } 175 175 } 176 176 if (storageResult.result == "accept") { 177 Log.debug(" ## storage:updateVIdentityFromStorage selecting: " + storageResult.identityCollection.identityDataCollection[0].combinedName + "\n");177 Log.debug("updateVIdentityFromStorage selecting: " + storageResult.identityCollection.identityDataCollection[0].combinedName + "\n"); 178 178 document.getElementById("msgIdentity_clone").selectedMenuItem = selectedMenuItem; 179 179 if (document.getElementById("msgIdentity_clone").vid) … … 190 190 for (var index = 0; index < doBccArray.count; index++ ) { 191 191 if (doBccArray.StringAt(index) == awGetInputElement(row).value) { 192 Log.debug(" ## storage:ignoring doBcc field '" +192 Log.debug("ignoring doBcc field '" + 193 193 doBccArray.StringAt(index) + "'.\n"); 194 194 return true; -
content/vI_storageExtras.js
rf17e5d3 rbf505e 94 94 loopForRDF : function(rdfDatasource, resource, type) { 95 95 for( var i = 0; i < this.extras.length; i++ ) { 96 // Log.debug(" ## vI.rdfDatasource:loopForRDF " + rdfDatasource + "\n");96 // Log.debug("loopForRDF " + rdfDatasource + "\n"); 97 97 // only if pref set and feature(element available) or for dataEditor 98 98 if (typeof(gMsgCompose) == "undefined" || !gMsgCompose || this.extras[i].active) { … … 171 171 for( var i = 0; i < this.extras.length; i++ ) { 172 172 if (this.extras[i].active) this.extras[i].readIdentityValue(identity) 173 // Log.debug(" ## storageExtrasreadIdentityValues "+ this.extras[i].field + "=" + this.extras[i].value + "\n");173 // Log.debug("readIdentityValues "+ this.extras[i].field + "=" + this.extras[i].value + "\n"); 174 174 } 175 175 }, … … 178 178 for( var i = 0; i < this.extras.length; i++ ) { 179 179 if (this.extras[i].active) this.extras[i].setValue() 180 // Log.debug(" ## storageExtrassetValue "+ this.extras[i].field + "=" + this.extras[i].value + "\n");180 // Log.debug("setValue "+ this.extras[i].field + "=" + this.extras[i].value + "\n"); 181 181 } 182 182 }, 183 183 readValues : function() { 184 184 for( var i = 0; i < this.extras.length; i++ ) { 185 // Log.debug(" ## storageExtraspreparing readValue "+ this.extras[i].field +"\n");185 // Log.debug("preparing readValue "+ this.extras[i].field +"\n"); 186 186 if (this.extras[i].active) this.extras[i].readValue() 187 // Log.debug(" ## storageExtrasreadValue "+ this.extras[i].field + "=" + this.extras[i].value + "\n");187 // Log.debug("readValue "+ this.extras[i].field + "=" + this.extras[i].value + "\n"); 188 188 } 189 189 }, … … 194 194 for( var i = 0; i < this.extras.length; i++ ) { 195 195 this.extras[i].readEditorValue(); 196 // Log.debug(" ## storageExtrasreadValue " + this.extras[i].field + "=" + this.extras[i].value + "\n");196 // Log.debug("readValue " + this.extras[i].field + "=" + this.extras[i].value + "\n"); 197 197 } 198 198 }, … … 380 380 // function to set or read the value from/to the MessageCompose Dialog 381 381 setValue : function() { 382 Log.debug(" ## storageExtras_sMime_messageEncryption \n");382 Log.debug("sMime_messageEncryption \n"); 383 383 var doEncryptElem = document.getElementById("menu_securityEncryptRequire1"); 384 384 if (this.value == null) return; … … 462 462 463 463 if ((element.getAttribute("checked") == "true") != (this.value == "true")) { 464 Log.debug(" ## storageExtraschange "+ this.field + " to " + this.value + " with doCommand\n");464 Log.debug("change "+ this.field + " to " + this.value + " with doCommand\n"); 465 465 element.doCommand(); 466 466 } -
content/v_identity.js
rf17e5d3 rbf505e 67 67 ComposeStateListener : { 68 68 NotifyComposeBodyReady: function() { 69 Log.debug(" ## v_identity:NotifyComposeBodyReady\n");69 Log.debug("NotifyComposeBodyReady\n"); 70 70 main.initSystemStage2(); 71 71 }, 72 72 NotifyComposeFieldsReady: function() { 73 Log.debug(" ## v_identity:NotifyComposeFieldsReady\n");73 Log.debug("NotifyComposeFieldsReady\n"); 74 74 }, 75 75 ComposeProcessDone: function(aResult) { 76 Log.debug(" ## v_identity:StateListener reports ComposeProcessDone\n");76 Log.debug("StateListener reports ComposeProcessDone\n"); 77 77 main.Cleanup(); // not really required, parallel handled by main.close 78 78 vI.storage.clean(); 79 79 }, 80 80 SaveInFolderDone: function(folderURI) { 81 Log.debug(" ## v_identity:SaveInFolderDone\n");81 Log.debug("SaveInFolderDone\n"); 82 82 main.Cleanup(); 83 83 vI.storage.clean(); … … 87 87 replacement_functions : { 88 88 FillIdentityList: function(menulist) { 89 Log.debug(" ## v_identity:mod. FillIdentityList\n");89 Log.debug("mod. FillIdentityList\n"); 90 90 var accounts = queryISupportsArray(main.accountManager.accounts, 91 91 Components.interfaces.nsIMsgAccount); … … 139 139 vI.storage.awOnBlur(vI.storage.focusedElement); 140 140 141 Log.debug("\n ## v_identity:VIdentity_GenericSendMessage\n");141 Log.debug("\nVIdentity_GenericSendMessage\n"); 142 142 143 143 if (msgType == Components.interfaces.nsIMsgCompDeliverMode.Now) { vI.msgIdentityCloneTools.addReplyToSelf(); } … … 151 151 if (returnValue.update == "abort") { 152 152 main.replacement_functions.GenericSendMessageInProgress = false; 153 Log.debug(" ##sending: -------------- aborted ---------------------------------\n")153 Log.debug("sending: -------------- aborted ---------------------------------\n") 154 154 return; 155 155 } … … 158 158 msgIdentityCloneElem.selectedMenuItem = msgIdentityCloneElem.addIdentityToCloneMenu(returnValue.storedIdentity); 159 159 main.replacement_functions.GenericSendMessageInProgress = false; 160 Log.debug(" ##sending: -------------- aborted ---------------------------------\n")160 Log.debug("sending: -------------- aborted ---------------------------------\n") 161 161 return; 162 162 } … … 171 171 else main.Cleanup(); 172 172 main.replacement_functions.GenericSendMessageInProgress = false; 173 // Log.debug(" ## v_identity:original_functions.GenericSendMessage done\n");173 // Log.debug("original_functions.GenericSendMessage done\n"); 174 174 }, 175 175 176 176 replace_FillIdentityList : function() { 177 //~ Log.debug(" ## v_identity:replace FillIdentityList \n");177 //~ Log.debug("replace FillIdentityList \n"); 178 178 main.original_functions.FillIdentityList = FillIdentityList; 179 179 FillIdentityList = main.replacement_functions.FillIdentityList; … … 184 184 window.removeEventListener('compose-window-reopen', main.reopen, true); 185 185 window.removeEventListener('compose-window-close', main.close, true); 186 Log.debug(" ## v_identity:end. remove Account if there.\n")186 Log.debug("end. remove Account if there.\n") 187 187 main.Cleanup(); 188 188 vI.storage.clean(); … … 208 208 for (var index = 0; index < doBccArray.count; index++ ) { 209 209 if (doBccArray.StringAt(index) == awGetInputElement(row).value) { 210 Log.debug(" ## main_recipientIsDoBcc: ignoring doBcc field '" +210 Log.debug("_recipientIsDoBcc: ignoring doBcc field '" + 211 211 doBccArray.StringAt(index) + "'.\n"); 212 212 return true; … … 221 221 window.removeEventListener('compose-window-init', main.init, true); 222 222 if (main.elements.Area_MsgIdentityHbox) return; // init done before, (?reopen) 223 Log.debug("\n ## v_identity:init.\n")223 Log.debug("\ninit.\n") 224 224 main.unicodeConverter.charset="UTF-8"; 225 if (!main.adapt_genericSendMessage()) { Log.debug("\n ## v_identity:init failed.\n"); return; }225 if (!main.adapt_genericSendMessage()) { Log.debug("\ninit failed.\n"); return; } 226 226 227 227 main.adapt_interface(); … … 238 238 239 239 main.initSystemStage1(); 240 Log.debug(" ## v_identity:init done.\n\n")240 Log.debug("init done.\n\n") 241 241 }, 242 242 243 243 initSystemStage1 : function() { 244 Log.debug(" ## v_identity:initSystemStage1.\n")244 Log.debug("initSystemStage1.\n") 245 245 main.gMsgCompose = gMsgCompose; 246 246 document.getElementById("msgIdentity_clone").init(); 247 247 vI.statusmenu.init(); 248 Log.debug(" ## v_identity:initSystemStage1 done.\n")248 Log.debug("initSystemStage1 done.\n") 249 249 }, 250 250 251 251 initSystemStage2 : function() { 252 Log.debug(" ## v_identity:initSystemStage2.\n")252 Log.debug("initSystemStage2.\n") 253 253 vI.msgIdentityCloneTools.initReplyTo(); 254 254 vI.storage.init(); 255 255 vI.smartIdentity.init(); 256 Log.debug(" ## v_identity:initSystemStage2 done.\n")256 Log.debug("initSystemStage2 done.\n") 257 257 }, 258 258 … … 290 290 adapt_genericSendMessage : function() { 291 291 if (main.original_functions.GenericSendMessage) return true; // only initialize this once 292 Log.debug(" ## v_identity:adapt GenericSendMessage\n");292 Log.debug("adapt GenericSendMessage\n"); 293 293 main.original_functions.GenericSendMessage = GenericSendMessage; 294 294 GenericSendMessage = main.replacement_functions.GenericSendMessage; … … 298 298 reopen: function() { 299 299 clearDebugOutput(); 300 Log.debug(" ## v_identity:composeDialog reopened. (msgType " + gMsgCompose.type + ")\n")300 Log.debug("composeDialog reopened. (msgType " + gMsgCompose.type + ")\n") 301 301 302 302 // clean all elements 303 303 document.getElementById("msgIdentity_clone").clean(); 304 Log.debug(" ## v_identity:everything cleaned.\n")304 Log.debug("everything cleaned.\n") 305 305 306 306 // now (re)init the elements … … 329 329 gMsgCompose.RegisterStateListener(main.ComposeStateListener); 330 330 } 331 Log.debug(" ## v_identity:reopen done.\n")331 Log.debug("reopen done.\n") 332 332 }, 333 333 … … 386 386 observe : function(subject, topic, data) { 387 387 if (topic == "am-smtpChanges") { 388 Log.debug(" ## v_identity:smtp changes observed\n");388 Log.debug("smtp changes observed\n"); 389 389 var msgIdentity_clone = document.getElementById("msgIdentity_clone"); 390 390 document.getAnonymousElementByAttribute(msgIdentity_clone, "class", "smtpServerListHbox").refresh(); 391 391 } 392 392 if (topic == "am-acceptChanges") { 393 Log.debug(" ## v_identity:account changes observed\n");393 Log.debug("account changes observed\n"); 394 394 document.getElementById("msgIdentity_clone").clean(); 395 395 document.getElementById("msgIdentity_clone").init();
Note: See TracChangeset
for help on using the changeset viewer.