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

Changeset c55313


Ignore:
Timestamp:
Aug 3, 2014, 12:58:03 PM (8 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
ee0ffd
Parents:
eca948
Message:

added option to search matching BaseIdentity? based on domain name

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • content/prefDialog/vI_prefDialog.js

    reca948 rc55313  
    8585                "VIdent_identity.smart_reply_defaultFullName",
    8686                "VIdent_identity.smart_reply_ignoreFullName",
     87                "VIdent_identity.smart_reply_searchBaseIdentity",
    8788                "VIdent_identity.autoTimestamp",
    8889                "VIdent_identity.autoTimeString",
  • content/prefDialog/vI_prefDialog.xul

    reca948 rc55313  
    225225                        prefstring="smart_reply_defaultFullName" size="20" /><spacer flex="1"/></vbox>
    226226                    </hbox>
     227                    <checkbox id="VIdent_identity.smart_reply_searchBaseIdentity" label="&vI_prefDialog.smartReply.searchBaseIdentity.label;"
     228                        prefstring="smart_reply_searchBaseIdentity" wrap="true" class="widthXX" />
    227229                </vbox>
    228230                </groupbox>
  • defaults/preferences/preferences.js

    reca948 rc55313  
    2323pref("extensions.virtualIdentity.smart_reply_added_extraHeaders", "");
    2424pref("extensions.virtualIdentity.smart_detectByReceivedHeader", true);
     25pref("extensions.virtualIdentity.smart_reply_searchBaseIdentity", true);
    2526pref("extensions.virtualIdentity.autoTimestamp", false);
    2627pref("extensions.virtualIdentity.autoString", "%l%t@%d");
  • locale/cs-CZ/vI_prefDialog.dtd

    reca948 rc55313  
    4646<!ENTITY vI_prefDialog.smartReply.ignoreFullname.label "při porovnání e-mailu s existujícími identitami ignorovat celé jméno">
    4747<!ENTITY vI_prefDialog.smartReply.defaultFullname.label "pokud k şádné nalezené e-mailové adrese není uvedeno jméno, pouşít následující:">
     48<!ENTITY vI_prefDialog.smartReply.searchBaseIdentity.label "use first persistent Identity with matching domain as Base Identity"> <!-- translate -->
    4849
    4950
  • locale/de-DE/vI_prefDialog.dtd

    reca948 rc55313  
    4646<!ENTITY vI_prefDialog.smartReply.ignoreFullname.label "ignoriere Namensangaben beim Vergleich der Email-Adressen mit vorhandenen IdentitÀten">
    4747<!ENTITY vI_prefDialog.smartReply.defaultFullname.label "falls kein Name zu einer Email-Adresse gefunden wurde, benutze folgenden Namen:">
     48<!ENTITY vI_prefDialog.smartReply.searchBaseIdentity.label "nutze erste permanente IdentitÀt mit passender Domain als Basis-IdentitÀt">
    4849
    4950
  • locale/en-US/vI_prefDialog.dtd

    reca948 rc55313  
    4646<!ENTITY vI_prefDialog.smartReply.ignoreFullname.label "ignore full name while comparing email addresses with existing identities">
    4747<!ENTITY vI_prefDialog.smartReply.defaultFullname.label "if there is no name to any found email-address, use the following one:">
    48 
     48<!ENTITY vI_prefDialog.smartReply.searchBaseIdentity.label "use first persistent Identity with matching domain as Base Identity">
    4949
    5050<!ENTITY vI_prefDialog.idSelection.Cell0.label "Virtual Identity Usage">
  • locale/es-ES/vI_prefDialog.dtd

    reca948 rc55313  
    4646<!ENTITY vI_prefDialog.smartReply.ignoreFullname.label "ignorar los nombres completos al comparar las direcciones de correo con las identidades existentes">
    4747<!ENTITY vI_prefDialog.smartReply.defaultFullname.label "si no hay nombres en las direcciones encontradas, usar el siguiente:">
     48<!ENTITY vI_prefDialog.smartReply.searchBaseIdentity.label "use first persistent Identity with matching domain as Base Identity"> <!-- translate -->
    4849
    4950
  • locale/fr/vI_prefDialog.dtd

    reca948 rc55313  
    4646<!ENTITY vI_prefDialog.smartReply.ignoreFullname.label "ignorer le nom complet lors de la comparaison des adresses courriel avec les identités existantes">
    4747<!ENTITY vI_prefDialog.smartReply.defaultFullname.label "Si aucune adresse courriel trouvée ne contient un nom, utiliser le nom suivant :">
     48<!ENTITY vI_prefDialog.smartReply.searchBaseIdentity.label "use first persistent Identity with matching domain as Base Identity"> <!-- translate -->
    4849
    4950
  • locale/nl/vI_prefDialog.dtd

    reca948 rc55313  
    4646<!ENTITY vI_prefDialog.smartReply.ignoreFullname.label "Volledige naam bij vergelijken van e-mailadressen met bestaande identiteiten negeren">
    4747<!ENTITY vI_prefDialog.smartReply.defaultFullname.label "Als er geen naam bij een gevonden e-mailadres staat de volgende gebruiken:">
     48<!ENTITY vI_prefDialog.smartReply.searchBaseIdentity.label "use first persistent Identity with matching domain as Base Identity"> <!-- translate -->
    4849
    4950
  • locale/ru-RU/vI_prefDialog.dtd

    reca948 rc55313  
    7979<!ENTITY vI_prefDialog.smartReply.defaultFullname.label "ПрО ПтсутствОО ОЌеМ у пПлучеММыÑ
    8080 E-mail аЎресПв, ОспПльзПвать ОЌя:">
     81<!ENTITY vI_prefDialog.smartReply.searchBaseIdentity.label "use first persistent Identity with matching domain as Base Identity"> <!-- translate -->
    8182
    8283
  • modules/vI_identityData.js

    reca948 rc55313  
    180180    },
    181181   
    182     equals : function(compareIdentityData) {
     182    // dependent on MsgComposeCommands, should/will only be called in ComposeDialog
     183    hasMatchingDomainIdentity : function() {
     184        Log.debug("hasMatchingDomainIdentity");
     185       
     186        var domainArray = this.email.match(/@[^@]+$/);
     187        if (!domainArray) {
     188            Log.debug("hasMatchingDomainIdentity found no domain for email " + this.email);
     189            return;
     190        }
     191        Log.debug("hasMatchingDomainIdentity searching for domain " + domainArray[0]);
     192       
     193        var accounts = getAccountsArray();
     194        for (let acc = 0; acc < accounts.length; acc++) {
     195            let account = accounts[acc];
     196            try { prefroot.getBoolPref("mail.account."+account.key+".vIdentity"); continue; } catch (e) { };
     197            let identities = getIdentitiesArray(account);
     198            for (let i = 0; i < identities.length; i++) {
     199                let identity = identities[i];
     200                var idDomainArray = identity.email.match(/@[^@]+$/);
     201                if (!idDomainArray) continue;
     202//                 Log.debug("comp: domain.toLowerCase()='" + domainArray[0].toLowerCase() + "' idDomain.toLowerCase()='" + idDomainArray[0].toLowerCase() + "'");
     203                if (domainArray[0].toLowerCase() == idDomainArray[0].toLowerCase()) {
     204                        // if domain matches, everything is perfect!
     205                        Log.debug("hasMatchingDomainIdentity: found matching id for domain '" + domainArray[0] + "'");
     206                        return identity.key; // return key and stop searching
     207                }
     208            }
     209        }
     210        Log.debug("hasMatchingDomainIdentity: '" + domainArray[0] + "' not found");
     211        return null;
     212    },
     213
     214    equals : function(compareIdentityData) {
    183215        this.comp.compareID = compareIdentityData;
    184216
  • modules/vI_smartIdentityCollection.js

    reca948 rc55313  
    393393                }
    394394            }
     395           
     396            /* smart_reply_searchBaseIdentity: compare email with other Identities          */
     397            /* to find matching domain. Use first found as base identity (smtp etc) */
     398            if (vIprefs.get("smart_reply_searchBaseIdentity")) {
     399                Log.debug("compare domain name with existing accounts.")
     400           
     401                for (var index = 0; index < this._allIdentities.number; index++) {
     402                    var idKey = this._allIdentities.identityDataCollection[index].hasMatchingDomainIdentity();
     403                    if (idKey) {
     404                        Log.debug("use id with matching domain as base ID");
     405                        this._allIdentities.identityDataCollection[index].id.key = idKey;
     406                    }
     407                }               
     408            }
     409           
    395410        }
    396411        else Log.debug("SmartReply skipped. No Header-information found.");
Note: See TracChangeset for help on using the changeset viewer.