Changeset 94490a


Ignore:
Timestamp:
Aug 17, 2012, 6:21:26 PM (7 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
03d29f
Parents:
d0278d
Message:

replace reference to global variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/bindings/v_identity.xml

    rd0278d r94490a  
    371371        // if current SMTP is empty, take the one from current Identity
    372372        if (this.identityData.smtp.hasNoDefinedSMTP()) {
    373             this.identityData.smtp.key = gAccountManager.getIdentity(this.value).smtpServerKey;
     373            this.identityData.smtp.key = this._AccountManager.getIdentity(this.value).smtpServerKey;
    374374            document.getAnonymousElementByAttribute(this, "anonid", "smtpServerListHbox").smtp = this.identityData.smtp.keyNice;
    375375            this.checkForVirtualIdentity();
     
    381381        var MenuItems = this._msgIdentityPopupElem.childNodes
    382382        for (var index = 0; index < MenuItems.length; index++) {
    383             var identity = gAccountManager.getIdentity(MenuItems[index].getAttribute("value"));
     383            var identity = this._AccountManager.getIdentity(MenuItems[index].getAttribute("value"));
    384384           
    385385            var description;
    386             var server = gAccountManager.GetServersForIdentity(identity).QueryElementAt(0, Components.interfaces.nsIMsgIncomingServer);
     386            var server = this._AccountManager.GetServersForIdentity(identity).QueryElementAt(0, Components.interfaces.nsIMsgIncomingServer);
    387387            // if (server.type == "nntp")
    388388                description = server.prettyName
     
    479479            if (typeof(val) == "object") this.selectedItem = val
    480480            else if (val == "default")
    481                 this.selectedItem = this._getMenuItemForIdentity(gAccountManager.defaultAccount.defaultIdentity.key)
     481                this.selectedItem = this._getMenuItemForIdentity(this._AccountManager.defaultAccount.defaultIdentity.key)
    482482            else this.selectedItem = this._getMenuItemForIdentity(val)
    483483            this.doCommand();
     
    507507            return this._msgIdentityElem.selectedItem;
    508508        ]]></getter>
    509     </property>
     509    </property>
     510    <property name="_AccountManager" >
     511        <getter><![CDATA[
     512            return Components.classes["@mozilla.org/messenger/account-manager;1"]
     513              .getService(Components.interfaces.nsIMsgAccountManager);
     514        ]]></getter>
     515    </property>
    510516    <method name="blurEvent">
    511517            <body><![CDATA[
Note: See TracChangeset for help on using the changeset viewer.