Changeset 42929a


Ignore:
Timestamp:
Oct 27, 2007, 9:50:05 AM (14 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
35e142
Parents:
949c5e
Message:

added option to set Virtual Identity as Reply-To address (only working if vI-pref experimental is activated)

Files:
14 edited

Legend:

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

    r949c5e r42929a  
    122122   
    123123    // this LoadIdentity - oncommand is used by our clone MsgIdentity Menu
    124     // if VIdentity Extension is closed after the extension area was opened at least once,
    125124    // remove the Virtual Account if a different (usual) Account is choosen in the cloned dropdown-menu
    126125    LoadIdentity : function()
    127126    {
     127        vI_msgIdentityClone.cleanupReplyTo(true);
    128128        if (vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.selectedItem.value != "vid") {
    129129            vI_msgIdentityClone.copySelectedIdentity();
     
    137137            vI.helper.getAccountname(vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.selectedItem));
    138138        vI_msgIdentityClone.markAsNewAccount(vI_msgIdentityClone.isNewIdentity());
     139        vI_msgIdentityClone.searchReplyToRow();
    139140    },
    140141   
     
    160161        // compare Identity with existant ones and prepare Virtual-Identity if nonexistant found
    161162        vI_msgIdentityClone.markAsNewAccount(vI_msgIdentityClone.isNewIdentity());
     163    },
     164   
     165    replyToInputElem : null,
     166    replyToPopupElem : null,
     167    replyToStoredLastValue : null,
     168    replyToStoredInitValue : null,
     169    replyToSynchronize : true,
     170   
     171    searchReplyToRow : function() {
     172        if (!vI.preferences.getBoolPref("experimental")) return
     173        vI_notificationBar.dump("#X searchReplyToRow\n");
     174        for (var row = 1; row <= top.MAX_RECIPIENTS; row ++) {
     175            var recipientType = awGetPopupElement(row).selectedItem.getAttribute("value");
     176            if (recipientType == "addr_reply") {
     177                vI_notificationBar.dump("#X vI_msgIdentityClone: Reply-To found in row " + row + "\n");
     178                vI_msgIdentityClone.replyToPopupElem = document.getElementById("addressCol1#" + row)
     179                vI_msgIdentityClone.replyToInputElem = document.getElementById("addressCol2#" + row)
     180                vI_msgIdentityClone.replyToStoredInitValue = document.getElementById("addressCol2#" + row).value
     181                break;
     182                }
     183        }
     184        if (!vI_msgIdentityClone.replyToInputElem) vI_notificationBar.dump("#X vI_msgIdentityClone: no reply-to row found\n");
     185    },
     186   
     187    cleanupReplyTo : function(force) {
     188        if (!vI.preferences.getBoolPref("experimental")) return
     189        vI_notificationBar.dump("#X cleanupReplyTo\n");
     190        if  (vI_msgIdentityClone.replyToInputElem &&
     191                (vI_msgIdentityClone.replyToInputElem.value == vI_msgIdentityClone.replyToStoredLastValue)) {
     192                vI_notificationBar.dump("#X restore ReplyTo\n");
     193                vI_msgIdentityClone.replyToInputElem.value = vI_msgIdentityClone.replyToStoredInitValue
     194            }
     195        if (force) {
     196            vI_msgIdentityClone.replyToInputElem = null;
     197            vI_msgIdentityClone.replyToPopupElem = null;
     198            vI_msgIdentityClone.replyToStoredInitValue = null;
     199        }
     200        vI_msgIdentityClone.replyToStoredLastValue = null;
     201    },
     202   
     203    updateReplyTo : function(newIdentity) {
     204        if (!vI.preferences.getBoolPref("experimental")) return
     205        if (!vI.preferences.getBoolPref("autoReplyToSelf")) return
     206        vI_notificationBar.dump("#X updateReplyTo\n");
     207
     208        if (!vI_msgIdentityClone.replyToInputElem) {
     209            awAddRecipient("addr_reply",vI_msgIdentityClone.elements.Obj_MsgIdentityTextbox_clone.value)
     210            vI_msgIdentityClone.replyToPopupElem = document.getElementById("addressCol1#" + top.MAX_RECIPIENTS)
     211            vI_msgIdentityClone.replyToInputElem = document.getElementById("addressCol2#" + top.MAX_RECIPIENTS)
     212            vI_msgIdentityClone.replyToStoredInitValue = document.getElementById("addressCol2#" + top.MAX_RECIPIENTS).value
     213        }
     214        else {
     215            // check if reply-to field was changed individually, then stop adapting the field
     216            if ((vI_msgIdentityClone.replyToPopupElem.selectedItem.getAttribute("value") != "addr_reply") ||
     217                (vI_msgIdentityClone.replyToStoredLastValue &&
     218                vI_msgIdentityClone.replyToInputElem.value != vI_msgIdentityClone.replyToStoredLastValue)) {
     219                replyToSynchronize = false;
     220                vI_notificationBar.dump("#X vI_msgIdentityClone: (former) Reply-To entry changed, stop synchronizing\n");
     221            }
     222            else {
     223                vI_msgIdentityClone.replyToInputElem.value = vI_msgIdentityClone.elements.Obj_MsgIdentityTextbox_clone.value
     224                vI_msgIdentityClone.replyToStoredLastValue = vI_msgIdentityClone.replyToInputElem.value
     225            }
     226        }
    162227    },
    163228   
     
    193258                ss_main.signatureSwitch()
    194259            } catch(vErr) { };
     260            // set reply-to according to Virtual Identity
     261            vI_msgIdentityClone.updateReplyTo(newIdentity)
    195262        }
    196263        else {
     
    210277            try { if (ss_signature.length > 0) ss_main.signatureSwitch(); }
    211278            catch(vErr) { };
     279           
     280            vI_msgIdentityClone.cleanupReplyTo(false);
    212281        }
    213282    },
  • chrome/content/v_identity/vI_prefDialog.js

    r949c5e r42929a  
    6969                "VIdent_identity.aBook_warn_vI_replace",
    7070                "VIdent_identity.aBook_use_non_vI",
    71                 "VIdent_identity.aBook_notification"],
     71                "VIdent_identity.aBook_notification",
     72                "VIdent_identity.autoReplyToSelf"],
    7273   
    7374        init : function() {
     
    271272        vI_prefDialog.base.aBookConstraint(document.getElementById("VIdent_identity.aBook_use"));
    272273        vI_prefDialog.base.aBookCheckCounter();
     274       
     275        if (vI_prefDialog.preferences.getBoolPref("experimental")){
     276            document.getElementById("autoReplyToSelfSpacer").setAttribute("hidden", "false")
     277            document.getElementById("VIdent_identity.autoReplyToSelf").setAttribute("hidden", "false")
     278        }
     279       
    273280        dump("## vI_prefDialog: init_prefs done\n");
    274281    },
  • chrome/content/v_identity/vI_prefDialog.xul

    r949c5e r42929a  
    139139            <checkbox id="VIdent_identity.hide_signature" label="&vident.prefs.HideSignature.label;" disabled="true"
    140140                prefstring="hide_signature"/>
     141            <!-- experimental -->
     142            <spacer id="autoReplyToSelfSpacer" height="10px" hidden="true"/>
     143            <checkbox id="VIdent_identity.autoReplyToSelf" label="&vident.prefs.autoReplyToSelf.label;"
     144                prefstring="autoReplyToSelf" hidden="true"/>
     145            <!-- experimental -->
    141146            </groupbox>
    142147            </tabpanel>
  • chrome/content/v_identity/v_identity.js

    r949c5e r42929a  
    112112        NotifyComposeFieldsReady: function() {
    113113            vI_notificationBar.dump("## v_identity: NotifyComposeFieldsReady\n");
     114            vI_msgIdentityClone.searchReplyToRow();
    114115            vI_addressBook.init();
    115116            vI_smartIdentity.init();
  • chrome/locale/cs-CZ/v_identity/v_identity.dtd

    r949c5e r42929a  
    2929<!ENTITY vident.prefs.HideSignature.warning.desc "poznámka: pro aktivaci dynamického odstraňování podpisu je potřeba nainstalovat a aktivovat rozšíření &apos;Signature Switch&apos;. Nyní tato volba není dostupná.">
    3030<!ENTITY vident.prefs.HideSignature.label "při pouÅŸití virtuální identity odstranit podpis">
     31<!ENTITY vident.prefs.autoReplyToSelf.label "set Virtual Identity as Reply-To Address">
    3132<!ENTITY vident.prefs.vIdentityTab.fccTab.caption "při odeslání zprávy s Virtual Identity">
    3233<!ENTITY vident.prefs.vidFccAccount.label "SloÅŸka pouşívána účtem změněnÃœm Virtual Identity">
  • chrome/locale/de-DE/v_identity/v_identity.dtd

    r949c5e r42929a  
    2929<!ENTITY vident.prefs.HideSignature.warning.desc "Hinweis: Zur dynamischen Abschaltung der 'Signatur' muss die Erweiterung 'Signature Switch' installiert (und aktiviert) sein. Zur Zeit steht diese Option nicht zur VerfÃŒgung.">
    3030<!ENTITY vident.prefs.HideSignature.label "entferne eine 'Signatur' bei Nutzung einer Virtuellen IdentitÀt">
     31<!ENTITY vident.prefs.autoReplyToSelf.label "setze Virtuelle IdentitÀt als Reply-To Adresse">
    3132<!ENTITY vident.prefs.vIdentityTab.fccTab.caption "Beim Senden von Nachrichten automatisch">
    3233<!ENTITY vident.prefs.vidFccAccount.label "Ordner des Accounts, der durch Virtual Identity geÀndert wurde">
  • chrome/locale/en-US/v_identity/v_identity.dtd

    r949c5e r42929a  
    2929<!ENTITY vident.prefs.HideSignature.warning.desc "note: to enable dynamic deactivation of signatures you have to install (and activate) the 'Signature Switch' extension. By now this option is not available.">
    3030<!ENTITY vident.prefs.HideSignature.label "remove any 'Signatur' while using a Virtual Identity">
     31<!ENTITY vident.prefs.autoReplyToSelf.label "set Virtual Identity as Reply-To Address">
    3132<!ENTITY vident.prefs.vIdentityTab.fccTab.caption "while sending a message with a Virtual Identity">
    3233<!ENTITY vident.prefs.vidFccAccount.label "Folder used by Account changed with Virtual Identity">
  • chrome/locale/es-ES/v_identity/v_identity.dtd

    r949c5e r42929a  
    2929<!ENTITY vident.prefs.HideSignature.warning.desc "nota: para habilitar la desactivación dinámica de firmas tiene que instalar (y activar) la extensión &apos;Signature Switch&apos;. Por ahora, esta opción no está disponible.">
    3030<!ENTITY vident.prefs.HideSignature.label "eliminar cualquier firma cuando se use una identidad virtual">
     31<!ENTITY vident.prefs.autoReplyToSelf.label "set Virtual Identity as Reply-To Address">
    3132<!ENTITY vident.prefs.vIdentityTab.fccTab.caption "al enviar un mensaje usando una identidad virtual">
    3233<!ENTITY vident.prefs.vidFccAccount.label "Carpeta usada por la cuenta cambiada con Virtual Identity">
  • chrome/locale/fr-FR/v_identity/v_identity.dtd

    r949c5e r42929a  
    2929<!ENTITY vident.prefs.HideSignature.warning.desc "note: to enable dynamic deactivation of signatures you have to install (and activate) the 'Signature Switch' extension. By now this option is not available.">
    3030<!ENTITY vident.prefs.HideSignature.label "remove any 'Signatur' while using a Virtual Identity">
     31<!ENTITY vident.prefs.autoReplyToSelf.label "set Virtual Identity as Reply-To Address">
    3132<!ENTITY vident.prefs.vIdentityTab.fccTab.caption "Quand j&apos;envoie un message avec une identité virtuelle">
    3233<!ENTITY vident.prefs.vidFccAccount.label "Le dossier du compte modifié par Virtual Identity">
  • chrome/locale/it-IT/v_identity/v_identity.dtd

    r949c5e r42929a  
    2929<!ENTITY vident.prefs.HideSignature.warning.desc "Nota: per disattivare l&apos;inserimento automatico della firma, Ú necessario installare e attivare l&apos;estensione &apos;Signature Switch&apos;. Al momento questa opzione non Ú disponibile.">
    3030<!ENTITY vident.prefs.HideSignature.label "Rimuovi qualunque firma in occasione dell&apos;utilizzo di una identità virtuale">
     31<!ENTITY vident.prefs.autoReplyToSelf.label "set Virtual Identity as Reply-To Address">
    3132<!ENTITY vident.prefs.vIdentityTab.fccTab.caption "All&apos;invio di un messaggio con un&apos;identità virtuale">
    3233<!ENTITY vident.prefs.vidFccAccount.label "cartella utilizzata dall&apos;account sostituito da un&apos;identità virtuale">
  • chrome/locale/ko-KR/v_identity/v_identity.dtd

    r949c5e r42929a  
    3232<!ENTITY vident.prefs.HideSignature.label "가상 신원 사용 쀑 아묎 &apos;서ëª
    3333&apos;읎나 제거">
     34<!ENTITY vident.prefs.autoReplyToSelf.label "set Virtual Identity as Reply-To Address">
    3435<!ENTITY vident.prefs.vIdentityTab.fccTab.caption "while sending a message with a Virtual Identity">
    3536<!ENTITY vident.prefs.vidFccAccount.label "가상 신원윌로 계정 변겜시 폮더 사용">
  • chrome/locale/nl-NL/v_identity/v_identity.dtd

    r949c5e r42929a  
    2929<!ENTITY vident.prefs.HideSignature.warning.desc "Opmerking: Om dynamisch deactiveren van handtekeningen in te schakelen dient u de ‘Signature Switch’ extensie te installeren (en activeren). Op dit moment is deze optie niet beschikbaar.">
    3030<!ENTITY vident.prefs.HideSignature.label "Alle handtekeningen verwijderen bij gebruik van een virtuele identiteit">
     31<!ENTITY vident.prefs.autoReplyToSelf.label "set Virtual Identity as Reply-To Address">
    3132<!ENTITY vident.prefs.vIdentityTab.fccTab.caption "Bij het verzenden van een bericht met een virtuele identiteit">
    3233<!ENTITY vident.prefs.vidFccAccount.label "Door account gebruikte map wijzigen bij gebruik virtuele identiteit">
  • chrome/locale/sk-SK/v_identity/v_identity.dtd

    r949c5e r42929a  
    2929<!ENTITY vident.prefs.HideSignature.warning.desc "poznámka: pre zapnutie dynamického vypnutia podpisov je potrebné nainštalovať (a povoliť) rozšírenie &quot;Signature Switch&quot; . Inak táto voğba nie je dostupná.">
    3030<!ENTITY vident.prefs.HideSignature.label "Odstrániť kaşdÜ podpis pri pouşitÜ virtuálnej identity">
     31<!ENTITY vident.prefs.autoReplyToSelf.label "set Virtual Identity as Reply-To Address">
    3132<!ENTITY vident.prefs.vIdentityTab.fccTab.caption "Počas posielania správy s virtuálnou identitou">
    3233<!ENTITY vident.prefs.vidFccAccount.label "Priečinok pouşívanÜ účtom zmenenÜm virtuálnou identitou">
  • defaults/preferences/preferences.js

    r949c5e r42929a  
    3535pref("extensions.virtualIdentity.aBook_warn_vI_replace", true);
    3636pref("extensions.virtualIdentity.aBook_notification", true);
     37pref("extensions.virtualIdentity.experimental", false);
     38pref("extensions.virtualIdentity.autoReplyToSelf", false);
    3739pref("extensions.{dddd428e-5ac8-4a81-9f78-276c734f75b8}.description", "chrome://v_identity/locale/v_identity.properties");
Note: See TracChangeset for help on using the changeset viewer.