From a1ace8f56824086b9d292fa2adc8ac233097c3c5 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Thu, 13 Aug 2009 14:40:55 -0700 Subject: [PATCH] Bug 510312 Provide notification bar for content tabs. r=asuth --- mail/base/content/mailWindow.js | 20 ++++++++++++++++++++ mail/base/content/specialTabs.xul | 6 ++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/mail/base/content/mailWindow.js b/mail/base/content/mailWindow.js index 8cf6df8998..a197755e33 100644 --- a/mail/base/content/mailWindow.js +++ b/mail/base/content/mailWindow.js @@ -504,6 +504,26 @@ function getBrowser() document.getElementById("messagepane"); } +/** + * This function is global and expected by toolkit to get the notification box + * for the browser for use with items like password manager. + */ +function getNotificationBox(aWindow) { + var tabmail = document.getElementById("tabmail"); + var tabInfo = tabmail.tabInfo; + + for (var i = 0; i < tabInfo.length; ++i) { + var browserFunc = tabInfo[i].mode.getBrowser || + tabInfo[i].mode.tabType.getBrowser; + if (browserFunc) { + var possBrowser = browserFunc.call(tabInfo[i].mode.tabType, tabInfo[i]); + if (possBrowser && possBrowser.contentWindow == aWindow) + return possBrowser.parentNode; + } + } + return null; +} + // Given the server, open the twisty and the set the selection // on inbox of that server. // prompt if offline. diff --git a/mail/base/content/specialTabs.xul b/mail/base/content/specialTabs.xul index 3d555a1470..1fafcf927c 100644 --- a/mail/base/content/specialTabs.xul +++ b/mail/base/content/specialTabs.xul @@ -41,8 +41,10 @@ - - + + + +