Bug 814414 - Menu entries for chat still shown in AppMenu when mail.chat.enabled set to false. r=florian, a=mbanner
authorRichard Marti <richard.marti@gmail.com>
Fri, 23 Nov 2012 19:43:40 +0100
changeset 13584 66343c7d1323f1fb927eb6dbd7255008cd575de9
parent 13583 359ef8f9ace5e559b0426e6e0c6830b8109e72ae
child 13585 fea4edb68f01c52c8c65cb62598d38a8eb24b6af
push id16
push userryanvm@gmail.com
push dateThu, 13 Dec 2012 22:40:39 +0000
reviewersflorian, mbanner
bugs814414
Bug 814414 - Menu entries for chat still shown in AppMenu when mail.chat.enabled set to false. r=florian, a=mbanner DONTBUILD
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
@@ -320,22 +320,18 @@ var chatHandler = {
     let convDeck = document.getElementById("conversationsDeck");
     let panel = convDeck.selectedPanel;
     if (panel && panel.localName == "imconversation")
       panel.onConvResize();
   },
 
   setStatusMenupopupCommand: function(aEvent) {
     let target = aEvent.originalTarget;
-    if (target.getAttribute("id") == "imStatusShowAccounts") {
-      openIMAccountMgr();
-      return;
-    }
-
-    if (target.getAttribute("id") == "appmenu_imStatusShowAccounts") {
+    if (target.getAttribute("id") == "imStatusShowAccounts" ||
+        target.getAttribute("id") == "appmenu_imStatusShowAccounts") {
       openIMAccountMgr();
       return;
     }
 
     let status = target.getAttribute("status");
     if (!status)
       return; // Can status really be null? Maybe because of an add-on...
 
@@ -971,17 +967,18 @@ var chatHandler = {
   _removeObservers: function() {
     for each (let topic in this._observedTopics)
       imServices.obs.removeObserver(this, topic);
   },
   init: function() {
     if (!Services.prefs.getBoolPref("mail.chat.enabled")) {
       ["button-chat", "menu_goChat", "goChatSeparator",
        "imAccountsStatus", "joinChatMenuItem", "newIMAccountMenuItem",
-       "newIMContactMenuItem", "appmenu_joinChatMenuItem",
+       "newIMContactMenuItem", "appmenu_joinChatMenuItem", "appmenu_afterChatSeparator",
+       "appmenu_goChat", "appmenu_imAccountsStatus", "appmenu_goChatSeparator",
        "appmenu_newIMAccountMenuItem", "appmenu_newIMContactMenuItem"].forEach(function(aId) {
          let elt = document.getElementById(aId);
          if (elt)
            elt.hidden = true;
        });
       document.getElementById("key_goChat").disabled = true;
       return;
     }