Changeset a2f8236


Ignore:
Timestamp:
Feb 2, 2010, 1:44:20 PM (10 years ago)
Author:
rene <rene@…>
Branches:
multiEdit, ng_0.6, ng_0.8, ng_0.9
Children:
b14c0f
Parents:
baca9e
Message:

ensure that new identity is changed before GenericSendMessage? is called

Location:
chrome
Files:
2 edited

Legend:

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

    rbaca9e ra2f8236  
    178178            vI.replacement_functions.GenericSendMessageInProgress = false;
    179179//          vI_notificationBar.dump("## v_identity: original_functions.GenericSendMessage\n");
    180             vI.original_functions.GenericSendMessage(msgType);
    181 
     180
     181            // final check if eyerything is nice before we handover to the real sending...
     182            var virtualIdentityData = document.getElementById("msgIdentity_clone").identityData;
     183            var currentIdentity = getCurrentIdentity();
     184            if (    currentIdentity.fullName == virtualIdentityData.fullName    &&
     185                currentIdentity.email == virtualIdentityData.email      &&
     186                currentIdentity.smtpServerKey == virtualIdentityData.smtp.keyNice   ) {
     187                    vI.original_functions.GenericSendMessage(msgType);
     188            }
     189            else {
     190                alert(vI.elements.strings.getString("vident.genericSendMessage.error"));
     191            }
    182192//          vI_notificationBar.dump("## v_identity: original_functions.GenericSendMessage done\n");
    183193        },
     
    212222        vI_notificationBar.dump("\n## v_identity: init.\n")
    213223        vI.unicodeConverter.charset="UTF-8";
     224        if (!vI.adapt_genericSendMessage()) { vI_notificationBar.dump("\n## v_identity: init failed.\n"); return; }
    214225        vI.adapt_interface();
    215         vI.adapt_genericSendMessage();
    216226        gMsgCompose.RegisterStateListener(vI.ComposeStateListener);
    217227        document.getElementById("vI_tooltipPopupset")
     
    270280   
    271281    adapt_genericSendMessage : function() {
    272         if (vI.original_functions.GenericSendMessage) return; // only initialize this once
     282        if (vI.original_functions.GenericSendMessage) return true; // only initialize this once
    273283        vI_notificationBar.dump("## v_identity: adapt GenericSendMessage\n");
    274284        vI.original_functions.GenericSendMessage = GenericSendMessage;
    275285        GenericSendMessage = vI.replacement_functions.GenericSendMessage;
     286        return true;
    276287    },
    277288   
  • chrome/locale/en-US/v_identity/v_identity.properties

    rbaca9e ra2f8236  
    22vident.sendLater.prefix= Replace Virtual Identity with Default Identity (
    33vident.sendLater.postfix= ) ?
     4
     5vident.genericSendMessage.error=Virtual Identity Error: Can't change Identity before Sending.\nPlease report at https://add-on-it.de/virtual-id/newticket
    46
    57vident.updateStorage.title=You already have a Virtual Identity stored for this recipient.
Note: See TracChangeset for help on using the changeset viewer.