Closed Bug 1617960 Opened 5 years ago Closed 5 years ago

Add a favicon for the Account Manager tab

Categories

(Thunderbird :: Account Manager, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 76.0

People

(Reporter: Paenglab, Assigned: Paenglab)

Details

Attachments

(1 file, 2 obsolete files)

With the Account Manager in tab we should add a favicon to better differentiate to other tabs and give a better recognition of the tab.

I tried to add to the accountManager.xhtml a <link rel="shortcut icon" href="path/to/icon"/> but this didn't work. It seems the content tab don't support this.

Khushil, is it somehow possible to give the AM tab a attribute like type="AccountManager" like we have for other tabs? Then we could assign a icon through CSS .

Flags: needinfo?(khushil324)

We can search for a tab here just as below: https://searchfox.org/comm-central/source/mailnews/base/prefs/content/accountUtils.js#320

for (let tabInfo of tabmail.tabInfo) {
    let tab = tabmail.getTabForBrowser(tabInfo.browser);
    if (tab && tab.urlbar && tab.urlbar.textContent == "about:accountsettings") {
      tab.setAttriubte("type", "AccountManager");
      break;
    }
}
Flags: needinfo?(khushil324)

Thanks. I needed to change the if () to

if (
  tab &&
  tab.urlbar &&
  tab.urlbar.textContent == "about:accountsettings"
)

But now I get tab.setAttribute is not a function.

Please can you help here?

(In reply to Richard Marti (:Paenglab) from comment #2)

But now I get tab.setAttribute is not a function.

Please can you help here?

It will be: tab.tabNode.setAttribute("type", "AccountManager");

Any updates on this?

(In reply to Khushil Mistry [:khushil324] from comment #4)

Any updates on this?

Yes, this one works when opening the AM. But when starting TB with with a open AM tab it doesn't get the icon.

Any hints where the code should be placed to work with am already opened AM tab on startup? Or do we say it's unlikely that this tab stays open for long time?

Assignee: nobody → richard.marti
Attachment #9132795 - Flags: feedback?(mkmelin+mozilla)
Attachment #9132795 - Flags: feedback?(khushil324)

(Sorry, I don't have anything to add atm.)

Attachment #9132795 - Flags: feedback?(mkmelin+mozilla) → feedback+

I checked this. It is working. For the issue during the restoration of the tabs, I have added an if-condition in specialTabs.js.

if (aPersistedState.tabURI == "about:accountsettings") {
  tab.tabNode.setAttribute("type", "accountManager");
}
Attachment #9132795 - Attachment is obsolete: true
Attachment #9132795 - Flags: feedback?(khushil324)
Attachment #9132825 - Flags: review?(richard.marti)
Comment on attachment 9132825 [details] [diff] [review] 1617960-account-manager-icon.patch Many thanks, this works for me too. Better we let review this from a neutral person. :-)
Attachment #9132825 - Flags: review?(richard.marti) → feedback+

Added Khushil to the author field.

Attachment #9132825 - Attachment is obsolete: true
Attachment #9132837 - Flags: review?(mkmelin+mozilla)
Attachment #9132837 - Flags: review?(mkmelin+mozilla) → review+
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird 76.0

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/08098cce2d2c
Add a favicon for the Account Manager tab. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/011ee25ec397 follow-up - remove a stray semicolon. rs=linting-only DONTBUILD
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: