Changeset 021dbf


Ignore:
Timestamp:
Nov 14, 2011, 6:08:39 PM (8 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
c0a8de
Parents:
67fe6b
Message:

start implementation of new logging (not finished)

Files:
2 added
2 deleted
24 edited

Legend:

Unmodified
Added
Removed
  • content/bindings/vI_rdfAccountMismatchDialog.xml

    r67fe6b r021dbf  
    155155    <method name="_addIdentities">
    156156        <body><![CDATA[
    157         virtualIdentityExtension.notificationBar.dump("## mismatchID-menupopup: _addIdentities.\n");
     157        MyLog.debug("## mismatchID-menupopup: _addIdentities.\n");
    158158        var AccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"]
    159159            .getService(Components.interfaces.nsIMsgAccountManager);
     
    177177        <parameter name="server" />
    178178        <body><![CDATA[
    179             virtualIdentityExtension.notificationBar.dump("## mismatchID-menupopup: _addSmtp.\n");
     179            MyLog.debug("## mismatchID-menupopup: _addSmtp.\n");
    180180            const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    181181            var menuitem = document.createElementNS(XUL_NS, "menuitem"); // create a new XUL menuitem
     
    190190    <method name="_addSmtpServers">
    191191        <body><![CDATA[
    192             virtualIdentityExtension.notificationBar.dump("## mismatchID-menupopup: _addSmtpServers.\n");
     192            MyLog.debug("## mismatchID-menupopup: _addSmtpServers.\n");
    193193           
    194194            const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
     
    209209    <constructor>
    210210        <![CDATA[       
    211         virtualIdentityExtension.notificationBar.dump("## mismatchID-menupopup: constructor.\n");
     211        MyLog.debug("## mismatchID-menupopup: constructor.\n");
    212212        const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    213213        this.appendChild(document.createElementNS(XUL_NS, "menuseparator")); // create a new XUL menuseparator
  • content/bindings/v_identity.xml

    r67fe6b r021dbf  
    7575    <method name="popupshowing">
    7676            <body><![CDATA[
    77             virtualIdentityExtension.notificationBar.dump("** v_identity.xml vI_tooltipPopupset popupshowing.\n")
     77            MyLog.debug("** v_identity.xml vI_tooltipPopupset popupshowing.\n")
    7878        if (!this._identityInfo) {
    7979            this._identityInfo =
     
    8585                    "</td>" +
    8686                "</tr></table>"
    87             virtualIdentityExtension.notificationBar.dump("** v_identity.xml added tooltip with id='" +  this.elem.identityData.id.key + "'\n")
     87            MyLog.debug("** v_identity.xml added tooltip with id='" +  this.elem.identityData.id.key + "'\n")
    8888            this._tooltipBrowser.outputString = this._identityInfo;
    8989        }
    90         virtualIdentityExtension.notificationBar.dump("** v_identity.xml vI_tooltipPopupset popupshowing done.\n")
     90        MyLog.debug("** v_identity.xml vI_tooltipPopupset popupshowing done.\n")
    9191        ]]></body>
    9292    </method>
     
    130130        this.label = this._identityDataStorage.combinedName;
    131131        this.value = this._identityDataStorage.id.key;
    132         virtualIdentityExtension.notificationBar.dump("** v_identity.xml fromPopupItem_clone constructor id='" + this.value + "'.\n")
     132        MyLog.debug("** v_identity.xml fromPopupItem_clone constructor id='" + this.value + "'.\n")
    133133
    134134        this.description = this._identityDataStorage.sideDescription;
    135135        this.smtp = this._identityDataStorage.smtp.value;
    136         virtualIdentityExtension.notificationBar.dump("** v_identity.xml fromPopupItem_clone constructor smtp='" + this.smtp + "'.\n")
     136        MyLog.debug("** v_identity.xml fromPopupItem_clone constructor smtp='" + this.smtp + "'.\n")
    137137        this.smtpStyle = "width:" + document.getElementById("smtp_server_list").clientWidth + "px;";
    138138        this._identityDataStorage.smtp.value;
     
    248248        <setter><![CDATA[
    249249        if (val == virtualIdentityExtension.NO_SMTP_TAG) return; // dont overwrite if not set
    250         virtualIdentityExtension.notificationBar.dump("** v_identity.xml smtp set to '" + val + "'\n")
     250        MyLog.debug("** v_identity.xml smtp set to '" + val + "'\n")
    251251        var MenuItems = this._smtpPopup.childNodes
    252252        for (var index = 0; index < MenuItems.length; index++) {
     
    349349    <method name="command">
    350350        <body><![CDATA[
    351         virtualIdentityExtension.notificationBar.dump("\n** v_identity.xml msgIdentityCloneElem.doCommand() \n")
    352         virtualIdentityExtension.notificationBar.dump("\n** v_identity.xml msgIdentityCloneElem.doCommand() \n")
     351        MyLog.debug("\n** v_identity.xml msgIdentityCloneElem.doCommand() \n")
     352        MyLog.debug("\n** v_identity.xml msgIdentityCloneElem.doCommand() \n")
    353353        // copy selected Menu-Value from clone to orig.
    354         virtualIdentityExtension.notificationBar.dump("** v_identity.xmlcopy selected Menu-Value from clone to orig. Searching for id=" + this.selectedMenuItem.identityData.id.key + " \n")
     354        MyLog.debug("** v_identity.xmlcopy selected Menu-Value from clone to orig. Searching for id=" + this.selectedMenuItem.identityData.id.key + " \n")
    355355        if ( this.selectedMenuItem.identityData.id.key != null ) {
    356356            var MenuItems = this._msgIdentityPopupElem.childNodes
     
    365365        }
    366366        this.identityData = this.selectedMenuItem.identityData.getDuplicate();
    367         virtualIdentityExtension.notificationBar.dump("\n** v_identity.xml msgIdentityCloneElem.doCommand() this.value=" + this.value + "\n");
     367        MyLog.debug("\n** v_identity.xml msgIdentityCloneElem.doCommand() this.value=" + this.value + "\n");
    368368        // if current SMTP is empty, take the one from current Identity
    369369        if (this.identityData.smtp.hasNoDefinedSMTP()) {
     
    498498        <getter><![CDATA[
    499499            if (!this._msgIdentityElem.selectedItem) {
    500                 virtualIdentityExtension.notificationBar.dump("** v_identity.xml: msgIdentityElem.selectedItem not set, using first Menuitem\n");
     500                MyLog.debug("** v_identity.xml: msgIdentityElem.selectedItem not set, using first Menuitem\n");
    501501                this._msgIdentityElem.selectedItem = this._msgIdentityPopupElem.firstChild
    502                 virtualIdentityExtension.notificationBar.dump("** v_identity.xml: msgIdentityElem.doCommand()\n");
     502                MyLog.debug("** v_identity.xml: msgIdentityElem.doCommand()\n");
    503503                this._msgIdentityElem.doCommand();
    504504            }
     
    508508    <method name="blurEvent">
    509509            <body><![CDATA[
    510         virtualIdentityExtension.notificationBar.dump("\n** v_identity.xml blurEvent")
     510        MyLog.debug("\n** v_identity.xml blurEvent")
    511511        this.inputEvent(); // timeout might prevent inputEvent to fire before blurEvent
    512512       
     
    517517    <method name="inputEvent">
    518518            <body><![CDATA[     
    519         virtualIdentityExtension.notificationBar.dump("\n** v_identity.xml inputEvent\n")
     519        MyLog.debug("\n** v_identity.xml inputEvent\n")
    520520       
    521521        this.identityData.combinedName = this.label;
     
    527527    <method name="checkForVirtualIdentity">
    528528        <body><![CDATA[
    529         virtualIdentityExtension.notificationBar.dump("** v_identity.xml checkForVirtualIdentity: " + this.identityData.id.key + " '" + this.identityData.id.value + "'\n")
     529        MyLog.debug("** v_identity.xml checkForVirtualIdentity: " + this.identityData.id.key + " '" + this.identityData.id.value + "'\n")
    530530        var existingIdentity = this.identityData.isExistingIdentity(false);
    531531       
     
    553553        ]]></getter>
    554554        <setter><![CDATA[
    555         virtualIdentityExtension.notificationBar.dump("** v_identity.xml identityData setter\n")
     555        MyLog.debug("** v_identity.xml identityData setter\n")
    556556        if (!val) this._identityDataStorage = null
    557557        else {
     
    559559            this._identityDataStorage = val;
    560560            if (oldIdentityData) { // indicates that it's not first time after clean
    561                 virtualIdentityExtension.notificationBar.dump("** v_identity.xml previousID: fullName='" + oldIdentityData.fullName + "' email='" + oldIdentityData.email + "' smtp='" + oldIdentityData.smtp.key + "' id='" + oldIdentityData.id.key + "' existingID='" + oldIdentityData.existingID + "'\n");
    562                 virtualIdentityExtension.notificationBar.dump("** v_identity.xml newID: fullName='" + this._identityDataStorage.fullName + "' email='" + this._identityDataStorage.email + "' smtp='" + this._identityDataStorage.smtp.key + "' id='" + this._identityDataStorage.id.key + "' existingID='" + this._identityDataStorage.existingID + "'\n");
     561                MyLog.debug("** v_identity.xml previousID: fullName='" + oldIdentityData.fullName + "' email='" + oldIdentityData.email + "' smtp='" + oldIdentityData.smtp.key + "' id='" + oldIdentityData.id.key + "' existingID='" + oldIdentityData.existingID + "'\n");
     562                MyLog.debug("** v_identity.xml newID: fullName='" + this._identityDataStorage.fullName + "' email='" + this._identityDataStorage.email + "' smtp='" + this._identityDataStorage.smtp.key + "' id='" + this._identityDataStorage.id.key + "' existingID='" + this._identityDataStorage.existingID + "'\n");
    563563                if (!this._identityDataStorage.existingID && !this._identityDataStorage.combinedName)
    564564                    this._identityDataStorage.fullName = oldIdentityData.fullName;
     
    577577            this.description = this._identityDataStorage.sideDescription;
    578578            document.getAnonymousElementByAttribute(this, "anonid", "smtpServerListHbox").smtp = this._identityDataStorage.smtp.keyNice;
    579             virtualIdentityExtension.notificationBar.dump("** v_identity.xml resultingID: fullName='" + this._identityDataStorage.fullName + "' email='" + this._identityDataStorage.email + "' smtp='" + this._identityDataStorage.smtp.key + "' id='" + this._identityDataStorage.id.key + "' existingID='" + this._identityDataStorage.existingID + "'\n");         
    580         }
    581         virtualIdentityExtension.notificationBar.dump("** v_identity.xml identityData setter done.'\n")
     579            MyLog.debug("** v_identity.xml resultingID: fullName='" + this._identityDataStorage.fullName + "' email='" + this._identityDataStorage.email + "' smtp='" + this._identityDataStorage.smtp.key + "' id='" + this._identityDataStorage.id.key + "' existingID='" + this._identityDataStorage.existingID + "'\n");           
     580        }
     581        MyLog.debug("** v_identity.xml identityData setter done.'\n")
    582582        ]]></setter>
    583583    </property>
  • content/modules/vI_account.js

    r67fe6b r021dbf  
    3939            .getService(Components.interfaces.nsIMsgAccountManager);
    4040           
    41     if (vI.notificationBar) vI.notificationBar.dump("\n## prepareSendMsg " + msgType + " " + Components.interfaces.nsIMsgCompDeliverMode.Now + "\n");
     41    MyLog.debug("\n## prepareSendMsg " + msgType + " " + Components.interfaces.nsIMsgCompDeliverMode.Now + "\n");
    4242   
    4343    returnValue = {};
     
    5757            var returnValue = localeDatasourceAccess.storeVIdentityToAllRecipients(identityData, recipients)
    5858            if ( returnValue.update == "abort" || returnValue.update == "takeover" ) {
    59                 if (vI.notificationBar) vI.notificationBar.dump("## prepareSendMsg: sending aborted\n");
     59                MyLog.debug("## prepareSendMsg: sending aborted\n");
    6060                return returnValue;
    6161            }
    6262        }
    63         else if (vI.notificationBar) vI.notificationBar.dump("## prepareSendMsg: storage deactivated\n");
     63        else MyLog.debug("## prepareSendMsg: storage deactivated\n");
    6464    }
    6565    if (vid) {
     
    7676    var currentIdentityData = new vI.identityData(currentIdentity.email, currentIdentity.fullName, null, currentIdentity.smtpServerKey, null, null, null);
    7777   
    78     if (vI.notificationBar) vI.notificationBar.dump("\n## vI.identityData SendMessage Final Check\n");
    79     if (vI.notificationBar) vI.notificationBar.dump("## vI.identityData currentIdentity: fullName='" + currentIdentityData.fullName + "' email='" + currentIdentityData.email + "' smtp='" + currentIdentityData.smtp.key + "'\n");
    80     if (vI.notificationBar) vI.notificationBar.dump("## vI.identityData virtualIdentityData: fullName='" + virtualIdentityData.fullName + "' email='" + virtualIdentityData.email + "' smtp='" + virtualIdentityData.smtp.key + "'\n");
     78    MyLog.debug("\n## vI.identityData SendMessage Final Check\n");
     79    MyLog.debug("## vI.identityData currentIdentity: fullName='" + currentIdentityData.fullName + "' email='" + currentIdentityData.email + "' smtp='" + currentIdentityData.smtp.key + "'\n");
     80    MyLog.debug("## vI.identityData virtualIdentityData: fullName='" + virtualIdentityData.fullName + "' email='" + virtualIdentityData.email + "' smtp='" + virtualIdentityData.smtp.key + "'\n");
    8181
    8282    if  (currentIdentityData.fullName.toLowerCase() == virtualIdentityData.fullName.toLowerCase()   &&
     
    8686    }
    8787    else {
    88         if (!(currentIdentityData.fullName.toLowerCase() == virtualIdentityData.fullName.toLowerCase())) vI.notificationBar.dump("\n## vI.identityData failed check for fullName.\n");
    89         if (!(currentIdentityData.email.toLowerCase() == virtualIdentityData.email.toLowerCase())) vI.notificationBar.dump("\n## vI.identityData failed check for email.\n");
    90         if (!(virtualIdentityData.smtp.equal(currentIdentityData.smtp))) vI.notificationBar.dump("\n## vI.identityData failed check for SMTP.\n");
     88        if (!(currentIdentityData.fullName.toLowerCase() == virtualIdentityData.fullName.toLowerCase())) MyLog.debug("\n## vI.identityData failed check for fullName.\n");
     89        if (!(currentIdentityData.email.toLowerCase() == virtualIdentityData.email.toLowerCase())) MyLog.debug("\n## vI.identityData failed check for email.\n");
     90        if (!(virtualIdentityData.smtp.equal(currentIdentityData.smtp))) MyLog.debug("\n## vI.identityData failed check for SMTP.\n");
    9191        alert(stringBundle.getStringFromName("vident.genericSendMessage.error"));
    9292        return false
     
    136136        if (account._pref.getBoolPref("copySMIMESettings")) {
    137137            // SMIME settings
    138             vI.notificationBar.dump("## account: copy S/MIME settings\n")
     138            MyLog.debug("## account: copy S/MIME settings\n")
    139139            account._copyUnicharAttribute("signing_cert_name");
    140140            account._copyUnicharAttribute("encryption_cert_name");
     
    144144        if (account._pref.getBoolPref("copyEnigmailSettings")) {
    145145            // pgp/enigmail settings
    146             vI.notificationBar.dump("## account: copy PGP settings\n")
     146            MyLog.debug("## account: copy PGP settings\n")
    147147            account._copyBoolAttribute("pgpSignEncrypted");
    148148            account._copyBoolAttribute("pgpSignPlain");
     
    157157        if (account._pref.getBoolPref("copyAttachVCardSettings")) {
    158158            // attach vcard
    159             vI.notificationBar.dump("## account: copy VCard settings\n")
     159            MyLog.debug("## account: copy VCard settings\n")
    160160            account._copyBoolAttribute("attachVCard");
    161161            account._copyCharAttribute("escapedVCard");
     
    181181
    182182    __cleanupDirectories : function() {
    183         vI.notificationBar.dump("## account: checking for leftover VirtualIdentity directories ")
     183        MyLog.debug("## account: checking for leftover VirtualIdentity directories ")
    184184
    185185        var file = Components.classes["@mozilla.org/file/directory_service;1"]
     
    201201                        if (account.__dirEmpty(maildir)) {
    202202                            try {maildir.remove(true)} catch(e) { }
    203                             vI.notificationBar.dump("x");
     203                            MyLog.debug("x");
    204204                        }
    205                         else vI.notificationBar.dump(".");
     205                        else MyLog.debug(".");
    206206                       
    207207                    }
     
    209209            }
    210210        }
    211         vI.notificationBar.dump(" - done\n")
     211        MyLog.debug(" - done\n")
    212212    },
    213213   
    214214    cleanupSystem : function() {
    215         vI.notificationBar.dump("## account: checking for leftover VirtualIdentity accounts ")
     215        MyLog.debug("## account: checking for leftover VirtualIdentity accounts ")
    216216        for (var i=0; i < account._AccountManager.accounts.Count(); i++) {
    217217            var checkAccount = account._AccountManager.accounts.QueryElementAt(i, Components.interfaces.nsIMsgAccount);
    218218            if (account.__isVIdentityAccount(checkAccount)) {
    219                 vI.notificationBar.dump(".")
     219                MyLog.debug(".")
    220220                account.__removeAccount(checkAccount);
    221221            }
    222222        }
    223         vI.notificationBar.dump(" - done\n")
     223        MyLog.debug(" - done\n")
    224224        account.__cleanupDirectories();
    225225    },
     
    236236   
    237237    __removeAccount : function(checkAccount) {
    238         vI.notificationBar.dump("## account: __removeAccount\n")
     238        MyLog.debug("## account: __removeAccount\n")
    239239        // in new (post 0.5.0) Virtual Identity accounts the incomingServer of the account
    240240        // points to an incoming server of a different account. Cause the internal
     
    252252       
    253253        var key = checkAccount.key;
    254         vI.notificationBar.dump("## account: removing account " + key + ".\n")
     254        MyLog.debug("## account: removing account " + key + ".\n")
    255255        // remove the account
    256256        account._AccountManager.removeAccount(checkAccount);
     
    325325            account._account.defaultIdentity.smtpServerKey = baseIdentity.smtpServerKey;
    326326
    327         vI.notificationBar.dump("## account: Stored virtualIdentity (name "
     327        MyLog.debug("## account: Stored virtualIdentity (name "
    328328            + account._account.defaultIdentity.fullName + " email "
    329329            + account._account.defaultIdentity.email + " smtp "
     
    341341            {
    342342                case "2"  :
    343                 vI.notificationBar.dump ("## account: preparing Fcc --- use Settings of Default Account\n");
     343                MyLog.debug ("## account: preparing Fcc --- use Settings of Default Account\n");
    344344                account._account.defaultIdentity.doFcc = account._AccountManager.defaultAccount.defaultIdentity.doFcc;
    345345                account._account.defaultIdentity.fccFolder = account._AccountManager.defaultAccount.defaultIdentity.fccFolder;
     
    348348                break;
    349349                case "3"  :
    350                 vI.notificationBar.dump ("## account: preparing Fcc --- use Settings of Modified Account\n");
     350                MyLog.debug ("## account: preparing Fcc --- use Settings of Modified Account\n");
    351351                account._account.defaultIdentity.doFcc = account._baseIdentity.doFcc;
    352352                account._account.defaultIdentity.fccFolder = account._baseIdentity.fccFolder;
     
    355355                break;
    356356                default  :
    357                 vI.notificationBar.dump ("## account: preparing Fcc --- use Virtual Identity Settings\n");
     357                MyLog.debug ("## account: preparing Fcc --- use Virtual Identity Settings\n");
    358358                account._account.defaultIdentity.doFcc
    359359                    = account._pref.getBoolPref("doFcc");
     
    371371            account._account.defaultIdentity.doFcc = false;
    372372        }
    373         vI.notificationBar.dump("## account: Stored (doFcc " + account._account.defaultIdentity.doFcc + " fccFolder " +
     373        MyLog.debug("## account: Stored (doFcc " + account._account.defaultIdentity.doFcc + " fccFolder " +
    374374            account._account.defaultIdentity.fccFolder + " fccFolderPickerMode " +
    375375            account._account.defaultIdentity.fccFolderPickerMode + "(" +
     
    381381        {
    382382            case "2"  :
    383             vI.notificationBar.dump ("## account: preparing Draft --- use Settings of Default Account\n");
     383            MyLog.debug ("## account: preparing Draft --- use Settings of Default Account\n");
    384384            account._account.defaultIdentity.draftFolder = account._AccountManager.defaultAccount.defaultIdentity.draftFolder;
    385385            account._account.defaultIdentity.draftsFolderPickerMode = account._AccountManager.defaultAccount.defaultIdentity.draftsFolderPickerMode;
    386386            break;
    387387            case "3"  :
    388             vI.notificationBar.dump ("## account: preparing Draft --- use Settings of Modified Account\n");
     388            MyLog.debug ("## account: preparing Draft --- use Settings of Modified Account\n");
    389389            account._account.defaultIdentity.draftFolder = account._baseIdentity.draftFolder;
    390390            account._account.defaultIdentity.draftsFolderPickerMode = account._baseIdentity.draftsFolderPickerMode;
    391391            break;
    392392            default  :
    393             vI.notificationBar.dump ("## account: preparing Draft --- use Virtual Identity Settings\n");
     393            MyLog.debug ("## account: preparing Draft --- use Virtual Identity Settings\n");
    394394            account._account.defaultIdentity.draftFolder
    395395                = account._unicodeConverter.ConvertToUnicode(account._pref.getCharPref("draftFolder"));
     
    398398            break;
    399399        }
    400         vI.notificationBar.dump("## account: Stored (draftFolder " +
     400        MyLog.debug("## account: Stored (draftFolder " +
    401401            account._account.defaultIdentity.draftFolder + " draftsFolderPickerMode " +
    402402            account._account.defaultIdentity.draftsFolderPickerMode + "(" +
     
    408408        {
    409409            case "2"  :
    410             vI.notificationBar.dump ("## account: preparing Templates --- use Settings of Default Account\n");
     410            MyLog.debug ("## account: preparing Templates --- use Settings of Default Account\n");
    411411            account._account.defaultIdentity.stationeryFolder = account._AccountManager.defaultAccount.defaultIdentity.stationeryFolder;
    412412            account._account.defaultIdentity.tmplFolderPickerMode = account._AccountManager.defaultAccount.defaultIdentity.tmplFolderPickerMode;
    413413            break;
    414414            case "3"  :
    415             vI.notificationBar.dump ("## account: preparing Templates --- use Settings of Modified Account\n");
     415            MyLog.debug ("## account: preparing Templates --- use Settings of Modified Account\n");
    416416            account._account.defaultIdentity.stationeryFolder = account._baseIdentity.stationeryFolder;
    417417            account._account.defaultIdentity.tmplFolderPickerMode = account._baseIdentity.tmplFolderPickerMode;
    418418            break;
    419419            default  :
    420             vI.notificationBar.dump ("## account: preparing Templates --- use Virtual Identity Settings\n");
     420            MyLog.debug ("## account: preparing Templates --- use Virtual Identity Settings\n");
    421421            account._account.defaultIdentity.stationeryFolder
    422422                = account._unicodeConverter.ConvertToUnicode(account._pref.getCharPref("stationeryFolder"));
     
    425425            break;
    426426        }
    427         vI.notificationBar.dump("## account: Stored (stationeryFolder " +
     427        MyLog.debug("## account: Stored (stationeryFolder " +
    428428            account._account.defaultIdentity.stationeryFolder + " tmplFolderPickerMode " +
    429429            account._account.defaultIdentity.tmplFolderPickerMode + "(" +
  • content/modules/vI_identityData.js

    r67fe6b r021dbf  
    7070            this._fullName += RegExp.leftContext + RegExp.rightContext;
    7171            this._email = RegExp.lastMatch;
    72 //          vI.notificationBar.dump("## identityData: parseEmail _fullName = '" + this._fullName + "'\n");
    73 //          vI.notificationBar.dump("## identityData: parseEmail _email =    '" + this._email + "'\n");
     72//          MyLog.debug("## identityData: parseEmail _fullName = '" + this._fullName + "'\n");
     73//          MyLog.debug("## identityData: parseEmail _email =    '" + this._email + "'\n");
    7474        }
    7575        this._emailParsed = true;
     
    8282
    8383    cleanName : function(fullName) {
    84 //      vI.notificationBar.dump("## identityData: cleanName init '" + fullName + "'\n");
     84//      MyLog.debug("## identityData: cleanName init '" + fullName + "'\n");
    8585        var _fullName = fullName.replace(/^\s+|\s+$/g,"");
    8686        if (_fullName.search(/^\".+\"$|^'.+'$/g) != -1) {
    8787            _fullName = this.cleanName(_fullName.replace(/^\"(.+)\"$|^'(.+)'$/g,"$1$2"));
    8888        }
    89 //      vI.notificationBar.dump("## identityData: cleanName done '" + _fullName + "'\n");
     89//      MyLog.debug("## identityData: cleanName done '" + _fullName + "'\n");
    9090        return _fullName;
    9191    },
     
    132132    // dependent on MsgComposeCommands, should/will only be called in ComposeDialog
    133133    isExistingIdentity : function(ignoreFullNameWhileComparing) {
    134         vI.notificationBar.dump("## identityData: isExistingIdentity: ignoreFullNameWhileComparing='" + ignoreFullNameWhileComparing + "'\n");
    135 //      vI.notificationBar.dump("## identityData base: fullName.toLowerCase()='" + this.fullName + "' email.toLowerCase()='" + this.email + "' smtp='" + this.smtp.key + "'\n");
     134        MyLog.debug("## identityData: isExistingIdentity: ignoreFullNameWhileComparing='" + ignoreFullNameWhileComparing + "'\n");
     135//      MyLog.debug("## identityData base: fullName.toLowerCase()='" + this.fullName + "' email.toLowerCase()='" + this.email + "' smtp='" + this.smtp.key + "'\n");
    136136
    137137        var ignoreFullNameMatchKey = null;
     
    143143            for (let j = 0; j < account.identities.Count(); j++) {
    144144                var identity = account.identities.QueryElementAt(j, Components.interfaces.nsIMsgIdentity);
    145 //              vI.notificationBar.dump("## identityData comp: fullName.toLowerCase()='" + identity.fullName.toLowerCase() + "' email.toLowerCase()='" + identity.email.toLowerCase() + "' smtp='" + identity.smtpServerKey + "'\n");
     145//              MyLog.debug("## identityData comp: fullName.toLowerCase()='" + identity.fullName.toLowerCase() + "' email.toLowerCase()='" + identity.email.toLowerCase() + "' smtp='" + identity.smtpServerKey + "'\n");
    146146                var email = this.email?this.email:"";               // might be null if no identity is set
    147147                var idEmail = identity.email?identity.email:""; // might be null if no identity is set
     
    150150                        // if fullName matches, than this is a final match
    151151                        if ( this.fullName.toLowerCase() == identity.fullName.toLowerCase() ) {
    152                             vI.notificationBar.dump("## identityData: isExistingIdentity: " + this.combinedName + " found, id='" + identity.key + "'\n");
     152                            MyLog.debug("## identityData: isExistingIdentity: " + this.combinedName + " found, id='" + identity.key + "'\n");
    153153                            return identity.key; // return key and stop searching
    154154                        }
     
    160160
    161161        if ( ignoreFullNameWhileComparing && ignoreFullNameMatchKey ) {
    162             vI.notificationBar.dump("## identityData: isExistingIdentity: " + this.combinedName + " found, id='" + ignoreFullNameMatchKey + "'\n");
     162            MyLog.debug("## identityData: isExistingIdentity: " + this.combinedName + " found, id='" + ignoreFullNameMatchKey + "'\n");
    163163            return  ignoreFullNameMatchKey;
    164164        }
    165165
    166         vI.notificationBar.dump("## identityData: isExistingIdentity: " + this.combinedName + " not found\n");
     166        MyLog.debug("## identityData: isExistingIdentity: " + this.combinedName + " not found\n");
    167167        return null;
    168168    },
     
    239239
    240240    dropIdentity : function(index) {
    241         vI.notificationBar.dump("## identityCollection:   dropping address from inputList: " + this.identityDataCollection[index].combinedName + "\n");
     241        MyLog.debug("## identityCollection:   dropping address from inputList: " + this.identityDataCollection[index].combinedName + "\n");
    242242        while (index < (this.number - 1)) { this.identityDataCollection[index] = this.identityDataCollection[++index]; };
    243243        this.identityDataCollection[--this.number] = null;
     
    254254                if (this.identityDataCollection[index].fullName == "" && identityData.fullName != "") {
    255255                    this.identityDataCollection[index].fullName = identityData.fullName;
    256                     vI.notificationBar.dump("## identityCollection:   added fullName '" + identityData.fullName
     256                    MyLog.debug("## identityCollection:   added fullName '" + identityData.fullName
    257257                        + "' to stored email '" + this.identityDataCollection[index].email +"'\n")
    258258                }
     
    263263                    this.identityDataCollection[index].smtp.key = identityData.smtp.key;
    264264                    this.identityDataCollection[index].extras = identityData.extras;
    265                     vI.notificationBar.dump("## identityCollection:   added id '" + identityData.id.value
     265                    MyLog.debug("## identityCollection:   added id '" + identityData.id.value
    266266                        + "' smtp '" + identityData.smtp.value + "' (+extras) to stored email '" + this.identityDataCollection[index].email +"'\n")
    267267                }
     
    269269            }
    270270        }
    271         vI.notificationBar.dump("## identityCollection:   add new address to result: " + identityData.combinedName + "\n")
     271        MyLog.debug("## identityCollection:   add new address to result: " + identityData.combinedName + "\n")
    272272        this.identityDataCollection[index] = identityData;
    273273        this.number = index + 1;
  • content/modules/vI_rdfDatasource.js

    r67fe6b r021dbf  
    2626
    2727virtualIdentityExtension.ns(function() { with (virtualIdentityExtension.LIB) {
     28
     29Components.utils.import("resource://v_identity/vI_log.js");
     30let Log = setupLogging("virtualIdentity.rdfDatasource");
     31
    2832function rdfDatasource(rdfFileName, dontRegisterObserver) {
    2933    this._rdfFileName = rdfFileName;
     
    9094
    9195    init: function() {
    92 //         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource init.\n");
     96//         Log.debug("## rdfDatasource init.\n");
    9397
    9498        this._openRdfDataSource();
     
    101105           
    102106//         this.refreshAccountInfo();
    103 //         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource init done.\n");
     107//         Log.debug("## rdfDatasource init done.\n");
    104108    },
    105109   
     
    119123        var fileURI = protoHandler.newFileURI(newFile);
    120124
    121         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource init: read rdf from '" + fileURI.spec + "'\n");
     125        Log.debug("## rdfDatasource init: read rdf from '" + fileURI.spec + "'\n");
    122126
    123127        this._rdfDataSource =
    124128            this._rdfService.GetDataSourceBlocking(fileURI.spec);
    125129           
    126 //         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource read rdf from '" + fileURI.spec + "' done." + this._rdfService + "\n");
     130//         Log.debug("## rdfDatasource read rdf from '" + fileURI.spec + "' done." + this._rdfService + "\n");
    127131    },
    128132   
     
    168172    rdfUpgrade : function() {
    169173        var currentVersion = this.getCurrentRDFFileVersion();
    170         if (vI.notificationBar) vI.notificationBar.dump("checking for previous version of rdf, found " +
     174        Log.debug("checking for previous version of rdf, found " +
    171175            currentVersion + "\nrdf-upgrade required.\n")
    172176        switch (currentVersion) {
     
    182186        }
    183187        this.storeRDFVersion();
    184         if (vI.notificationBar) vI.notificationBar.dump("rdf-upgrade to " + this.getCurrentRDFFileVersion() + " done.\n\n");
     188        Log.debug("rdf-upgrade to " + this.getCurrentRDFFileVersion() + " done.\n\n");
    185189    },
    186190    // **************    RDF UPGRADE CODE    ****************************************************
    187191    // only used for upgrade to 0.0.3 - loop through all ressources.
    188192    _transferAllResources : function () {
    189         if (vI.notificationBar) vI.notificationBar.dump("upgrade: transferAllResources ");
     193        Log.debug("upgrade: transferAllResources ");
    190194        var enumerator = this._rdfDataSource.GetAllResources();
    191195        while (enumerator && enumerator.hasMoreElements()) {
     
    207211            if (container.IndexOf(resource) == -1) container.AppendElement(resource);
    208212       
    209             if (vI.notificationBar) vI.notificationBar.dump(".");
    210         }
    211         if (vI.notificationBar) vI.notificationBar.dump("\n");
     213            Log.debug(".");
     214        }
     215        Log.debug("\n");
    212216    },
    213217    // **************    RDF UPGRADE CODE    ****************************************************
    214218    _tagDefaultSMTP: function() {
    215         if (vI.notificationBar) vI.notificationBar.dump("upgrade: tagDefaultSMTP ");
     219        Log.debug("upgrade: tagDefaultSMTP ");
    216220        for each (treeType in Array("email", "maillist", "newsgroup", "filter")) {
    217221            var enumerator = this.getContainer(treeType).GetElements();
     
    221225                var smtp = this._getRDFValue(resource, "smtp")
    222226                if (!smtp || smtp == "") this._setRDFValue(resource, "smtp", vI.DEFAULT_SMTP_TAG);
    223                 if (vI.notificationBar) vI.notificationBar.dump(".");
     227                Log.debug(".");
    224228            }
    225229        }
    226         if (vI.notificationBar) vI.notificationBar.dump("\n");
     230        Log.debug("\n");
    227231    },
    228232    // **************    RDF UPGRADE CODE    ****************************************************
    229233    _createAccountInfoContainers: function() {
    230         if (vI.notificationBar) vI.notificationBar.dump("upgrade: createAccountInfoContainers \n");
     234        Log.debug("upgrade: createAccountInfoContainers \n");
    231235        var rdfContainerUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].
    232236            getService(Components.interfaces.nsIRDFContainerUtils);
     
    260264    // **************    RDF UPGRADE CODE    ****************************************************
    261265    _createRDFContainers: function() {
    262         if (vI.notificationBar) vI.notificationBar.dump("upgrade: createRDFContainers ");
     266        Log.debug("upgrade: createRDFContainers ");
    263267        var rdfContainerUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].
    264268            getService(Components.interfaces.nsIRDFContainerUtils);
     
    344348   
    345349    cleanAccountInfo : function() {
    346         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: cleanAccountInfo\n");
     350        Log.debug("## rdfDatasource: cleanAccountInfo\n");
    347351       
    348352        var enumerator = this._identityContainer.GetElements();
     
    385389   
    386390    searchIdentityMismatch : function() {
    387         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: searchIdentityMismatch");
     391        Log.debug("## rdfDatasource: searchIdentityMismatch");
    388392
    389393        var relevantIDs = this.getRelevantIDs();
     
    412416        }
    413417        if (mismatchIDs.length > 0) {
    414             if (vI.notificationBar) vI.notificationBar.dump(" found mismatches on id(s).\n");
     418            Log.debug(" found mismatches on id(s).\n");
    415419           
    416420            window.openDialog("chrome://v_identity/content/vI_rdfAccountMismatchDialog.xul",0,
     
    420424        }
    421425        else {
    422             if (vI.notificationBar) vI.notificationBar.dump(" found no mismatch\n");
     426            Log.debug(" found no mismatch\n");
    423427            return false;
    424428        }
     
    428432        var keyField = (type == "identity")?"id":"smtp" // field to change is 'id' or 'smtp' dependent on type
    429433        for (var i = 0; i < mismatchItems.length; i++) {
    430             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: repairAccountMismatch change " + mismatchItems[i].oldkey + " into " + mismatchItems[i].key + ": ");
     434            Log.debug("## rdfDatasource: repairAccountMismatch change " + mismatchItems[i].oldkey + " into " + mismatchItems[i].key + ": ");
    431435            // search relevant Identities
    432436            for each (treeType in Array("email", "maillist", "newsgroup", "filter")) {
     
    438442                        if (mismatchItems[i].key == "") this._unsetRDFValue(resource, keyField, mismatchItems[i].oldkey)
    439443                        else this._setRDFValue(resource, keyField, mismatchItems[i].key)
    440                         if (vI.notificationBar) vI.notificationBar.dump(".");
     444                        Log.debug(".");
    441445                    }
    442446                }
    443447            }
    444             if (vI.notificationBar) vI.notificationBar.dump("\n");
     448            Log.debug("\n");
    445449        }
    446450    },
     
    464468   
    465469    searchSmtpMismatch : function() {
    466         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: searchSmtpMismatch");
     470        Log.debug("## rdfDatasource: searchSmtpMismatch");
    467471
    468472        var relevantSMTPs = this.getRelevantSMTPs();
     
    488492        }
    489493        if (mismatchSMTPs.length > 0) {
    490             if (vI.notificationBar) vI.notificationBar.dump(" found mismatches on smtp(s).\n");
     494            Log.debug(" found mismatches on smtp(s).\n");
    491495            window.openDialog("chrome://v_identity/content/vI_rdfAccountMismatchDialog.xul",0,
    492496                    "chrome, dialog, modal, alwaysRaised, resizable=yes", "smtp", mismatchSMTPs,
     
    495499        }
    496500        else {
    497             if (vI.notificationBar) vI.notificationBar.dump(" found no mismatch\n");
     501            Log.debug(" found no mismatch\n");
    498502            return false;
    499503        }
     
    501505
    502506    storeAccountInfo : function() {
    503         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: storeAccounts\n");
     507        Log.debug("## rdfDatasource: storeAccounts\n");
    504508
    505509        var AccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"]
     
    509513            for (let j = 0; j < account.identities.Count(); j++) {
    510514                var identity = account.identities.QueryElementAt(j, Components.interfaces.nsIMsgIdentity);
    511 //                 if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: storeAccounts identity store id " + identity.key + "\n");
     515//                 Log.debug("## rdfDatasource: storeAccounts identity store id " + identity.key + "\n");
    512516
    513517                var resource = this._rdfService.GetResource(this._rdfNS + this._rdfNSIdentities + "/" + identity.key);
     
    523527       
    524528        function storeSmtp(server, parent) {
    525 //             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: storeAccounts smtp store id " + server.key + "\n");
     529//             Log.debug("## rdfDatasource: storeAccounts smtp store id " + server.key + "\n");
    526530            var resource = parent._rdfService.GetResource(parent._rdfNS + parent._rdfNSSMTPservers + "/" + server.key);
    527531            parent._setRDFValue(resource, "label", (server.description?server.description:server.hostname));
     
    540544        }
    541545
    542 //         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: storeAccounts done\n");
     546//         Log.debug("## rdfDatasource: storeAccounts done\n");
    543547    },
    544548
     
    565569        if (!this._rdfDataSource) return null;
    566570        if (!recDescription) {
    567             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: _getRDFResourceForVIdentity: no Recipient given.\n");
     571            Log.debug("## rdfDatasource: _getRDFResourceForVIdentity: no Recipient given.\n");
    568572            return null;
    569573        }
     
    581585   
    582586    removeVIdentityFromRDF : function (resource, recType) {
    583 //      if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: removeVIdentityFromRDF " + resource.ValueUTF8 + ".\n");
     587//      Log.debug("## rdfDatasource: removeVIdentityFromRDF " + resource.ValueUTF8 + ".\n");
    584588        this._unsetRDFValue(resource, "email", this._getRDFValue(resource, "email"))
    585589        this._unsetRDFValue(resource, "fullName", this._getRDFValue(resource, "fullName"))
     
    594598   
    595599    _unsetRDFValue : function (resource, field, value) {
    596 //      if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource _unsetRDFValue " + this._rdfService  + " " + this._rdfDataSource + "\n");
     600//      Log.debug("## rdfDatasource _unsetRDFValue " + this._rdfService  + " " + this._rdfDataSource + "\n");
    597601        var predicate = this._rdfService.GetResource(this._rdfNS + "rdf#" + field);
    598602        var name = this._rdfService.GetLiteral(value?value:"");
     
    607611    // this will be used from rdfDataTree to get all RDF values, callFunction is vI.rdfDataTreeCollection.__addNewDatum
    608612    readAllEntriesFromRDF : function (addNewDatum, treeType, idData) {
    609 //      if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: readAllEntriesFromRDF " + this._rdfService  + " " + this._rdfDataSource + " " + this + "\n");
     613//      Log.debug("## rdfDatasource: readAllEntriesFromRDF " + this._rdfService  + " " + this._rdfDataSource + " " + this + "\n");
    610614        var enumerator = this.getContainer(treeType).GetElements();
    611615        while (enumerator && enumerator.hasMoreElements()) {
     
    628632        if (recipientType == "addr_newsgroups") return { recDesc : recipient, recType : "newsgroup" }
    629633        else if (this.__isMailingList(recipient)) {
    630             vI.notificationBar.dump("## __getDescriptionAndType: '" + recipient + "' is MailList\n");
     634            Log.debug("## __getDescriptionAndType: '" + recipient + "' is MailList\n");
    631635            return { recDesc : this.__getMailListName(recipient), recType : "maillist" }
    632636        }
    633637        else {
    634             vI.notificationBar.dump("## __getDescriptionAndType: '" + recipient + "' is no MailList\n");
     638            Log.debug("## __getDescriptionAndType: '" + recipient + "' is no MailList\n");
    635639            var localIdentityData = new vI.identityData(recipient, null, null, null, null, null, null);
    636640            return { recDesc : localIdentityData.combinedName, recType : "email" }
     
    674678    findMatchingFilter : function (recipient, recipientType) {
    675679        var recDescription = this.__getDescriptionAndType(recipient, recipientType).recDesc;
    676         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: findMatchingFilter for " + recDescription + ".\n");
     680        Log.debug("## rdfDatasource: findMatchingFilter for " + recDescription + ".\n");
    677681        var enumerator = this._filterContainer.GetElements();
    678682        while (enumerator && enumerator.hasMoreElements()) {
     
    686690            if (filter == "") continue;
    687691            if (/^\/(.*)\/$/.exec(filter))
    688                 { if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: findMatchingFilter with RegExp '"
     692                { Log.debug("## rdfDatasource: findMatchingFilter with RegExp '"
    689693                    + filter.replace(/\\/g,"\\\\") + "'\n"); recentfilterType = filterType.RegExp; }
    690             else    { if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: findMatchingFilter, compare with '"
     694            else    { Log.debug("## rdfDatasource: findMatchingFilter, compare with '"
    691695                    + filter + "'\n"); recentfilterType = filterType.StrCmp; }
    692696           
     
    695699                    try {   /^\/(.*)\/$/.exec(filter);
    696700                        if (recDescription.match(new RegExp(RegExp.$1,"i"))) {
    697                             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: findMatchingFilter found stored data.\n");
     701                            Log.debug("## rdfDatasource: findMatchingFilter found stored data.\n");
    698702                            return this._readVIdentityFromRDF(resource);
    699703                        }
     
    702706                case filterType.StrCmp:
    703707                    if (recDescription.toLowerCase().indexOf(filter.toLowerCase()) != -1) {
    704                         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: findMatchingFilter found stored data.\n");
     708                        Log.debug("## rdfDatasource: findMatchingFilter found stored data.\n");
    705709                        return this._readVIdentityFromRDF(resource);
    706710                    }
     
    708712            }
    709713        }
    710         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: findMatchingFilter no match found.\n");
     714        Log.debug("## rdfDatasource: findMatchingFilter no match found.\n");
    711715        return null;
    712716    },
     
    719723        if (!this._rdfDataSource.hasArcOut(resource, email)) {
    720724            // no data available --> give up.
    721             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: readVIdentityFromRDF no data found.\n");
     725            Log.debug("## rdfDatasource: readVIdentityFromRDF no data found.\n");
    722726            return null;
    723727        }
    724         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: readVIdentityFromRDF found stored data.\n");
     728        Log.debug("## rdfDatasource: readVIdentityFromRDF found stored data.\n");
    725729       
    726730        return this._readVIdentityFromRDF(resource);
     
    734738        if (!smtp) smtp = vI.NO_SMTP_TAG;
    735739       
    736         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: email='" + email +
     740        Log.debug("## rdfDatasource: email='" + email +
    737741            "' fullName='" + fullName + "' id='" + id + "' smtp='" + smtp + "'\n");
    738742       
    739743        var extras = (typeof(vI.storageExtras)=='function')?new vI.storageExtras(this, resource):null;
    740744        var extras_status = (typeof(vI.storageExtras)=='function')?extras.status():" not used";
    741         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: extras:" + extras_status + "\n");
     745        Log.debug("## rdfDatasource: extras:" + extras_status + "\n");
    742746       
    743747        var localIdentityData = new vI.identityData(email, fullName, id, smtp, extras)
     
    746750
    747751    _getRDFValue : function (resource, field) {
    748 //         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource _getRDFValue " + this._rdfService  + " " + this._rdfDataSource + " " + this + "\n");
     752//         Log.debug("## rdfDatasource _getRDFValue " + this._rdfService  + " " + this._rdfDataSource + " " + this + "\n");
    749753        var predicate = this._rdfService.GetResource(this._rdfNS + "rdf#" + field);
    750754        var target = this._rdfDataSource.GetTarget(resource, predicate, true);
     
    771775
    772776    updateRDF : function (recDescription, recType, localIdentityData, storeBaseID, storeSMTP, prevRecDescription, prevRecType) {
    773 //         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource (" + this._rdfNS + "): updateRDF recDescription=" + recDescription + " localIdentityData.email=" + localIdentityData.email + ".\n");
     777//         Log.debug("## rdfDatasource (" + this._rdfNS + "): updateRDF recDescription=" + recDescription + " localIdentityData.email=" + localIdentityData.email + ".\n");
    774778       
    775779//      if (!localIdentityData.email) {
    776 //          if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: updateRDF: no Sender-email for Recipient, aborting.\n");
     780//          Log.debug("## rdfDatasource: updateRDF: no Sender-email for Recipient, aborting.\n");
    777781//          return;
    778782//      }
     
    784788        var resource = this._getRDFResourceForVIdentity(prevRecDescription, prevRecType);
    785789        if (!resource) return;
    786 //      if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: updateRDF " + resource.ValueUTF8 + ".\n");
     790//      Log.debug("## rdfDatasource: updateRDF " + resource.ValueUTF8 + ".\n");
    787791       
    788792        var position = this.getContainer(recType).IndexOf(resource); // check for index in new recType
     
    803807        if (localIdentityData.extras) localIdentityData.extras.loopForRDF(this, resource, "set");
    804808       
    805         if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: updateRDF add " + resource.ValueUTF8 + " at position " + position + ".\n");
     809        Log.debug("## rdfDatasource: updateRDF add " + resource.ValueUTF8 + " at position " + position + ".\n");
    806810        if (position != -1) this.getContainer(recType).InsertElementAt(resource, position, true);
    807811        else this.getContainer(recType).AppendElement(resource);
     
    809813
    810814    _setRDFValue : function (resource, field, value) {
    811 //      if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: _setRDFValue " + resource.ValueUTF8 + " " + field + " " + value + ".\n");
     815//      Log.debug("## rdfDatasource: _setRDFValue " + resource.ValueUTF8 + " " + field + " " + value + ".\n");
    812816        if (!value) return value; // return if some value was not set.
    813 //      if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource _setRDFValue " + this._rdfService + " " + this._rdfDataSource + "\n");
     817//      Log.debug("## rdfDatasource _setRDFValue " + this._rdfService + " " + this._rdfDataSource + "\n");
    814818        var predicate = this._rdfService.GetResource(this._rdfNS + "rdf#" + field);
    815819        var name = this._rdfService.GetLiteral(value);
     
    827831        observe : function(subject, topic, data) {
    828832            if (topic == "am-smtpChanges" || topic == "am-acceptChanges") {
    829                 if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: account/smtp changes observed\n");
     833                Log.debug("## rdfDatasource: account/smtp changes observed\n");
    830834                this.searchIdentityMismatch();
    831835                this.searchSmtpMismatch();
     
    834838        },
    835839        register : function() {
    836             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasource: register AccountManagerObserver\n");
     840            Log.debug("## rdfDatasource: register AccountManagerObserver\n");
    837841            var obsService = Components.classes["@mozilla.org/observer-service;1"].
    838842                getService(Components.interfaces.nsIObserverService)
     
    872876        var localIdentities = new vI.identityCollection();
    873877        localIdentities.addWithoutDuplicates(this._rdfDataSource.readVIdentityFromRDF(recipientName, recipientType));
    874         if (localIdentities.number == 1) vI.notificationBar.dump("## rdfDatasourceAccess: using data from direct match\n");
     878        if (localIdentities.number == 1) Log.debug("## rdfDatasourceAccess: using data from direct match\n");
    875879        localIdentities.addWithoutDuplicates(this._rdfDataSource.findMatchingFilter(recipientName, recipientType));
    876880       
    877881        var returnValue = {}; returnValue.identityCollection = localIdentities; returnValue.result = "drop";
    878882        if (localIdentities.number == 0) {
    879             vI.notificationBar.dump("## rdfDatasourceAccess: updateVIdentityFromStorage no usable Storage-Data found.\n");
     883            Log.debug("## rdfDatasourceAccess: updateVIdentityFromStorage no usable Storage-Data found.\n");
    880884        }
    881885        else {
    882             vI.notificationBar.dump("## rdfDatasourceAccess: compare with current Identity\n");
     886            Log.debug("## rdfDatasourceAccess: compare with current Identity\n");
    883887            if (this._pref.getBoolPref("storage_getOneOnly") &&     // if requested to retrieve only storageID for first recipient entered
    884888                isNotFirstInputElement &&                           // and it is now not the first recipient entered
    885889                !localIdentities.identityDataCollection[0].equalsIdentity(currentIdentity, false).equal) {      // and this id is different than the current used one
    886                     vI.notificationBar.setNote(
     890                    setNote(
    887891                        this.stringBundle.GetStringFromName("vident.smartIdentity.vIStorageCollidingIdentity"), // than drop the potential changes
    888892                        "storage_notification");
     
    891895            // only update fields if new Identity is different than old one.
    892896            else {
    893                 vI.notificationBar.dump("## rdfDatasourceAccess: updateVIdentityFromStorage check if storage-data matches current Identity.\n");
     897                Log.debug("## rdfDatasourceAccess: updateVIdentityFromStorage check if storage-data matches current Identity.\n");
    894898                var compResult = localIdentities.identityDataCollection[0].equalsIdentity(currentIdentity, true);
    895899                if (!compResult.equal) {
     
    912916        var multipleRecipients = (recipients.length > 1);
    913917        var dontUpdateMultipleNoEqual = (this._pref.getBoolPref("storage_dont_update_multiple") && multipleRecipients)
    914         vI.notificationBar.dump("## rdfDatasource: storeVIdentityToAllRecipients dontUpdateMultipleNoEqual='" + dontUpdateMultipleNoEqual + "'\n")
     918        Log.debug("## rdfDatasource: storeVIdentityToAllRecipients dontUpdateMultipleNoEqual='" + dontUpdateMultipleNoEqual + "'\n")
    915919       
    916920        for (var j = 0; j < recipients.length; j++) {
     
    923927    getVIdentityFromAllRecipients : function(allIdentities, recipients) {
    924928        if (!this._pref.getBoolPref("storage"))
    925             { vI.notificationBar.dump("## storage: Storage deactivated\n"); return; }
     929            { Log.debug("## storage: Storage deactivated\n"); return; }
    926930        var initnumber = allIdentities.number;
    927931        for (var j = 0; j < recipients.length; j++) {
     
    929933            allIdentities.addWithoutDuplicates(this._rdfDataSource.findMatchingFilter(recipients[j].recipient, recipients[j].recipientType));
    930934        }
    931         vI.notificationBar.dump("## storage: found " + (allIdentities.number-initnumber) + " address(es)\n")
     935        Log.debug("## storage: found " + (allIdentities.number-initnumber) + " address(es)\n")
    932936    },
    933937
    934938    __updateStorageFromVIdentity : function(identityData, recipient, recipientType, dontUpdateMultipleNoEqual) {
    935         vI.notificationBar.dump("## rdfDatasource: __updateStorageFromVIdentity.\n")
     939        Log.debug("## rdfDatasource: __updateStorageFromVIdentity.\n")
    936940        var storageDataByType = this._rdfDataSource.readVIdentityFromRDF(recipient, recipientType);
    937941        var storageDataByFilter = this._rdfDataSource.findMatchingFilter(recipient, recipientType);
     
    946950        if (    (!storageDataByType && !storageDataByFilterEqual) ||
    947951            (!storageDataByTypeEqual && !storageDataByFilterEqual && !dontUpdateMultipleNoEqual) ) {
    948             vI.notificationBar.dump("## storage: __updateStorageFromVIdentity updating\n")
     952            Log.debug("## storage: __updateStorageFromVIdentity updating\n")
    949953            if (storageDataByType && !storageDataByTypeEqual && this._pref.getBoolPref("storage_warn_update")) {
    950                 vI.notificationBar.dump("## storage: __updateStorageFromVIdentity overwrite warning\n");
     954                Log.debug("## storage: __updateStorageFromVIdentity overwrite warning\n");
    951955                doUpdate = this.__askWarning(this.__getWarning("updateStorage", recipient, storageDataByTypeCompResult.compareMatrix));
    952956            }
     
    10341038            values.id = values.id?values.id:"import_" + id
    10351039            relevantIDs[id] = values;
    1036             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter import: translate relevant ID from previous '" + id + "' to current '" + relevantIDs[id].id + "'\n");
     1040            Log.debug("## rdfDatasourceImporter import: translate relevant ID from previous '" + id + "' to current '" + relevantIDs[id].id + "'\n");
    10371041        }
    10381042        return relevantIDs;
     
    10661070            values.smtp = values.smtp?values.smtp:"import_" + smtp;
    10671071            relevantSMTPs[smtp] = values;
    1068             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter import: translate relevant SMTP from previous '" + smtp + "' to current '" + relevantSMTPs[smtp].smtp + "'\n");
     1072            Log.debug("## rdfDatasourceImporter import: translate relevant SMTP from previous '" + smtp + "' to current '" + relevantSMTPs[smtp].smtp + "'\n");
    10691073        }
    10701074        return relevantSMTPs;
     
    10961100       
    10971101        if (filePicker.show() == Components.interfaces.nsIFilePicker.returnOK) {
    1098             if (vI.notificationBar) vI.notificationBar.dump("\n## rdfDatasourceImporter IMPORT\n## rdfDatasourceImporter import: preparation:\n");
     1102            Log.debug("\n## rdfDatasourceImporter IMPORT\n## rdfDatasourceImporter import: preparation:\n");
    10991103           
    11001104            var importRdfDataFile = Components.classes["@mozilla.org/file/local;1"]
     
    11061110            filePicker.file.copyTo(importRdfDataFile.parent,importRdfDataFile.leafName);
    11071111
    1108             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter import: copied file from " + filePicker.file.path + " to " + importRdfDataFile.path + "'\n");
     1112            Log.debug("## rdfDatasourceImporter import: copied file from " + filePicker.file.path + " to " + importRdfDataFile.path + "'\n");
    11091113           
    11101114            // init Datasources
     
    11151119            var relevantSMTPs = this._translateRelevantSMTPs();
    11161120           
    1117             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter import: preparation done.\n");
    1118             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter import: starting import:\n");
     1121            Log.debug("## rdfDatasourceImporter import: preparation done.\n");
     1122            Log.debug("## rdfDatasourceImporter import: starting import:\n");
    11191123
    11201124            for each (treeType in Array("email", "maillist", "newsgroup", "filter")) {
     
    11231127                var container = this._rdfImportDataSource.getContainer(treeType)
    11241128                if (container.GetCount() == 0) continue;
    1125                 if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter importing " + treeType + ": " + container.GetCount()+ " datasets from " + this._rdfImportDataSource._rdfDataSource.URI + "\n");
     1129                Log.debug("## rdfDatasourceImporter importing " + treeType + ": " + container.GetCount()+ " datasets from " + this._rdfImportDataSource._rdfDataSource.URI + "\n");
    11261130                var enumerator = container.GetElements();
    11271131                // re-initialize dataSource to point rdfService to the right Resources
     
    11311135                    var resource = enumerator.getNext(); count += 1;
    11321136                    resource.QueryInterface(Components.interfaces.nsIRDFResource);
    1133                     if (vI.notificationBar) vI.notificationBar.dump("## " + count + " ");
     1137                    Log.debug("## " + count + " ");
    11341138                    var name = this._rdfImportDataSource._getRDFValue(resource, "name")
    11351139                    var email = this._rdfImportDataSource._getRDFValue(resource, "email")
     
    11491153            }
    11501154           
    1151             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter import: removing temporary file " + importRdfDataFile.path + ".\n");
     1155            Log.debug("## rdfDatasourceImporter import: removing temporary file " + importRdfDataFile.path + ".\n");
    11521156            this._rdfImportDataSource = null; importRdfDataFile.remove(false);
    1153             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter import: import done.\n");
    1154            
    1155             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter import: cleaning ID/SMTP storages:\n");
     1157            Log.debug("## rdfDatasourceImporter import: import done.\n");
     1158           
     1159            Log.debug("## rdfDatasourceImporter import: cleaning ID/SMTP storages:\n");
    11561160            this._rdfDataSource = new rdfDatasource(this._rdfFileName, true);
    11571161           
     
    11641168            this._rdfDataSource.clean();
    11651169            this._rdfDataSource = null;
    1166             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter import: cleaning ID/SMTP storages done.\n");
    1167             if (vI.notificationBar) vI.notificationBar.dump("## rdfDatasourceImporter IMPORT DONE.\n");
     1170            Log.debug("## rdfDatasourceImporter import: cleaning ID/SMTP storages done.\n");
     1171            Log.debug("## rdfDatasourceImporter IMPORT DONE.\n");
    11681172        }
    11691173    }
  • content/modules/vI_smartIdentityCollection.js

    r67fe6b r021dbf  
    2626
    2727virtualIdentityExtension.ns(function() { with (virtualIdentityExtension.LIB) {
    28    
     28
     29Components.utils.import("resource://v_identity/vI_log.js");
     30
    2931function smartIdentityCollection(msgHdr, preseletedID, currentIDisVID, newsgroup, recipients) {
    3032    dump("## smartIdentityCollection: constructor\n");
     
    6264    // this function adds a timestamp to the current sender
    6365    __autoTimestamp : function() {
    64         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: __autoTimestamp()\n");
     66        MyLog.debug("## smartIdentity: __autoTimestamp()\n");
    6567        if (this._IDisVID) {
    66             if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: Virtual Identity in use, aborting\n");
     68            MyLog.debug("## smartIdentity: Virtual Identity in use, aborting\n");
    6769            return;
    6870        }
     
    7274        var domain = current_email[1];
    7375       
    74         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: current email: " + current_email[0] + "@" + current_email[1] + "\n");
     76        MyLog.debug("## smartIdentity: current email: " + current_email[0] + "@" + current_email[1] + "\n");
    7577       
    7678        var autoString = this._pref.getCharPref("autoString");
     
    8486       
    8587        var new_email = autoString.replace(/%l/g, localpart).replace(/%d/g, domain).replace(/%t/g,dateString);
    86         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: new email: " + new_email + "\n");
     88        MyLog.debug("## smartIdentity: new email: " + new_email + "\n");
    8789
    8890        var newIdentity = new vI.identityData(new_email,
     
    9496   
    9597    __ignoreID : function() {
    96         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: checking " + this._pref.getCharPref("idSelection_ignoreIDs") + " against " + this._preselectedID.key + "\n")
     98        MyLog.debug("## smartIdentity: checking " + this._pref.getCharPref("idSelection_ignoreIDs") + " against " + this._preselectedID.key + "\n")
    9799        // check if usage if virtual Identities should be used at all for the currently selected ID
    98100        if (this._pref.getCharPref("idSelection_ignoreIDs").indexOf(":" + this._preselectedID.key + ":") != -1) {
    99             if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: not using virtual Identites for ID " + this._preselectedID.key + "\n");
     101            MyLog.debug("## smartIdentity: not using virtual Identites for ID " + this._preselectedID.key + "\n");
    100102            return true;
    101103        }
     
    104106   
    105107    NewMail : function() {
    106         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: NewMail()\n");
     108        MyLog.debug("## smartIdentity: NewMail()\n");
    107109        if (this.__ignoreID()) return;
    108110        this._rdfDatasourceAccess.getVIdentityFromAllRecipients(this._allIdentities, this._recipients);
     
    118120                // reorder list of Identities to prefer it on autoselect
    119121                // has to be done before Identities are added to the Menu
    120                 if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: found existing Identity, reorder to prefer this one.\n");
     122                MyLog.debug("## smartIdentity: found existing Identity, reorder to prefer this one.\n");
    121123                var firstIdentity = this._allIdentities.identityDataCollection[index];
    122124                for (var i = index; index > 0; index--) {
     
    131133   
    132134    ReplyOnSent : function() {
    133         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: ReplyOnSent() (rules like SmartDraft)\n");
     135        MyLog.debug("## smartIdentity: ReplyOnSent() (rules like SmartDraft)\n");
    134136        this.__SmartDraftOrReplyOnSent();
    135137        this._rdfDatasourceAccess.getVIdentityFromAllRecipients(this._allIdentities, this._recipients);
     
    137139
    138140    Draft : function() {
    139         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: Draft()\n");
     141        MyLog.debug("## smartIdentity: Draft()\n");
    140142       
    141143        this.__SmartDraftOrReplyOnSent();
     
    156158    __SmartDraftOrReplyOnSent : function() {
    157159        if (!this._pref.getBoolPref("smart_draft"))
    158             { if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: SmartDraft deactivated\n"); return; }
    159 
    160         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: __SmartDraftOrReplyOnSent()\n");
     160            { MyLog.debug("## smartIdentity: SmartDraft deactivated\n"); return; }
     161
     162        MyLog.debug("## smartIdentity: __SmartDraftOrReplyOnSent()\n");
    161163
    162164        if (this._msgHdr) {
    163165            this.__parseHeadersWithArray(this._msgHdr.author, this._allIdentities)
    164             if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: sender '" + this._allIdentities.identityDataCollection[0].combinedName + "'\n");
    165         }
    166         else if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: __SmartDraftOrReplyOnSent: No Header found, shouldn't happen\n");
     166            MyLog.debug("## smartIdentity: sender '" + this._allIdentities.identityDataCollection[0].combinedName + "'\n");
     167        }
     168        else MyLog.debug("## smartIdentity: __SmartDraftOrReplyOnSent: No Header found, shouldn't happen\n");
    167169    },
    168170   
     
    178180            var recentfilterType; var skipRegExp = false;
    179181            if (filterList.length <= 1 && filterList[0] == "")
    180                 { if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: no filters configured\n"); recentfilterType = filterType.None; }
     182                { MyLog.debug("## smartIdentity: no filters configured\n"); recentfilterType = filterType.None; }
    181183            else if (/^[+-]?\/(.*)\/$/.exec(filterList[i]))
    182                 { if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: filter emails with RegExp '"
     184                { MyLog.debug("## smartIdentity: filter emails with RegExp '"
    183185                    + filterList[i].replace(/\\/g,"\\\\") + "'\n"); recentfilterType = filterType.RegExp; }
    184             else    { if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: filter emails, compare with '"
     186            else    { MyLog.debug("## smartIdentity: filter emails, compare with '"
    185187                    + filterList[i] + "'\n"); recentfilterType = filterType.StrCmp; }
    186188            for (var j = 0; j < this._allIdentities.number; j++) { // check if recent email-address (pre-choosen identity) is found in
     
    200202                        }
    201203                        catch(vErr) {
    202                             if (vI.notificationBar) vI.notificationBar.addNote(
     204                            addNote(
    203205                                vI.main.elements.strings.getString("vident.smartIdentity.ignoreRegExp") +
    204206                                +filterList[i].replace(/\\/g,"\\\\") + " .",
     
    238240            // if mailing-list ignore to-header (usually the mailing list address)
    239241            if (replyHeaderNameToRead == "to" && this._msgHdr.getStringProperty("vI_list-id")) {
    240                 if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: header 'list-id' found (mailinglist), skipping header 'to'\n");
     242                MyLog.debug("## smartIdentity: header 'list-id' found (mailinglist), skipping header 'to'\n");
    241243                continue;
    242244            }
     
    248250                 .getMostRecentWindow("mail:3pane");
    249251           
    250             if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: found stored header '" +
     252            MyLog.debug("## smartIdentity: found stored header '" +
    251253                replyHeaderNameToRead + "': '" + window3pane.virtualIdentityExtension.storedHeaders["vI_" + replyHeaderNameToRead] + "'\n");*/
    252254           
    253             if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: reading header '" +
     255            MyLog.debug("## smartIdentity: reading header '" +
    254256                replyHeaderNameToRead + "': '" + value + "'\n");
    255257           
     
    262264                // if there is no email than it makes no sense to use it as a sender
    263265                if (!splitted.identityDataCollection[i].email.match(/^.*@.*$/)) {
    264                     if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity:   skipping '" +
     266                    MyLog.debug("## smartIdentity:   skipping '" +
    265267                    splitted.identityDataCollection[i].email + "', no email\n")
    266268                    continue;
     
    271273                this._allIdentities.addWithoutDuplicates(splitted.identityDataCollection[i]);
    272274
    273                 if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity:   found '" +
     275                MyLog.debug("## smartIdentity:   found '" +
    274276                    splitted.identityDataCollection[i].combinedName + "'\n")
    275277            }
     
    278280   
    279281    Reply : function() {
    280         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: Reply()\n");
     282        MyLog.debug("## smartIdentity: Reply()\n");
    281283
    282284        if (this._msgHdr && this._newsgroup && !this._msgHdr.getStringProperty("vI_content_base")) {
     
    292294            if (this._pref.getBoolPref("smart_detectByReceivedHeader")) {
    293295                if (!this._msgHdr.getStringProperty("vI_received")) { // mail was not received
    294                     if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: reply on non-received (sent?) mail. Using SmartDraft. \n");
     296                    MyLog.debug("## smartIdentity: reply on non-received (sent?) mail. Using SmartDraft. \n");
    295297                    this.ReplyOnSent();
    296298                    return;
     
    303305
    304306                if (this._msgHdr && (this._msgHdr.folder.flags & MSG_FOLDER_FLAG_SENTMAIL)) {
    305                     if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: reply from Sent folder.");
     307                    MyLog.debug("## smartIdentity: reply from Sent folder.");
    306308                    if (this._msgHdr.folder.flags & MSG_FOLDER_FLAG_INBOX)
    307                         if (vI.notificationBar) vI.notificationBar.dump(" Folder is INBOX, assuming Reply-Case. \n");
     309                        MyLog.debug(" Folder is INBOX, assuming Reply-Case. \n");
    308310                    else {
    309                         if (vI.notificationBar) vI.notificationBar.dump(" Using SmartDraft. \n");
     311                        MyLog.debug(" Using SmartDraft. \n");
    310312                        this.ReplyOnSent();
    311313                        return;
     
    322324        if (storageIdentities.number == 0 || !this._pref.getBoolPref("idSelection_storage_ignore_smart_reply"))
    323325            this.__SmartReply();
    324         else if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: SmartReply skipped, Identities in Storage found.\n");
     326        else MyLog.debug("## smartIdentity: SmartReply skipped, Identities in Storage found.\n");
    325327
    326328        // merge SmartReply-Identities and Storage-Identites
     
    333335        }
    334336       
    335         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: merged SmartReply & Storage, " + this._allIdentities.number + " address(es) left\n")
     337        MyLog.debug("## smartIdentity: merged SmartReply & Storage, " + this._allIdentities.number + " address(es) left\n")
    336338    },
    337339   
     
    339341    __SmartReply : function() {
    340342        if (!this._pref.getBoolPref("smart_reply"))
    341             { if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: SmartReply deactivated\n"); return; }
     343            { MyLog.debug("## smartIdentity: SmartReply deactivated\n"); return; }
    342344        if (this._newsgroup && !this._pref.getBoolPref("smart_reply_for_newsgroups")) {
    343             if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: SmartReply, answering to a newsgroup, aborting\n");
     345            MyLog.debug("## smartIdentity: SmartReply, answering to a newsgroup, aborting\n");
    344346            return;
    345347        }
    346348
    347         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: __SmartReply()\n");
    348         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: ----------------------------------------------------------\n")
     349        MyLog.debug("## smartIdentity: __SmartReply()\n");
     350        MyLog.debug("## smartIdentity: ----------------------------------------------------------\n")
    349351        if (this._msgHdr) {
    350352            /* first step: collect addresses */
    351353            this.__smartReplyCollectAddresses();
    352             if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: " + this._allIdentities.number + " address(es) after parsing, before filtering\n")
     354            MyLog.debug("## smartIdentity: " + this._allIdentities.number + " address(es) after parsing, before filtering\n")
    353355           
    354356            /* second step: filter (and sort) addresses */
    355357            this.__filterAddresses();
    356358           
    357             if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: filtering done, " + this._allIdentities.number + " address(es) left\n")
     359            MyLog.debug("## smartIdentity: filtering done, " + this._allIdentities.number + " address(es) left\n")
    358360           
    359361            /* set default FullName */
     
    363365                    if (this._allIdentities.identityDataCollection[index].fullName == "") {
    364366                        this._allIdentities.identityDataCollection[index].fullName = smart_reply_defaultFullName
    365                         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: added default FullName '" +
     367                        MyLog.debug("## smartIdentity: added default FullName '" +
    366368                            smart_reply_defaultFullName + "' to '" + this._allIdentities.identityDataCollection[index].email + "'\n")
    367369                    }
     
    373375            /* will not be added to the menu but probably choosen with __smartIdentitySelection     */
    374376            if (this._pref.getBoolPref("smart_reply_ignoreFullName")) {
    375                 if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: compare with existing Identities (ignoring FullNames).\n")
     377                MyLog.debug("## smartIdentity: compare with existing Identities (ignoring FullNames).\n")
    376378           
    377379                for (var index = 0; index < this._allIdentities.number; index++) {
     
    380382                        var newFullName = gAccountManager.getIdentity(idKey).fullName;
    381383                        this._allIdentities.identityDataCollection[index].fullName = newFullName;
    382                         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: replaced Fullname of '" + this._allIdentities.identityDataCollection[index].email + "' with '" + newFullName + "' \n");
     384                        MyLog.debug("## smartIdentity: replaced Fullname of '" + this._allIdentities.identityDataCollection[index].email + "' with '" + newFullName + "' \n");
    383385                    }
    384386                }
    385387            }
    386388        }
    387         else if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: SmartReply skipped. No Header-information found.\n");
    388        
    389         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: ----------------------------------------------------------\n")
     389        else MyLog.debug("## smartIdentity: SmartReply skipped. No Header-information found.\n");
     390       
     391        MyLog.debug("## smartIdentity: ----------------------------------------------------------\n")
    390392    },
    391393   
  • content/prefDialog/vI_prefDialog.xml

    r67fe6b r021dbf  
    3434        <![CDATA[
    3535        with (virtualIdentityExtension.LIB) {
    36         if (vI.notificationBar) vI.notificationBar.dump("## identitySelector: constructor\n");
     36        MyLog.debug("## identitySelector: constructor\n");
    3737        var AccountManager = Components.classes["@mozilla.org/messenger/account-manager;1"]
    3838            .getService(Components.interfaces.nsIMsgAccountManager);
     
    6262        <setter><![CDATA[
    6363        with (virtualIdentityExtension.LIB) {
    64         if (vI.notificationBar) vI.notificationBar.dump("## identitySelector: setting value to '" + val + "'\n");
     64        MyLog.debug("## identitySelector: setting value to '" + val + "'\n");
    6565        var listItems = this.childNodes;
    6666        for (var index = 0; index < listItems.length; index++) {
    6767            var key = listItems[index].getAttribute("value");
    6868            listItems[index].checked = (val.indexOf(":" + key + ":") == -1);
    69             if (vI.notificationBar) vI.notificationBar.dump("## identitySelector: setting value, '" + listItems[index].getAttribute("value") + "' '" + listItems[index].checked + "' '" + listItems[index].getAttribute("checked") + "'\n")
     69            MyLog.debug("## identitySelector: setting value, '" + listItems[index].getAttribute("value") + "' '" + listItems[index].checked + "' '" + listItems[index].getAttribute("checked") + "'\n")
    7070        }
    7171        this._value = val;
     
    7474        <getter><![CDATA[
    7575        with (virtualIdentityExtension.LIB) {
    76         if (vI.notificationBar) vI.notificationBar.dump("## identitySelector: getting value\n");
     76        MyLog.debug("## identitySelector: getting value\n");
    7777        var returnVal = "";
    7878        var listItems = this.childNodes;
    7979        for (var index = 0; index < listItems.length; index++) {
    80             if (vI.notificationBar) vI.notificationBar.dump("## identitySelector: getting value, '" + listItems[index].getAttribute("value") + "' '" + listItems[index].checked + "' '" + listItems[index].getAttribute("checked") + "'\n");
     80            MyLog.debug("## identitySelector: getting value, '" + listItems[index].getAttribute("value") + "' '" + listItems[index].checked + "' '" + listItems[index].getAttribute("checked") + "'\n");
    8181            if (!listItems[index].checked) returnVal += " :" + listItems[index].getAttribute("value") + ": "
    8282        }
    83         if (vI.notificationBar) vI.notificationBar.dump("## identitySelector: getting value, result '" + returnVal + "'\n");
     83        MyLog.debug("## identitySelector: getting value, result '" + returnVal + "'\n");
    8484        return returnVal;
    8585        }
  • content/prefDialog/vI_prefDialog.xul

    r67fe6b r021dbf  
    5454<script type="application/x-javascript"
    5555            src="chrome://v_identity/content/modules/vI_rdfDatasource.js" />
    56 <script type="application/x-javascript"
    57             src="chrome://v_identity/content/notificationbar/vI_notificationBar.js" />
    5856
    5957<stringbundleset id="stringbundleset">
     
    741739<label id="virtualIdentityExtension_extVersion" value="&vident.version;" hidden="true" />
    742740</hbox>
    743 <!--
    744     <splitter id="vIDebugBoxSplitter" hidden="true"/>
    745     <textbox id="vIDebugBox" hidden="true" multiline="true" readonly="true"
    746     DOMAttrModified="if(event.attrName == 'value') this.value = event.newValue; return true;"/>
    747         -->
     741<textbox id="vIDebugBox" />
    748742</dialog>
    749743</overlay>
  • content/vI_getHeader.js

    r67fe6b r021dbf  
    3030// XXX still missing implementation to select specific header by number and to display notification.
    3131Components.utils.import("resource://v_identity/stdlib/msgHdrUtils.js");
     32let Log = setupLogging("virtualIdentity.getHeader");
    3233
    3334// var storedHeaders = { };
     
    6970
    7071    getHeader: function() {
    71       vI.notificationBar.clear_dump();
    72       vI.notificationBar.dump("\n");
     72      clearDebugOutput();
     73      Log.debug("\n");
    7374     
    7475      if (!getHeader.headerToSearch) getHeader.prefObserverToSearchArray()
     
    7778        if (aHeaders.has("list-id")) {
    7879          getHeader.hdr.setStringProperty("vI_list-id","found");
    79           vI.notificationBar.dump("## getHeader: found header: list-id  ...stored to recognize mailing-list\n");
     80          Log.debug("## getHeader: found header: list-id  ...stored to recognize mailing-list\n");
    8081        }
    8182        if (aHeaders.has("received")) {
    8283          getHeader.hdr.setStringProperty("vI_received","found");
    83           vI.notificationBar.dump("## getHeader: found header: received  ...stored to recognize received mail\n");
     84          Log.debug("## getHeader: found header: received  ...stored to recognize received mail\n");
    8485        }
    8586        if (aHeaders.has("content-base")) {
    8687          getHeader.hdr.setStringProperty("vI_content_base","found");
    87           vI.notificationBar.dump("## getHeader: found header: content-base  ...stored to recognize blog/news-feed\n");
     88          Log.debug("## getHeader: found header: content-base  ...stored to recognize blog/news-feed\n");
    8889        }
    8990        for (let index = 0; index < getHeader.headerToSearch.length; index++) {
     
    9596            let storedValue = getHeader.hdr.getProperty("vI_" + headerNameToSearch);
    9697            let storedConvValue = getHeader.unicodeConverter.ConvertToUnicode(storedValue);
    97             vI.notificationBar.dump("## getHeader: found header: " + headerNameToSearch +
     98            Log.debug("## getHeader: found header: " + headerNameToSearch +
    9899                " - stored as '" + storedConvValue + "'\n");
    99100          }
     
    152153            getHeader.headerToSearch = null;
    153154           
    154             vI.notificationBar.dump("## prefObserver: reload Message\n");
     155            Log.debug("## prefObserver: reload Message\n");
    155156            MsgReload();
    156157        }
  • content/vI_getHeader.xul

    r67fe6b r021dbf  
    3737<script type="application/x-javascript" src="chrome://v_identity/content/_overlayNameSpaceWrapper.js" />
    3838<script type="application/x-javascript" src="chrome://v_identity/content/vI_getHeader.js"/>
    39 <script type="application/x-javascript" src="chrome://v_identity/content/notificationbar/vI_notificationBar.js"/>
    4039
    4140
     
    4544
    4645<vbox id="messagepanebox" >
    47     <splitter id="vIDebugBoxSplitter" hidden="true"/>
    48     <textbox id="vIDebugBox" hidden="true" multiline="true" readonly="true"
    49     DOMAttrModified="if(event.attrName == 'value') this.value = event.newValue; return true;"/>
     46  <textbox id="vIDebugBox" />
    5047</vbox>
    5148
  • content/vI_msgIdentityCloneTools.js

    r67fe6b r021dbf  
    2929
    3030    copySelectedIdentity : function(id_key) {
    31         vI.notificationBar.dump("## msgIdentityCloneTools: copySelectedIdentity\n");
     31        MyLog.debug("## msgIdentityCloneTools: copySelectedIdentity\n");
    3232        var msgIdentityElem = document.getElementById("msgIdentity");
    3333        var msgIdentityPopupElem = document.getElementById("msgIdentityPopup");
     
    4848        try { setSecuritySettings(1); enigSetMenuSettings(''); } catch(vErr) { };
    4949        if (!existingIdentity) {
    50             vI.notificationBar.dump("## msgIdentityCloneTools: signatureSwitch hide/remove signatures\n");
     50            MyLog.debug("## msgIdentityCloneTools: signatureSwitch hide/remove signatures\n");
    5151            // code to hide the text signature
    5252            try { if (msgIdentityCloneTools._pref.getBoolPref("hide_signature") && ss_signature.length == 0) {
    53                 vI.notificationBar.dump("## msgIdentityCloneTools: hide text/html signature");
     53                MyLog.debug("## msgIdentityCloneTools: hide text/html signature");
    5454                ss_main.signatureSwitch()
    55                 vI.notificationBar.dump("\n");
    56             } } catch(vErr) { vI.notificationBar.dump(" -- missing signatureSwitch extension?\n"); };
     55                MyLog.debug("\n");
     56            } } catch(vErr) { MyLog.debug(" -- missing signatureSwitch extension?\n"); };
    5757            // code to hide the sMime signature
    5858            try { if (msgIdentityCloneTools._pref.getBoolPref("hide_sMime_messageSignature")) {
    5959                var element = document.getElementById("menu_securitySign1");
    6060                if (element.getAttribute("checked") == "true") {
    61                     vI.notificationBar.dump("## signatureSwitch hide_sMime_messageSignature with doCommand\n");
     61                    MyLog.debug("## signatureSwitch hide_sMime_messageSignature with doCommand\n");
    6262                    element.doCommand();
    6363                }
     
    7878                    }
    7979                    if (skipChangeGPGsign)
    80                         vI.notificationBar.dump("## signatureSwitch skip hide_openPGP_messageSignature - EnigMail AlertWindow open\n");
     80                        MyLog.debug("## signatureSwitch skip hide_openPGP_messageSignature - EnigMail AlertWindow open\n");
    8181                    else {
    82                         vI.notificationBar.dump("## signatureSwitch hide_openPGP_messageSignature with doCommand\n");
     82                        MyLog.debug("## signatureSwitch hide_openPGP_messageSignature with doCommand\n");
    8383                        element.doCommand();
    8484                    }
     
    8989        }
    9090        else {
    91             vI.notificationBar.dump("## msgIdentityCloneTools: signatureSwitch restore signature\n");
     91            MyLog.debug("## msgIdentityCloneTools: signatureSwitch restore signature\n");
    9292            // code to show the text signature
    9393            try { if (ss_signature.length > 0) {
    94                 vI.notificationBar.dump("## msgIdentityCloneTools: show text/html signature");
     94                MyLog.debug("## msgIdentityCloneTools: show text/html signature");
    9595                ss_main.signatureSwitch()
    96                 vI.notificationBar.dump("\n");
    97             } } catch(vErr) { vI.notificationBar.dump(" -- missing signatureSwitch extension?\n"); };
     96                MyLog.debug("\n");
     97            } } catch(vErr) { MyLog.debug(" -- missing signatureSwitch extension?\n"); };
    9898            // sMime and openGPG signature will not be re-added automatically
    9999        }
     
    113113                var awType = awGetPopupElement(row).selectedItem.getAttribute("value");
    114114                if (awType == "addr_reply") {
    115                     vI.notificationBar.dump("## msgIdentityCloneTools: removed ReplyTo found in row " + row + "\n");
     115                    MyLog.debug("## msgIdentityCloneTools: removed ReplyTo found in row " + row + "\n");
    116116                    awDeleteRow(row--); // removed one line therefore decrease row-value
    117117                }
     
    123123        if (!document.getElementById("autoReplyToSelfLabel").hasAttribute("hidden")) {
    124124            awAddRecipient("addr_reply",document.getElementById("msgIdentity_clone").label);
    125             vI.notificationBar.dump("## msgIdentityCloneTools: added ReplyToSelf");
     125            MyLog.debug("## msgIdentityCloneTools: added ReplyToSelf");
    126126            document.getElementById("autoReplyToSelfLabel").setAttribute("hidden","true");
    127127        }
  • content/vI_rdfAccountMismatchDialog.xul

    r67fe6b r021dbf  
    3636    zlevel="6">
    3737    <script type="application/x-javascript" src="chrome://v_identity/content/_overlayNameSpaceWrapper.js" />
    38     <script type="application/x-javascript" src="chrome://v_identity/content/notificationbar/vI_notificationBar.js"/>
    3938    <script type="application/x-javascript" src="chrome://v_identity/content/vI_rdfAccountMismatchDialog.js" />
    4039   
  • content/vI_rdfDataEditor.xul

    r67fe6b r021dbf  
    4242<script type="application/x-javascript" src="chrome://v_identity/content/vI_storage.js" />
    4343<script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_helper.js" />
    44 <script type="application/x-javascript" src="chrome://v_identity/content/notificationbar/vI_notificationBar.js"/>
    4544<script type="application/x-javascript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
    4645
     
    8786    </groupbox>
    8887    </vbox>
    89     <splitter id="vIDebugBoxSplitter" hidden="true"/>
    90     <textbox id="vIDebugBox" hidden="true" multiline="true" readonly="true"
    91     DOMAttrModified="if(event.attrName == 'value') this.value = event.newValue; return true;"/>
    92 
     88    <textbox id="vIDebugBox" />
    9389</dialog>
  • content/vI_rdfDataTree.js

    r67fe6b r021dbf  
    5757    //this function is called every time the tree is sorted, filtered, or reloaded
    5858    loadTable : function() {
    59 //         if (vI.notificationBar) vI.notificationBar.dump("## rdfDataTree: loadTable.\n");
     59//         MyLog.debug("## rdfDataTree: loadTable.\n");
    6060        //remember scroll position. this is useful if this is an editable table
    6161        //to prevent the user from losing the row they edited
     
    9393        // set Tab label
    9494        this.tabElem.setAttribute("label", this.treeType + " (" + this.idTable.length + ")");
    95 //         if (vI.notificationBar) vI.notificationBar.dump("## rdfDataTree: loadTable done.\n");
     95//         MyLog.debug("## rdfDataTree: loadTable done.\n");
    9696    },
    9797
     
    106106                resource : resource,
    107107                identityData : localIdentityData}
    108 //      vI.notificationBar.dump("## addNewDatum.\n");
     108//      MyLog.debug("## addNewDatum.\n");
    109109        localIdentityData.extras.addPrefs(pref);
    110110        idData.push(pref);
    111111    },
    112112    sort : function(columnName) {
    113 //      vI.notificationBar.dump("## sort: " + columnName + ".\n");
     113//      MyLog.debug("## sort: " + columnName + ".\n");
    114114        var order = this.treeElem.getAttribute("sortDirection") == "ascending" ? 1 : -1;
    115115        //if the column is passed and it's already sorted by that column, reverse sort
  • content/vI_rdfDataTree.xul

    r67fe6b r021dbf  
    6363<script type="application/x-javascript" src="chrome://v_identity/content/_overlayNameSpaceWrapper.js" />
    6464<script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_helper.js" />
    65 <script type="application/x-javascript" src="chrome://v_identity/content/notificationbar/vI_notificationBar.js"/>
    6665<script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_identityData.js" />
    6766<script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_rdfDatasource.js" />
     
    308307<!-- <splitter /> -->
    309308<browser id="rdfDataTreeCollectionInfoBox" class="vI_htmlTextBox" type="chrome" cssSource="vI_rdfTreeInfo.css" disablehistory="true" onoverflow="virtualIdentityExtension.rdfDataTreeCollection.overflow();"/>
    310     <splitter id="vIDebugBoxSplitter" hidden="true"/>
    311     <textbox id="vIDebugBox" hidden="true" multiline="true" readonly="true"
    312     DOMAttrModified="if(event.attrName == 'value') this.value = event.newValue; return true;"/>
    313         <script type="application/x-javascript">dump('window rdfDataTreeCollection done ' + parseInt((new Date()).getTime()) + ' ' + virtualIdentityExtension.initTime + ' ' + virtualIdentityExtension.rdfDataTreeCollection + '\n');</script>
     309<textbox id="vIDebugBox" />
    314310</window>
  • content/vI_smartIdentity.js

    r67fe6b r021dbf  
    2424
    2525virtualIdentityExtension.ns(function() { with (virtualIdentityExtension.LIB) {
    26    
     26
     27Components.utils.import("resource://v_identity/vI_log.js");
     28
    2729var smartIdentity = {
    2830    _pref : Components.classes["@mozilla.org/preferences-service;1"]
     
    4143        var newsgroup = gMsgCompose.compFields.newsgroups;
    4244        var autocreate = false;
    43         if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: msgComposeTypeReference = " + gMsgCompose.type + "\n");
     45        MyLog.debug("## smartIdentity: msgComposeTypeReference = " + gMsgCompose.type + "\n");
    4446        switch (gMsgCompose.type) {
    4547            case msgComposeTypeReference.Reply:
     
    5052            case msgComposeTypeReference.ReplyWithTemplate:
    5153            case msgComposeTypeReference.ReplyToList:
    52                 if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: Reply\n");
     54                MyLog.debug("## smartIdentity: Reply\n");
    5355                msgHdr = smartIdentity.messenger.
    5456                    messageServiceFromURI(gMsgCompose.originalMsgURI).messageURIToMsgHdr(gMsgCompose.originalMsgURI);
     
    5860            case msgComposeTypeReference.Draft:
    5961            case msgComposeTypeReference.Template:
    60                 if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: Draft\n");
     62                MyLog.debug("## smartIdentity: Draft\n");
    6163                msgHdr = smartIdentity.messenger.
    6264                    messageServiceFromURI(gMsgCompose.compFields.draftId).messageURIToMsgHdr(gMsgCompose.compFields.draftId);
     
    6971            case msgComposeTypeReference.NewsPost:
    7072            case msgComposeTypeReference.MailToUrl:
    71                 if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: New Mail\n");
     73                MyLog.debug("## smartIdentity: New Mail\n");
    7274                smartIdentity._smartIdentityCollection = new vI.smartIdentityCollection(null, getCurrentIdentity(), document.getElementById("msgIdentity_clone").vid, newsgroup, this._getRecipients());   
    7375                // to enable composing new email with new identity: identity is hidden in subject line
     
    7577                var subject = gMsgCompose.compFields.subject.split(/\n/);
    7678                if (subject.length > 1 && subject[1] == "virtualIdentityExtension") {
    77                     if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: NewMail() found stored identity preset: " + subject[2] + "\n");
     79                    MyLog.debug("## smartIdentity: NewMail() found stored identity preset: " + subject[2] + "\n");
    7880                    smartIdentity._smartIdentityCollection.__parseHeadersWithArray(subject[2], smartIdentity._smartIdentityCollection._allIdentities);
    7981                    gMsgCompose.compFields.subject = subject[0];
     
    98100   
    99101    __smartIdentitySelection : function(autocreate) {
    100         if (vI.notificationBar) vI.notificationBar.dump("## __smartIdentitySelection autocreate=" + autocreate + "\n");
     102        MyLog.debug("## __smartIdentitySelection autocreate=" + autocreate + "\n");
    101103       
    102104        if (smartIdentity._pref.getBoolPref("idSelection_preferExisting")) {
    103105            var existingIDIndex = smartIdentity._smartIdentityCollection._foundExistingIdentity();
    104106            if (existingIDIndex) {
    105                 if (vI.notificationBar) vI.notificationBar.dump("## smartIdentity: found existing Identity, use without interaction.\n");
     107                MyLog.debug("## smartIdentity: found existing Identity, use without interaction.\n");
    106108                // add all Indentities to Clone Menu before selecting and leaving the function
    107109                document.getElementById("msgIdentity_clone").addIdentitiesToCloneMenu(smartIdentity._smartIdentityCollection._allIdentities);
     
    112114       
    113115        document.getElementById("msgIdentity_clone").addIdentitiesToCloneMenu(smartIdentity._smartIdentityCollection._allIdentities);
    114         if (vI.notificationBar) vI.notificationBar.dump("## __smartIdentitySelection smartIdentity._smartIdentityCollection._allIdentities.number=" +
     116        MyLog.debug("## __smartIdentitySelection smartIdentity._smartIdentityCollection._allIdentities.number=" +
    115117                smartIdentity._smartIdentityCollection._allIdentities.number +
    116118                " smartIdentity._pref.getBoolPref('idSelection_ask_always')=" +
     
    122124                || smartIdentity._smartIdentityCollection._allIdentities.number > 1)) {
    123125            for (var index = 0; index < smartIdentity._smartIdentityCollection._allIdentities.number; index++) {
    124                 if (vI.notificationBar) vI.notificationBar.dump("## smartIdentityReplyDialog index=" + index + ": '" + smartIdentity._smartIdentityCollection._allIdentities.identityDataCollection[index].combinedName + "' "
     126                MyLog.debug("## smartIdentityReplyDialog index=" + index + ": '" + smartIdentity._smartIdentityCollection._allIdentities.identityDataCollection[index].combinedName + "' "
    125127                    + "(" + smartIdentity._smartIdentityCollection._allIdentities.identityDataCollection[index].id.value + "," + smartIdentity._smartIdentityCollection._allIdentities.identityDataCollection[index].smtp.value + ")\n");
    126128            }
     
    136138   
    137139    changeIdentityToSmartIdentity : function(allIdentities, selectedValue) {
    138         if (vI.notificationBar) vI.notificationBar.dump("## changeIdentityToSmartIdentity selectedValue=" + selectedValue + " from " + allIdentities.number + "\n");
    139         if (vI.notificationBar) vI.notificationBar.dump("## changeIdentityToSmartIdentity selectedValue=" + selectedValue + ": '" + allIdentities.identityDataCollection[selectedValue].combinedName + "' "
     140        MyLog.debug("## changeIdentityToSmartIdentity selectedValue=" + selectedValue + " from " + allIdentities.number + "\n");
     141        MyLog.debug("## changeIdentityToSmartIdentity selectedValue=" + selectedValue + ": '" + allIdentities.identityDataCollection[selectedValue].combinedName + "' "
    140142            + "(" + allIdentities.identityDataCollection[selectedValue].id.value + "," + allIdentities.identityDataCollection[selectedValue].smtp.value + ")\n");
    141143        document.getElementById("msgIdentity_clone").selectedMenuItem = allIdentities.menuItems[selectedValue];
     
    144146            if (allIdentities.number > 1) label += " "
    145147                + vI.main.elements.strings.getString("vident.smartIdentity.moreThanOne");
    146             if (vI.notificationBar) vI.notificationBar.addNote(label + ".", "smart_reply_notification");
     148            addNote(label + ".", "smart_reply_notification");
    147149        }
    148150        smartIdentity.__removeSmartIdentityFromRecipients(allIdentities, selectedValue);
     
    187189                    awSetInputAndPopupValue(input, "", popup, "addr_to", -1);
    188190                    awCleanupRows()
    189                     if (vI.notificationBar) vI.notificationBar.addNote(" " +
     191                    addNote(" " +
    190192                        vI.main.elements.strings.getString("vident.smartIdentity.remRecipient"),
    191193                        "smart_reply_notification");
  • content/vI_storage.js

    r67fe6b r021dbf  
    3131
    3232Components.utils.import("resource://gre/modules/AddonManager.jsm");
     33Components.utils.import("resource://v_identity/vI_log.js");
     34
    3335
    3436var storage = {
     
    4446
    4547    clean: function() {
    46         vI.notificationBar.dump("## storage: clean.\n");
     48        MyLog.debug("## storage: clean.\n");
    4749        storage.multipleRecipients = null;
    4850        storage.lastCheckedEmail = {};
     
    5860    replacement_functions : {
    5961        awSetInputAndPopupValue : function (inputElem, inputValue, popupElem, popupValue, rowNumber) {
    60             vI.notificationBar.dump("## storage: awSetInputAndPopupValue '" + inputElem.id +"'\n");
     62            MyLog.debug("## storage: awSetInputAndPopupValue '" + inputElem.id +"'\n");
    6163            storage.original_functions.awSetInputAndPopupValue(inputElem, inputValue, popupElem, popupValue, rowNumber);
    6264            storage.updateVIdentityFromStorage(inputElem);
     
    6769        // only react on events triggered by addressCol2 - textinput Elements
    6870        if (!element || ! element.id.match(/^addressCol2*/)) return;
    69         vI.notificationBar.dump("\n## storage: awOnBlur '" + element.id +"'\n");
     71        MyLog.debug("\n## storage: awOnBlur '" + element.id +"'\n");
    7072        storage.updateVIdentityFromStorage(element);
    7173        storage.focusedElement = null;
     
    7880
    7981    awPopupOnCommand : function (element) {
    80         vI.notificationBar.dump("\n## storage: awPopupOnCommand'" + element.id +"'\n");
     82        MyLog.debug("\n## storage: awPopupOnCommand'" + element.id +"'\n");
    8183        storage.updateVIdentityFromStorage(document.getElementById(element.id.replace(/^addressCol1/,"addressCol2")));
    8284        if (element.selectedItem.getAttribute("value") == "addr_reply") // if reply-to is manually entered disable AutoReplyToSelf
     
    130132    updateVIdentityFromStorage: function(inputElement) {
    131133        if (!storage._pref.getBoolPref("storage"))
    132             { vI.notificationBar.dump("## storage: Storage deactivated\n"); return; }
    133         vI.notificationBar.dump("## storage: updateVIdentityFromStorage()\n");
     134            { MyLog.debug("## storage: Storage deactivated\n"); return; }
     135        MyLog.debug("## storage: updateVIdentityFromStorage()\n");
    134136
    135137        var recipientType = document.getElementById(inputElement.id.replace(/^addressCol2/,"addressCol1"))
     
    140142            if (storage.firstUsedInputElement == inputElement)
    141143                storage.firstUsedInputElement = null;
    142             vI.notificationBar.dump("## storage: field is a 'reply-to' or 'followup-to' or preconfigured 'doBcc'. not searched.\n")
     144            MyLog.debug("## storage: field is a 'reply-to' or 'followup-to' or preconfigured 'doBcc'. not searched.\n")
    143145            return;
    144146        }
    145147       
    146148        if (inputElement.value == "") {
    147             vI.notificationBar.dump("## storage: no recipient found, not checked.\n"); return;
     149            MyLog.debug("## storage: no recipient found, not checked.\n"); return;
    148150        }
    149151       
    150152        var row = inputElement.id.replace(/^addressCol2#/,"")
    151153        if (storage.lastCheckedEmail[row] && storage.lastCheckedEmail[row] == inputElement.value) {
    152             vI.notificationBar.dump("## storage: same email than before, not checked again.\n"); return;
     154            MyLog.debug("## storage: same email than before, not checked again.\n"); return;
    153155        }
    154156        storage.lastCheckedEmail[row] = inputElement.value;
     
    161163       
    162164        if (storageResult.identityCollection.number == 0) return; // return if there was no match
    163         vI.notificationBar.dump("## storage: updateVIdentityFromStorage result: " + storageResult.result + "\n");
     165        MyLog.debug("## storage: updateVIdentityFromStorage result: " + storageResult.result + "\n");
    164166        // found storageData, so store InputElement
    165167        if (!storage.firstUsedInputElement) storage.firstUsedInputElement = inputElement;
     
    168170        if (storageResult.result != "equal") {
    169171            for (var j = 0; j < storageResult.identityCollection.number; j++) {
    170                 vI.notificationBar.dump("## storage: updateVIdentityFromStorage adding: " + storageResult.identityCollection.identityDataCollection[j].combinedName + "\n");
     172                MyLog.debug("## storage: updateVIdentityFromStorage adding: " + storageResult.identityCollection.identityDataCollection[j].combinedName + "\n");
    171173                selectedMenuItem = document.getElementById("msgIdentity_clone").addIdentityToCloneMenu(storageResult.identityCollection.identityDataCollection[j])
    172174            }
    173175        }
    174176        if (storageResult.result == "accept") {
    175             vI.notificationBar.dump("## storage: updateVIdentityFromStorage selecting: " + storageResult.identityCollection.identityDataCollection[0].combinedName + "\n");
     177            MyLog.debug("## storage: updateVIdentityFromStorage selecting: " + storageResult.identityCollection.identityDataCollection[0].combinedName + "\n");
    176178            document.getElementById("msgIdentity_clone").selectedMenuItem = selectedMenuItem;
    177179            if (document.getElementById("msgIdentity_clone").vid)
    178                 vI.notificationBar.setNote(vI.main.elements.strings.getString("vident.smartIdentity.vIStorageUsage") + ".",
     180                setNote(vI.main.elements.strings.getString("vident.smartIdentity.vIStorageUsage") + ".",
    179181                    "storage_notification");
    180182        }
     
    189191        for (var index = 0; index < doBccArray.count; index++ ) {
    190192            if (doBccArray.StringAt(index) == awGetInputElement(row).value) {
    191                 vI.notificationBar.dump("## storage: ignoring doBcc field '" +
     193                MyLog.debug("## storage: ignoring doBcc field '" +
    192194                    doBccArray.StringAt(index) + "'.\n");
    193195                return true;
  • content/vI_storageExtras.js

    r67fe6b r021dbf  
    9090    loopForRDF : function(rdfDatasource, resource, type) {
    9191        for( var i = 0; i < this.extras.length; i++ ) {
    92 //          if (vI.notificationBar) vI.notificationBar.dump("## vI.rdfDatasource: loopForRDF " + rdfDatasource + "\n");
     92//          MyLog.debug("## vI.rdfDatasource: loopForRDF " + rdfDatasource + "\n");
    9393            // only if pref set and feature(element available) or for dataEditor
    9494            if (typeof(gMsgCompose) == "undefined" || !gMsgCompose || this.extras[i].active) {
     
    167167        for( var i = 0; i < this.extras.length; i++ ) {
    168168            if (this.extras[i].active) this.extras[i].readIdentityValue(identity)
    169 //          vI.notificationBar.dump("## storageExtras readIdentityValues "+ this.extras[i].field + "=" + this.extras[i].value + "\n");
     169//          MyLog.debug("## storageExtras readIdentityValues "+ this.extras[i].field + "=" + this.extras[i].value + "\n");
    170170        }
    171171    },
     
    174174        for( var i = 0; i < this.extras.length; i++ ) {
    175175            if (this.extras[i].active) this.extras[i].setValue()
    176 //          vI.notificationBar.dump("## storageExtras setValue "+ this.extras[i].field + "=" + this.extras[i].value + "\n");
     176//          MyLog.debug("## storageExtras setValue "+ this.extras[i].field + "=" + this.extras[i].value + "\n");
    177177        }
    178178    },
    179179    readValues : function() {
    180180        for( var i = 0; i < this.extras.length; i++ ) {
    181 //          vI.notificationBar.dump("## storageExtras preparing readValue "+ this.extras[i].field +"\n");
     181//          MyLog.debug("## storageExtras preparing readValue "+ this.extras[i].field +"\n");
    182182            if (this.extras[i].active) this.extras[i].readValue()
    183 //              vI.notificationBar.dump("## storageExtras readValue "+ this.extras[i].field + "=" + this.extras[i].value + "\n");
     183//              MyLog.debug("## storageExtras readValue "+ this.extras[i].field + "=" + this.extras[i].value + "\n");
    184184        }
    185185    },
     
    190190        for( var i = 0; i < this.extras.length; i++ ) {
    191191            this.extras[i].readEditorValue();
    192 //          vI.notificationBar.dump("## storageExtras readValue " + this.extras[i].field + "=" + this.extras[i].value + "\n");
     192//          MyLog.debug("## storageExtras readValue " + this.extras[i].field + "=" + this.extras[i].value + "\n");
    193193        }
    194194    },
     
    376376    // function to set or read the value from/to the MessageCompose Dialog
    377377    setValue : function() {
    378         vI.notificationBar.dump("## storageExtras_sMime_messageEncryption \n");
     378        MyLog.debug("## storageExtras_sMime_messageEncryption \n");
    379379        var doEncryptElem = document.getElementById("menu_securityEncryptRequire1");
    380380        if (this.value == null) return;
     
    458458
    459459        if ((element.getAttribute("checked") == "true") != (this.value == "true")) {
    460             vI.notificationBar.dump("## storageExtras change "+ this.field + " to " + this.value + " with doCommand\n");
     460            MyLog.debug("## storageExtras change "+ this.field + " to " + this.value + " with doCommand\n");
    461461            element.doCommand();
    462462        }
  • content/vI_upgrade.js

    r67fe6b r021dbf  
    4444
    4545    __initRequirements : function() {
    46         vI.notificationBar.dump("") // this initialises the debug-area
     46        MyLog.debug("") // this initialises the debug-area
    4747        upgrade.rdfDatasource = new vI.rdfDatasource("virtualIdentity.rdf", true);
    4848    },
     
    6767        // don't show the dialog if we do a one-step upgrade
    6868        if (upgrade.versionChecker.compare(extVersion, nextVersion) <= 0) {
    69             vI.notificationBar.dump("starting quick_upgrade.\n")
     69            MyLog.debug("starting quick_upgrade.\n")
    7070            upgrade.__initRequirements();
    7171            upgrade.__upgrade();
     
    9292
    9393    upgrade : function() {
    94         vI.notificationBar.dump("starting upgrade.\n\n")
     94        MyLog.debug("starting upgrade.\n\n")
    9595        document.getElementById("upgradeWizard").setAttribute("canAdvance", "false")
    9696        document.documentElement.getButton('next').setAttribute('disabled','true');
     
    9898        upgrade.__upgrade();
    9999   
    100         vI.notificationBar.dump("\n\nupgrade finished.\n");
     100        MyLog.debug("\n\nupgrade finished.\n");
    101101       
    102102        document.documentElement.getButton('next').setAttribute('disabled','false');
     
    106106    extUpgrade : function() {
    107107        var currentVersion = upgrade.rdfDatasource.getCurrentExtFileVersion();
    108         vI.notificationBar.dump("checking for previous version, found " +
     108        MyLog.debug("checking for previous version, found " +
    109109            currentVersion + "\nextension-upgrade required.\n")
    110110        switch (currentVersion) {
     
    117117        }
    118118        upgrade.rdfDatasource.storeExtVersion();
    119         vI.notificationBar.dump("extension-upgrade to " + upgrade.rdfDatasource.getCurrentExtFileVersion() + " done.\n\n");
     119        MyLog.debug("extension-upgrade to " + upgrade.rdfDatasource.getCurrentExtFileVersion() + " done.\n\n");
    120120    },
    121121   
     
    125125            .getBranch(null);
    126126       
    127         vI.notificationBar.dump("extension-upgrade __removeExtraAddedHeaders " + currentVersion + "\n");
     127        MyLog.debug("extension-upgrade __removeExtraAddedHeaders " + currentVersion + "\n");
    128128        if ((!currentVersion || upgrade.versionChecker.compare(currentVersion, "0.6.9") < 0) &&
    129129                prefroot.getCharPref("mailnews.headers.extraExpandedHeaders") != "") {
    130130            // clean extraExpandedHeaders once, because the whole header-saving and restoring was broken too long
    131             vI.notificationBar.dump("cleaning extraExpandedHeaders\n");
     131            MyLog.debug("cleaning extraExpandedHeaders\n");
    132132            prefroot.setCharPref("mailnews.headers.extraExpandedHeaders", "")
    133             vI.notificationBar.dump("cleaned extraExpandedHeaders\n");
     133            MyLog.debug("cleaned extraExpandedHeaders\n");
    134134        }
    135         vI.notificationBar.dump("extension-upgrade __removeExtraAddedHeaders done.\n\n");
     135        MyLog.debug("extension-upgrade __removeExtraAddedHeaders done.\n\n");
    136136    },
    137137   
     
    150150            if (!currentVersion || (upgrade.versionChecker.compare(currentVersion, transferPrefs[i].version) < 0)) {
    151151                // remove any obsolete preferences under extensions.virtualIdentity
    152                 vI.notificationBar.dump("transfer changed preferences of pre-" + transferPrefs[i].version + " release:\n")
     152                MyLog.debug("transfer changed preferences of pre-" + transferPrefs[i].version + " release:\n")
    153153                for each (transferPref in transferPrefs[i].prefs) {
    154154                    try {   upgrade.preferences.setBoolPref(transferPref.targetPref,
    155155                            upgrade.preferences.getBoolPref(transferPref.sourcePref));
    156156                        upgrade.preferences.clearUserPref(transferPref.sourcePref);
    157                         vI.notificationBar.dump(".")
     157                        MyLog.debug(".")
    158158                    }
    159159                    catch (e) { };
    160160                }
    161                 vI.notificationBar.dump("done.\n")
     161                MyLog.debug("done.\n")
    162162            }
    163163        }
     
    183183            if (!currentVersion || (upgrade.versionChecker.compare(currentVersion, obsoletePrefs[i].version) < 0)) {
    184184                // remove any obsolete preferences under extensions.virtualIdentity
    185                 vI.notificationBar.dump("removing obsolete preferences of pre-" + obsoletePrefs[i].version + " release:\n")
     185                MyLog.debug("removing obsolete preferences of pre-" + obsoletePrefs[i].version + " release:\n")
    186186                for each (pref in obsoletePrefs[i].prefs) {
    187                     try { upgrade.preferences.clearUserPref(pref); vI.notificationBar.dump(".") }
     187                    try { upgrade.preferences.clearUserPref(pref); MyLog.debug(".") }
    188188                    catch (e) { };
    189189                }
    190                 vI.notificationBar.dump("done.\n")
     190                MyLog.debug("done.\n")
    191191            }
    192192        }
  • content/vI_upgrade.xul

    r67fe6b r021dbf  
    4646<script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_identityData.js" />
    4747<script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_helper.js" />
    48 <script type="application/x-javascript" src="chrome://v_identity/content/notificationbar/vI_notificationBar.js"/>
    4948<script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_rdfDatasource.js" />   
    5049<script type="application/x-javascript" src="chrome://v_identity/content/vI_storageExtras.js" />
     
    8988        <groupbox>
    9089            <caption label="&vident.upgrade.upgrade.caption;"/>
    91             <textbox id="vIDebugBox" upgrade="true" multiline="true" readonly="true" />
     90            <textbox id="vIDebugBox" />
    9291        </groupbox>
    9392    </wizardpage>   
  • content/vI_upgradeOverlay.xul

    r67fe6b r021dbf  
    3838    <script type="application/x-javascript" src="chrome://v_identity/content/_overlayNameSpaceWrapper.js" />
    3939
    40     <script type="application/x-javascript" src="chrome://v_identity/content/notificationbar/vI_notificationBar.js"/>   
    4140    <script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_account.js" />
    4241    <script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_rdfDatasource.js" />
  • content/v_identity.js

    r67fe6b r021dbf  
    2424
    2525virtualIdentityExtension.ns(function() { with (virtualIdentityExtension.LIB) {
     26
    2627var main = {
    2728    preferences : Components.classes["@mozilla.org/preferences-service;1"]
     
    6364    ComposeStateListener : {
    6465        NotifyComposeBodyReady: function() {
    65             vI.notificationBar.dump("## v_identity: NotifyComposeBodyReady\n");
     66            MyLog.debug("## v_identity: NotifyComposeBodyReady\n");
    6667            main.initSystemStage2();
    6768        },
    6869        NotifyComposeFieldsReady: function() {
    69             vI.notificationBar.dump("## v_identity: NotifyComposeFieldsReady\n");
     70            MyLog.debug("## v_identity: NotifyComposeFieldsReady\n");
    7071        },
    7172        ComposeProcessDone: function(aResult) {
    72             vI.notificationBar.dump("## v_identity: StateListener reports ComposeProcessDone\n");
     73            MyLog.debug("## v_identity: StateListener reports ComposeProcessDone\n");
    7374            main.Cleanup(); // not really required, parallel handled by main.close
    7475            vI.storage.clean();
    7576        },
    7677        SaveInFolderDone: function(folderURI) {
    77             vI.notificationBar.dump("## v_identity: SaveInFolderDone\n");
     78            MyLog.debug("## v_identity: SaveInFolderDone\n");
    7879            main.Cleanup();
    7980            vI.storage.clean();
     
    8384    replacement_functions : {
    8485        FillIdentityList: function(menulist) {
    85             vI.notificationBar.dump("## v_identity: mod. FillIdentityList\n");
     86            MyLog.debug("## v_identity: mod. FillIdentityList\n");
    8687            var accounts = queryISupportsArray(main.accountManager.accounts,
    8788                                     Components.interfaces.nsIMsgAccount);
     
    135136            vI.storage.awOnBlur(vI.storage.focusedElement);
    136137
    137             vI.notificationBar.dump("\n## v_identity: VIdentity_GenericSendMessage\n");
     138            MyLog.debug("\n## v_identity: VIdentity_GenericSendMessage\n");
    138139           
    139140            if (msgType == Components.interfaces.nsIMsgCompDeliverMode.Now) { vI.msgIdentityCloneTools.addReplyToSelf(); }
     
    147148            if (returnValue.update == "abort") {
    148149                main.replacement_functions.GenericSendMessageInProgress = false;
    149                 vI.notificationBar.dump("## sending: --------------  aborted  ---------------------------------\n")
     150                MyLog.debug("## sending: --------------  aborted  ---------------------------------\n")
    150151                return;
    151152            }
     
    154155                    msgIdentityCloneElem.selectedMenuItem = msgIdentityCloneElem.addIdentityToCloneMenu(returnValue.storedIdentity);
    155156                    main.replacement_functions.GenericSendMessageInProgress = false;
    156                     vI.notificationBar.dump("## sending: --------------  aborted  ---------------------------------\n")
     157                    MyLog.debug("## sending: --------------  aborted  ---------------------------------\n")
    157158                    return;
    158159            }
     
    167168            else    main.Cleanup();
    168169            main.replacement_functions.GenericSendMessageInProgress = false;
    169             //          vI.notificationBar.dump("## v_identity: original_functions.GenericSendMessage done\n");
     170            //          MyLog.debug("## v_identity: original_functions.GenericSendMessage done\n");
    170171        },
    171172       
    172173        replace_FillIdentityList : function() {
    173             //~ vI.notificationBar.dump("## v_identity: replace FillIdentityList \n");
     174            //~ MyLog.debug("## v_identity: replace FillIdentityList \n");
    174175            main.original_functions.FillIdentityList = FillIdentityList;
    175176            FillIdentityList = main.replacement_functions.FillIdentityList;
     
    180181        window.removeEventListener('compose-window-reopen', main.reopen, true);
    181182        window.removeEventListener('compose-window-close', main.close, true);
    182         vI.notificationBar.dump("## v_identity: end. remove Account if there.\n")
     183        MyLog.debug("## v_identity: end. remove Account if there.\n")
    183184        main.Cleanup();
    184185        vI.storage.clean();
     
    204205        for (var index = 0; index < doBccArray.count; index++ ) {
    205206            if (doBccArray.StringAt(index) == awGetInputElement(row).value) {
    206                 vI.notificationBar.dump("## main _recipientIsDoBcc: ignoring doBcc field '" +
     207                MyLog.debug("## main _recipientIsDoBcc: ignoring doBcc field '" +
    207208                    doBccArray.StringAt(index) + "'.\n");
    208209                return true;
     
    217218        window.removeEventListener('compose-window-init', main.init, true);
    218219        if (main.elements.Area_MsgIdentityHbox) return; // init done before, (?reopen)
    219         vI.notificationBar.dump("\n## v_identity: init.\n")
     220        MyLog.debug("\n## v_identity: init.\n")
    220221        main.unicodeConverter.charset="UTF-8";
    221         if (!main.adapt_genericSendMessage()) { vI.notificationBar.dump("\n## v_identity: init failed.\n"); return; }
     222        if (!main.adapt_genericSendMessage()) { MyLog.debug("\n## v_identity: init failed.\n"); return; }
    222223       
    223224        main.adapt_interface();
     
    234235       
    235236        main.initSystemStage1();
    236         vI.notificationBar.dump("## v_identity: init done.\n\n")
     237        MyLog.debug("## v_identity: init done.\n\n")
    237238    },
    238239   
    239240    initSystemStage1 : function() {
    240         vI.notificationBar.dump("## v_identity: initSystemStage1.\n")
     241        MyLog.debug("## v_identity: initSystemStage1.\n")
    241242        main.gMsgCompose = gMsgCompose;
    242243        document.getElementById("msgIdentity_clone").init();
    243244        vI.statusmenu.init();
    244         vI.notificationBar.dump("## v_identity: initSystemStage1 done.\n")
     245        MyLog.debug("## v_identity: initSystemStage1 done.\n")
    245246    },
    246247   
    247248    initSystemStage2 : function() {
    248         vI.notificationBar.dump("## v_identity: initSystemStage2.\n")
     249        MyLog.debug("## v_identity: initSystemStage2.\n")
    249250        vI.msgIdentityCloneTools.initReplyTo();
    250251        vI.storage.init();
    251252        vI.smartIdentity.init();
    252         vI.notificationBar.dump("## v_identity: initSystemStage2 done.\n")
     253        MyLog.debug("## v_identity: initSystemStage2 done.\n")
    253254    },
    254255   
     
    286287    adapt_genericSendMessage : function() {
    287288        if (main.original_functions.GenericSendMessage) return true; // only initialize this once
    288         vI.notificationBar.dump("## v_identity: adapt GenericSendMessage\n");
     289        MyLog.debug("## v_identity: adapt GenericSendMessage\n");
    289290        main.original_functions.GenericSendMessage = GenericSendMessage;
    290291        GenericSendMessage = main.replacement_functions.GenericSendMessage;
     
    293294   
    294295    reopen: function() {
    295         vI.notificationBar.clear();
    296         vI.notificationBar.clear_dump();
    297         vI.notificationBar.dump("## v_identity: composeDialog reopened. (msgType " + gMsgCompose.type + ")\n")
     296        clearNote();
     297        clearDebugOutput();
     298        MyLog.debug("## v_identity: composeDialog reopened. (msgType " + gMsgCompose.type + ")\n")
    298299       
    299300        // clean all elements
    300301        document.getElementById("msgIdentity_clone").clean();
    301         vI.notificationBar.dump("## v_identity: everything cleaned.\n")
     302        MyLog.debug("## v_identity: everything cleaned.\n")
    302303       
    303304        // now (re)init the elements
     
    326327                gMsgCompose.RegisterStateListener(main.ComposeStateListener);
    327328        }
    328         vI.notificationBar.dump("## v_identity: reopen done.\n")
     329        MyLog.debug("## v_identity: reopen done.\n")
    329330    },
    330331   
     
    383384        observe : function(subject, topic, data) {
    384385            if (topic == "am-smtpChanges") {
    385                 vI.notificationBar.dump("## v_identity: smtp changes observed\n");
     386                MyLog.debug("## v_identity: smtp changes observed\n");
    386387                var msgIdentity_clone = document.getElementById("msgIdentity_clone");
    387388                document.getAnonymousElementByAttribute(msgIdentity_clone, "class", "smtpServerListHbox").refresh();
    388389            }
    389390            if (topic == "am-acceptChanges") {
    390                 vI.notificationBar.dump("## v_identity: account changes observed\n");
     391                MyLog.debug("## v_identity: account changes observed\n");
    391392                document.getElementById("msgIdentity_clone").clean();
    392393                document.getElementById("msgIdentity_clone").init();
  • content/v_identity.xul

    r67fe6b r021dbf  
    4848<script type="application/x-javascript" src="chrome://v_identity/content/vI_smartIdentity.js" />
    4949<script type="application/x-javascript" src="chrome://v_identity/content/vI_statusmenu.js" />
    50 <script type="application/x-javascript" src="chrome://v_identity/content/notificationbar/vI_notificationBar.js"/>
    5150<script type="application/x-javascript" src="chrome://v_identity/content/vI_storage.js"/>
    5251<script type="application/x-javascript" src="chrome://v_identity/content/vI_storageExtras.js"/>
     
    5857
    5958<vbox id="appcontent" >
    60     <splitter id="vIDebugBoxSplitter" hidden="true"/>
    61     <textbox id="vIDebugBox" hidden="true" multiline="true" readonly="true"
    62     DOMAttrModified="if(event.attrName == 'value') this.value = event.newValue; return true;"/>
     59  <textbox id="vIDebugBox" />
    6360</vbox>
    6461
  • skin/v_identity.css

    r67fe6b r021dbf  
    310310
    311311#vINotification {
    312   -moz-binding: url("chrome://v_identity/content/notificationbar/vI_notificationBar.xml#vI_notificationbox");
     312  -moz-binding: url("chrome://global/content/bindings/notification.xml#notificationbox");
    313313  -moz-box-orient: vertical;
    314314  overflow: hidden;
     
    316316
    317317#vINotification notification {
    318   -moz-binding: url("chrome://v_identity/content/notificationbar/vI_notificationBar.xml#vI_notification");
     318  -moz-binding: url("chrome://global/content/bindings/notification.xml#notification");
    319319}
    320320
     
    324324}
    325325
     326#vIDebugBox {
     327    -moz-binding: url("chrome://v_identity/content/bindings/vI_debugBox.xml#vI_debugBox");
     328}
     329
    326330#vIDebugBox, #vIErrorBox{
    327     overflow: auto;
    328     font-size: x-small;
    329     height: 10em;
     331    overflow: auto;
     332    font-size: x-small;
     333    height: 10em;
    330334}
    331335
    332336.identity_clone-menulist {
    333     -moz-binding: url(chrome://v_identity/content/bindings/v_identity.xml#fromMenuList_clone);
     337    -moz-binding: url("chrome://v_identity/content/bindings/v_identity.xml#fromMenuList_clone");
    334338    -moz-appearance: textfield;
    335339    margin: 2px 4px;
Note: See TracChangeset for help on using the changeset viewer.