Bug 748322 - Preffing of the chat feature doesn't disable the gloda IM integration, r=bienvenu, a=Standard8. BETA_BASE_20120424
authorFlorian Quèze <florian@queze.net>
Tue, 24 Apr 2012 16:34:54 +0200
changeset 11263 4b19ab70a4944bc40bbae726f6f6e5fcf1176e89
parent 11262 8a041705c46a7595a620d86a0139fdf817ab4d6a
child 11264 eb3115e755034513b377498c59d36638cf0f64f2
push idunknown
push userunknown
push dateunknown
reviewersbienvenu, Standard8
bugs748322
Bug 748322 - Preffing of the chat feature doesn't disable the gloda IM integration, r=bienvenu, a=Standard8.
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;
@@ -682,16 +681,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);