Bug 748322 - Preffing of the chat feature doesn't disable the gloda IM integration, r=bienvenu.
authorFlorian Quèze <florian@queze.net>
Tue, 24 Apr 2012 16:31:08 +0200
changeset 11720 7d36cb752e09156f2814d3837bd1db8e3fa4dbb3
parent 11719 f93bfa99a73176e674940de03397cf956dd9369b
child 11721 8e416a0c96c266e4b646499e1abef6f74c834f06
push idunknown
push userunknown
push dateunknown
reviewersbienvenu
bugs748322
Bug 748322 - Preffing of the chat feature doesn't disable the gloda IM integration, r=bienvenu.
mail/components/im/content/chat-messenger-overlay.js
--- a/mail/components/im/content/chat-messenger-overlay.js
+++ b/mail/components/im/content/chat-messenger-overlay.js
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var imServices = {};
 Components.utils.import("resource:///modules/imServices.jsm", imServices);
 imServices = imServices.Services;
 
-Components.utils.import("resource:///modules/index_im.js");
 Components.utils.import("resource://gre/modules/FileUtils.jsm");
 
 var gBuddyListContextMenu = null;
 
 function buddyListContextMenu(aXulMenu) {
   this.target = aXulMenu.triggerNode;
   this.menu = aXulMenu;
   let localName = this.target.localName;
@@ -684,16 +683,18 @@ var chatHandler = {
       ["button-chat", "menu_goChat", "goChatSeparator",
        "imAccountsStatus", "newIMAccountMenuItem"].forEach(function(aId) {
          document.getElementById(aId).hidden = true;
        });
       document.getElementById("key_goChat").disabled = true;
       return;
     }
 
+    Components.utils.import("resource:///modules/index_im.js");
+
     // initialize the customizeDone method on the customizeable toolbar
     var toolbox = document.getElementById("chat-view-toolbox");
     toolbox.customizeDone = function(aEvent) {
       MailToolboxCustomizeDone(aEvent, "CustomizeChatToolbar");
     };
 
     let tabmail = document.getElementById("tabmail");
     tabmail.registerTabType(chatTabType);