Bug 1617960 - Add a favicon for the Account Manager tab. r=mkmelin
authorRichard Marti <richard.marti@gmail.com>, Khushil Mistry <khushil324@gmail.com>
Thu, 12 Mar 2020 21:41:35 +0200
changeset 38478 08098cce2d2c285c53519e1426d728faca0274ff
parent 38477 ef40d5b3cb731b7bd9e93a5ccaf34f4782d6f020
child 38479 e818b1aff9a84c8eec853acf7702536615944ac0
push id400
push userclokep@gmail.com
push dateMon, 04 May 2020 18:56:09 +0000
reviewersmkmelin
bugs1617960
Bug 1617960 - Add a favicon for the Account Manager tab. r=mkmelin
mail/base/content/specialTabs.js
mail/themes/shared/mail/tabmail.css
mailnews/base/prefs/content/accountUtils.js
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.js
@@ -1020,16 +1020,19 @@ var specialTabs = {
         duplicate: aPersistedState.duplicate,
         background: true,
       });
       if (aPersistedState.tabURI == "about:addons") {
         // Also in `openAddonsMgr` in mailCore.js.
         tab.browser.droppedLinkHandler = event =>
           tab.browser.contentWindow.gDragDrop.onDrop(event);
       }
+      if (aPersistedState.tabURI == "about:accountsettings") {
+        tab.tabNode.setAttribute("type", "accountManager");
+      }
     },
   },
 
   /**
    * Split a version number into a triple (major, minor, extension)
    * For example, 7.0.1 => [7, 0, 1]
    *             10.1a3 => [10, 1, a3]
    *             10.0 => [10, 0, ""]
--- a/mail/themes/shared/mail/tabmail.css
+++ b/mail/themes/shared/mail/tabmail.css
@@ -44,16 +44,20 @@
   z-index: 2;
 }
 
 .tabmail-tab[type="message"] {
   list-style-image: url("chrome://messenger/skin/icons/message.svg");
   -moz-image-region: auto;
 }
 
+.tabmail-tab[type="accountManager"] {
+  list-style-image: url("chrome://messenger/skin/icons/sidebar-left.svg");
+}
+
 .tabmail-tab[type="preferencesTab"] {
   list-style-image: url("chrome://mozapps/skin/extensions/utilities.svg");
 }
 
 .tabmail-tab[type="glodaSearch"] {
   list-style-image: url("chrome://messenger/skin/icons/search-glass.svg");
 }
 
--- a/mailnews/base/prefs/content/accountUtils.js
+++ b/mailnews/base/prefs/content/accountUtils.js
@@ -311,16 +311,28 @@ function MsgAccountManager(selectPage, a
     browser.contentDocument.documentElement.server = aServer;
     browser.contentDocument.documentElement.selectPage = selectPage;
   };
   tabmail.openTab("contentTab", {
     contentPage: "about:accountsettings",
     clickHandler: "specialTabs.aboutClickHandler(event);",
     onLoad,
   });
+
+  for (let tabInfo of tabmail.tabInfo) {
+    let tab = tabmail.getTabForBrowser(tabInfo.browser);
+    if (
+      tab &&
+      tab.urlbar &&
+      tab.urlbar.textContent == "about:accountsettings"
+    ) {
+      tab.tabNode.setAttribute("type", "accountManager");
+      break;
+    }
+  };
 }
 
 function loadInboxForNewAccount() {
   // gNewAccountToLoad is set in the final screen of the Account Wizard if a POP account
   // was created, the download messages box is checked, and the wizard was opened from the 3pane
   if (gNewAccountToLoad) {
     var rootMsgFolder = gNewAccountToLoad.incomingServer.rootMsgFolder;
     const kInboxFlag = Ci.nsMsgFolderFlags.Inbox;