Changeset 70bc5b


Ignore:
Timestamp:
Sep 2, 2008, 2:11:17 PM (13 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
1a3f53
Parents:
88712e
Message:

sometimes gAccountManager is not ready, so use local one instead

File:
1 edited

Legend:

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

    r88712e r70bc5b  
    3838        Obj_MsgIdentityTextbox_clone : null
    3939    },
    40    
     40
     41    AccountManager : Components.classes["@mozilla.org/messenger/account-manager;1"]
     42        .getService(Components.interfaces.nsIMsgAccountManager),
     43
     44
    4145    init : function() {
    4246        var reopen = vI_msgIdentityClone.elements.Obj_MsgIdentity;
     
    99103        // Identitys might have IdentityName set differently to 'name <email>',
    100104        // so retrieve name and email directly from Identity
    101         var identity = gAccountManager.getIdentity(vI_msgIdentityClone.elements.Obj_MsgIdentity.selectedItem.getAttribute("value"))
     105        var identity = vI_msgIdentityClone.AccountManager.getIdentity(vI_msgIdentityClone.elements.Obj_MsgIdentity.selectedItem.getAttribute("value"))
    102106        var label = identity.getUnicharAttribute("fullName") + " <" + identity.getUnicharAttribute("useremail") + ">"
    103107        vI_msgIdentityClone.elements.Obj_MsgIdentity_clone.setAttribute("label", label);
     
    105109   
    106110    resetMenuToDefault : function () {
    107         vI_msgIdentityClone.setMenuToIdentity(gAccountManager.defaultAccount.defaultIdentity.key);
     111        vI_msgIdentityClone.setMenuToIdentity(vI_msgIdentityClone.AccountManager.defaultAccount.defaultIdentity.key);
    108112    },
    109113
     
    227231            // Identitys might have IdentityName set differently to 'name <email>',
    228232            // so retrieve name and email directly from Identity
    229             var identity = gAccountManager.getIdentity(vI_msgIdentityClone.elements.Obj_MsgIdentity.selectedItem.getAttribute("value"))
     233            var identity = vI_msgIdentityClone.AccountManager.getIdentity(vI_msgIdentityClone.elements.Obj_MsgIdentity.selectedItem.getAttribute("value"))
    230234            label = identity.getUnicharAttribute("fullName") + " <" + identity.getUnicharAttribute("useremail") + ">"
    231235        }
     
    319323
    320324        vI_notificationBar.dump("## vI_msgIdentityClone: initReplyToFields id=" + id + "\n");
    321         var replyTo = gAccountManager.getIdentity(id).replyTo
     325        var replyTo = vI_msgIdentityClone.AccountManager.getIdentity(id).replyTo
    322326        vI_notificationBar.dump("## vI_msgIdentityClone: initReplyToFields identity.replyTo: " + replyTo + "\n");
    323327        if (replyTo == "") return
Note: See TracChangeset for help on using the changeset viewer.