Changeset 6e0bee


Ignore:
Timestamp:
Nov 11, 2007, 5:16:32 PM (14 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
856c4e
Parents:
3de116
Message:

added feature to check the addressbook only for the first recipient and ignore different Virtual Identities (+small bugfix in vI_addresBook)

Files:
22 edited

Legend:

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

    r3de116 r6e0bee  
    163163            // directory will now be a subset of the addressbook containing only those cards that match the searchstring 'address'
    164164            if (!directory) break;
    165             var childCards = directory.childCards;
    166            
    167             var keepGoing = 1;
    168             try { childCards.first(); } catch (ex) { keepGoing = 0; }
     165            var childCards = null; var keepGoing = 1;
     166            try { childCards = directory.childCards; childCards.first(); } catch (ex) { keepGoing = 0; }
    169167           
    170168            while (keepGoing == 1) {
     
    269267    },
    270268   
     269    firstUsedInputElement : null,   // this stores the first Element for which a Lookup in the AddressBook was successfull
     270    firstUsedABookEntry : null, // stores the used ABook-entry to show a warning if the Identities differ
    271271    updateVIdentityFromABook: function(inputElement) {
    272272        if (!vI.preferences.getBoolPref("aBook_use")) {
     
    278278                    .selectedItem.getAttribute("value");
    279279        if (recipientType == "addr_reply" || recipientType == "addr_followup") {
     280            // reset firstUsedInputElement and firstUsedABookEntry if recipientType was changed
     281            if (vI_addressBook.firstUsedInputElement == inputElement) {
     282                vI_addressBook.firstUsedInputElement = null;
     283                vI_addressBook.firstUsedABookEntry = null;
     284            }
    280285            vI_notificationBar.dump("## vI_addressBook: field is a 'reply-to' or 'followup-to'. not searched.\n")
    281286            return;
    282287        }
     288       
    283289        var email = inputElement.value
    284290        if (email == "") {
     
    293299       
    294300        var Card = vI_addressBook.getCardForAddress(email); if (!Card) return;
     301       
     302        // found Card, so store InputElement
     303        if (!vI_addressBook.firstUsedInputElement) vI_addressBook.firstUsedInputElement = inputElement;
     304       
    295305        var addresses = vI_addressBook.readVIdentityFromCard(Card)
    296306       
    297307        if (addresses) {               
    298308            vI_notificationBar.dump("## vI_addressBook: compare with current Identity\n");
     309            if (vI_addressBook.firstUsedInputElement == inputElement)
     310                vI_addressBook.firstUsedABookEntry = addresses.fullABEntry[0]
     311            if (vI.preferences.getBoolPref("aBook_getOneOnly") && vI_addressBook.firstUsedInputElement &&
     312                vI_addressBook.firstUsedInputElement != inputElement) {
     313                vI_notificationBar.dump("## vI_addressBook: retrieved Identity for other recipient-field before. ignoring\n");
     314                if (vI_addressBook.firstUsedABookEntry != addresses.fullABEntry[0])
     315                    vI_notificationBar.setNote(vI.elements.strings.getString("vident.smartIdentity.vIaBookCollidingIdentity"),
     316                        "aBook_notification");
     317            }
    299318            // only update fields if new Identity is different than old one.
    300             if (!vI_addressBook.equalsCurrentIdentity(addresses)) {
     319            else if (!vI_addressBook.equalsCurrentIdentity(addresses)) {
    301320                var warning = vI.elements.strings.getString("vident.updateVirtualIdentity.warning1") +
    302321                            email +
  • chrome/content/v_identity/vI_prefDialog.js

    r3de116 r6e0bee  
    7171                "VIdent_identity.aBook_use_non_vI",
    7272                "VIdent_identity.aBook_notification",
     73                "VIdent_identity.aBook_getOneOnly",
    7374                "VIdent_identity.autoReplyToSelf"],
    7475   
     
    156157                "VIdent_identity.aBook_remove_entries",
    157158                "VIdent_identity.aBook_use_non_vI",
     159                "VIdent_identity.aBook_dont_update_multiple",
     160                "VIdent_identity.aBook_getOneOnly",
    158161                "aBookTab", "aBookTab1", "aBookTab2", "aBookTab3"];
    159162            for( var i = 0; i < elementIDs.length; i++ ) {
  • chrome/content/v_identity/vI_prefDialog.xul

    r3de116 r6e0bee  
    300300                <checkbox id="VIdent_identity.aBook_warn_vI_replace" label="&vident.prefs.aBook.warn_vI_replace.label;"
    301301                    prefstring="aBook_warn_vI_replace"/>
     302                <checkbox id="VIdent_identity.aBook_getOneOnly" label="&vident.prefs.aBook.get_One_Only.label;"
     303                    prefstring="aBook_getOneOnly"/>
    302304            </vbox>
    303305            </groupbox>
  • chrome/locale/cs-CZ/v_identity/v_identity.dtd

    r3de116 r6e0bee  
    6565<!ENTITY vident.prefs.aBook.show_switch.label "show switch to activate/deactivate saving of Identities">
    6666<!ENTITY vident.prefs.aBook.warn_vI_replace.label "ask before Virtual Identity in Sender-Field will be replaced">
     67<!ENTITY vident.prefs.aBook.get_One_Only.label "ignore Addressbook after first Virtual Identity was retrieved">
    6768<!ENTITY vident.prefs.aBookCap2.caption "Selection of Senders Identity">
    6869<!ENTITY vident.prefs.aBook.reply.desc "If you answer any emails and usage of Addressbook is activated together with 'Smart Reply', this is the place to configure if and how the found Identities will be used. Choosing in between the resulting Identities is done the same way as configured under 'Smart Reply'.">
  • chrome/locale/cs-CZ/v_identity/v_identity.properties

    r3de116 r6e0bee  
    1515vident.smartIdentity.vIUsage=jako odesilatele pouşívá virtuální identitu
    1616vident.smartIdentity.vIaBookUsage= using Virtual Identity from Addressbook as sender
     17vident.smartIdentity.vIaBookCollidingIdentity= New recipient has a different Virtual Identity stored in Addressbook. Ignored.
    1718vident.smartIdentity.ignoreRegExp=ignorují se neplatné regulární vÜrazy.
    1819vident.smartIdentity.matchExisting=nalezena odpovídající skutečná identita.
  • chrome/locale/de-DE/v_identity/v_identity.dtd

    r3de116 r6e0bee  
    6565<!ENTITY vident.prefs.aBook.show_switch.label "zeige Schalter zum Aktivieren/Deaktivieren der Speicherung">
    6666<!ENTITY vident.prefs.aBook.warn_vI_replace.label "frage nach, wenn im Sender-Feld eingetragene Virtuelle IdentitÀt ersetzt werden soll">
     67<!ENTITY vident.prefs.aBook.get_One_Only.label "ignoriere Adressbuch nachdem die erste Virtuelle IdentitÀt gefunden wurde">
    6768<!ENTITY vident.prefs.aBookCap2.caption "Auswahl der SendeindentitÀt">
    6869<!ENTITY vident.prefs.aBook.reply.desc "Wird auf emails geantwortet und ist die Nutzung des Adressbuchs gemeinsam mit 'Smart Reply' aktiviert, kann hier konfiguriert werden, ob und wie die gefundenen IdentitÀten genutzt werden. Die Übernahme der IdentitÀten als Sender erfolgt dabei genauso, wie unter 'Smart Reply' konfiguriert.">
  • chrome/locale/de-DE/v_identity/v_identity.properties

    r3de116 r6e0bee  
    1515vident.smartIdentity.vIUsage= benutze eine Virtuelle IdentitÀt als Sender
    1616vident.smartIdentity.vIaBookUsage= benutze eine Virtuelle IdentitÀt aus dem Addressbuch als Sender
     17vident.smartIdentity.vIaBookCollidingIdentity= Neuer EmpfÀnger hat eine andere Virtuelle IdentitÀt im Adressbuch gespeichert. Ignoriere diese.
    1718vident.smartIdentity.ignoreRegExp= ignoriere ungÌltigen regulÀren Ausdruck.
    1819vident.smartIdentity.matchExisting= passende vorhandene IdentitÀt gefunden.
  • chrome/locale/en-US/v_identity/v_identity.dtd

    r3de116 r6e0bee  
    6565<!ENTITY vident.prefs.aBook.show_switch.label "show switch to activate/deactivate saving of Identities">
    6666<!ENTITY vident.prefs.aBook.warn_vI_replace.label "ask before Virtual Identity in Sender-Field will be replaced">
     67<!ENTITY vident.prefs.aBook.get_One_Only.label "ignore Addressbook after first Virtual Identity was retrieved">
    6768<!ENTITY vident.prefs.aBookCap2.caption "Selection of Senders Identity">
    6869<!ENTITY vident.prefs.aBook.reply.desc "If you answer any emails and usage of Addressbook is activated together with 'Smart Reply', this is the place to configure if and how the found Identities will be used. Choosing in between the resulting Identities is done the same way as configured under 'Smart Reply'.">
  • chrome/locale/en-US/v_identity/v_identity.properties

    r3de116 r6e0bee  
    1515vident.smartIdentity.vIUsage= using Virtual Identity as sender
    1616vident.smartIdentity.vIaBookUsage= using Virtual Identity from Addressbook as sender
     17vident.smartIdentity.vIaBookCollidingIdentity= New recipient has a different Virtual Identity stored in Addressbook. Ignored.
    1718vident.smartIdentity.ignoreRegExp= ignoring invalid regular expression.
    1819vident.smartIdentity.matchExisting= found matching existent Identity.
  • chrome/locale/es-ES/v_identity/v_identity.dtd

    r3de116 r6e0bee  
    6565<!ENTITY vident.prefs.aBook.show_switch.label "mostrar selector para activar/desactivar la opción de guardar las identidades">
    6666<!ENTITY vident.prefs.aBook.warn_vI_replace.label "preguntar antes de reemplazar el campo remitente con la identidad virtual">
     67<!ENTITY vident.prefs.aBook.get_One_Only.label "ignore Addressbook after first Virtual Identity was retrieved">
    6768<!ENTITY vident.prefs.aBook.reply.desc "Si responde un correo y tiene activado el uso de la libreta de direcciones junto con la &apos;respuesta rápida&apos;, aquí puede configurar cómo se usarán las identidades que se encuentren.  La elección entre las identidades que se encuentren se hace del mismo modo que se haya configurado en la &apos;respuesta rápida&apos;.">
    6869<!ENTITY vident.prefs.aBook.use_for_smart_reply.label "usar las identidades de la libreta de direcciones junto con la &apos;respuesta rápida&apos;">
  • chrome/locale/es-ES/v_identity/v_identity.properties

    r3de116 r6e0bee  
    1515vident.smartIdentity.vIUsage=usar la identidad virtual como remitente
    1616vident.smartIdentity.vIaBookUsage=usar la identidad virtual de la libreta de direcciones como remitente
     17vident.smartIdentity.vIaBookCollidingIdentity= New recipient has a different Virtual Identity stored in Addressbook. Ignored.
    1718vident.smartIdentity.ignoreRegExp=ignorando expresión regular incorrecta.
    1819vident.smartIdentity.matchExisting=encontrada identidad existente con correspondencia.
  • chrome/locale/fr-FR/v_identity/v_identity.dtd

    r3de116 r6e0bee  
    6565<!ENTITY vident.prefs.aBook.show_switch.label "show switch to activate/deactivate saving of Identities">
    6666<!ENTITY vident.prefs.aBook.warn_vI_replace.label "ask before Virtual Identity in Sender-Field will be replaced">
     67<!ENTITY vident.prefs.aBook.get_One_Only.label "ignore Addressbook after first Virtual Identity was retrieved">
    6768<!ENTITY vident.prefs.aBookCap2.caption "Selection of Senders Identity">
    6869<!ENTITY vident.prefs.aBook.reply.desc "If you answer any emails and usage of Addressbook is activated together with 'Smart Reply', this is the place to configure if and how the found Identities will be used. Choosing in between the resulting Identities is done the same way as configured under 'Smart Reply'.">
  • chrome/locale/fr-FR/v_identity/v_identity.properties

    r3de116 r6e0bee  
    1515vident.smartIdentity.vIUsage=Utilisation de l'identité virtuelle comme expéditeur
    1616vident.smartIdentity.vIaBookUsage= using Virtual Identity from Addressbook as sender
     17vident.smartIdentity.vIaBookCollidingIdentity= New recipient has a different Virtual Identity stored in Addressbook. Ignored.
    1718vident.smartIdentity.ignoreRegExp=ignorer les expressions réguliÚres invalides.
    1819vident.smartIdentity.matchExisting=une identité existante coïncidente a été trouvée.
  • chrome/locale/it-IT/v_identity/v_identity.dtd

    r3de116 r6e0bee  
    6565<!ENTITY vident.prefs.aBook.show_switch.label "Mostra opzione per attivare/disattivare il salvataggio delle identità">
    6666<!ENTITY vident.prefs.aBook.warn_vI_replace.label "Chiedi conferma prima di sostituire il campo &apos;Mittente&apos; con un&apos;identità virtuale">
     67<!ENTITY vident.prefs.aBook.get_One_Only.label "ignore Addressbook after first Virtual Identity was retrieved">
    6768<!ENTITY vident.prefs.aBook.reply.desc "Queste opzioni permettono di configurare l&apos;utilizzo delle identità nel caso in cui si utilizzi la rubrica insieme a &apos;Smart Reply&apos;. La scelta tra le identità risultanti viene effettuata nella stessa maniera in cui Ú configurata &apos;Smart Reply&apos;.">
    6869<!ENTITY vident.prefs.aBook.use_for_smart_reply.label "Utilizza le identità della rubrica insieme a &apos;Smart Reply&apos;">
  • chrome/locale/it-IT/v_identity/v_identity.properties

    r3de116 r6e0bee  
    1515vident.smartIdentity.vIUsage=Verrà utilizzata l'identità virtuale per l'invio
    1616vident.smartIdentity.vIaBookUsage=Verrà utilizzata l'identità virtuale della rubrica per l'invio
     17vident.smartIdentity.vIaBookCollidingIdentity= New recipient has a different Virtual Identity stored in Addressbook. Ignored.
    1718vident.smartIdentity.ignoreRegExp=Verrà ignorata una espressione regolare non valida.
    1819vident.smartIdentity.matchExisting=Individuata identità corrispondente.
  • chrome/locale/ko-KR/v_identity/v_identity.dtd

    r3de116 r6e0bee  
    6868<!ENTITY vident.prefs.aBook.show_switch.label "show switch to activate/deactivate saving of Identities">
    6969<!ENTITY vident.prefs.aBook.warn_vI_replace.label "ask before Virtual Identity in Sender-Field will be replaced">
     70<!ENTITY vident.prefs.aBook.get_One_Only.label "ignore Addressbook after first Virtual Identity was retrieved">
    7071<!ENTITY vident.prefs.aBookCap2.caption "Selection of Senders Identity">
    7172<!ENTITY vident.prefs.aBook.reply.desc "If you answer any emails and usage of Addressbook is activated together with 'Smart Reply', this is the place to configure if and how the found Identities will be used. Choosing in between the resulting Identities is done the same way as configured under 'Smart Reply'.">
  • chrome/locale/ko-KR/v_identity/v_identity.properties

    r3de116 r6e0bee  
    1616vident.smartIdentity.vIUsage=발송읞에 가상 신원 사용하Ʞ
    1717vident.smartIdentity.vIaBookUsage= using Virtual Identity from Addressbook as sender
     18vident.smartIdentity.vIaBookCollidingIdentity= New recipient has a different Virtual Identity stored in Addressbook. Ignored.
    1819vident.smartIdentity.ignoreRegExp=유횚하지 않은 정규표현식 묎시
    1920vident.smartIdentity.matchExisting=음치하는 현졎하는 신원 ì°Ÿêž°
  • chrome/locale/nl-NL/v_identity/v_identity.dtd

    r3de116 r6e0bee  
    6565<!ENTITY vident.prefs.aBook.show_switch.label "Schakelaar om opslaan van identiteiten te activeren/deactiveren laten zien">
    6666<!ENTITY vident.prefs.aBook.warn_vI_replace.label "Vragen voordat de virtuele identiteit in het afzendersveld wordt vervangen">
     67<!ENTITY vident.prefs.aBook.get_One_Only.label "ignore Addressbook after first Virtual Identity was retrieved">
    6768<!ENTITY vident.prefs.aBook.reply.desc "Als u antwoordt op e-mailberichten en het gebruik van het adresboek is geactiveerd in combinatie met Slim Antwoorden kunt u hier instellen of en hoe aangetroffen identiteiten worden gebruikt. De keuze tussen de resulterende identiteiten wordt op dezelfde wijze gemaakt als ingesteld onder Slim Antwoorden.">
    6869<!ENTITY vident.prefs.aBook.use_for_smart_reply.label "Adresboekidentiteiten in combinatie met Slim Antwoorden gebruiken">
  • chrome/locale/nl-NL/v_identity/v_identity.properties

    r3de116 r6e0bee  
    1515vident.smartIdentity.vIUsage=virtuele identiteit wordt als afzender gebruikt
    1616vident.smartIdentity.vIaBookUsage=Virtuele identiteit in adresboek wordt gebruikt als afzender
     17vident.smartIdentity.vIaBookCollidingIdentity= New recipient has a different Virtual Identity stored in Addressbook. Ignored.
    1718vident.smartIdentity.ignoreRegExp=ongeldige reguliere expressie wordt genegeerd.
    1819vident.smartIdentity.matchExisting=identieke bestaande identiteit aangetroffen.
  • chrome/locale/sk-SK/v_identity/v_identity.dtd

    r3de116 r6e0bee  
    6565<!ENTITY vident.prefs.aBook.show_switch.label "Ukázať prepnutie zapnutia/vypnutia uloşenej totoşnosti">
    6666<!ENTITY vident.prefs.aBook.warn_vI_replace.label "SpÜtať sa pred nahradením Virtuálnej Identity v poli odosielateğa">
     67<!ENTITY vident.prefs.aBook.get_One_Only.label "ignore Addressbook after first Virtual Identity was retrieved">
    6768<!ENTITY vident.prefs.aBook.reply.desc "Ak odpovedáte na email a máte zapnutÜ Adresár spolu s &quot;rÜchlou odpoveďou&quot; mÎşete nastaviť koğko nájdenÜch Virtuálnych Identít bude pouşité.Choosing in between the resulting Identities is done the same way as configured under &apos;Smart Reply&apos;.">
    6869<!ENTITY vident.prefs.aBook.use_for_smart_reply.label "Pouşiť identitu z Adresára spolu s &quot;rÜchlou odpoveďou&quot;">
  • chrome/locale/sk-SK/v_identity/v_identity.properties

    r3de116 r6e0bee  
    1515vident.smartIdentity.vIUsage=Pouşiť Virtuálnu identitu ako odosielateğa
    1616vident.smartIdentity.vIaBookUsage=Pouşiť Virtuálnu Identitu z Adresára ako odosielateğa
     17vident.smartIdentity.vIaBookCollidingIdentity= New recipient has a different Virtual Identity stored in Addressbook. Ignored.
    1718vident.smartIdentity.ignoreRegExp=Ignorovať neplatné Regulárne vÜrazy
    1819vident.smartIdentity.matchExisting=Nájsť odpovedajúcu skutočnú totoşnosť.
  • defaults/preferences/preferences.js

    r3de116 r6e0bee  
    3636pref("extensions.virtualIdentity.aBook_warn_vI_replace", true);
    3737pref("extensions.virtualIdentity.aBook_notification", true);
     38pref("extensions.virtualIdentity.aBook_getOneOnly", true);
    3839pref("extensions.virtualIdentity.experimental", false);
    3940pref("extensions.virtualIdentity.autoReplyToSelf", false);
Note: See TracChangeset for help on using the changeset viewer.