Backed out changeset e27fe0b767ea to see if it helps unit test failures

This commit is contained in:
Mike Connor 2009-03-13 00:25:22 -04:00
parent 936cd020e6
commit 4462dc027b

View File

@ -6934,15 +6934,7 @@ let gPrivateBrowsingUI = {
this._privateBrowsingAutoStarted = this._privateBrowsingService.autoStarted;
if (this._privateBrowsingAutoStarted) {
// Disable the menu item in auto-start mode
let pbMenuItem = document.getElementById("privateBrowsingItem");
if (pbMenuItem)
pbMenuItem.setAttribute("disabled", "true");
document.getElementById("Tools:PrivateBrowsing")
.setAttribute("disabled", "true");
}
else if (window.location.href == getBrowserURL()) {
if (!this._privateBrowsingAutoStarted) {
// Adjust the window's title
let docElement = document.documentElement;
docElement.setAttribute("title",
@ -6951,6 +6943,14 @@ let gPrivateBrowsingUI = {
docElement.getAttribute("titlemodifier_privatebrowsing"));
docElement.setAttribute("browsingmode", "private");
}
else {
// Disable the menu item in auto-start mode
let pbMenuItem = document.getElementById("privateBrowsingItem");
if (pbMenuItem)
pbMenuItem.setAttribute("disabled", "true");
document.getElementById("Tools:PrivateBrowsing")
.setAttribute("disabled", "true");
}
},
onExitPrivateBrowsing: function PBUI_onExitPrivateBrowsing() {
@ -6968,7 +6968,7 @@ let gPrivateBrowsingUI = {
this._setPBMenuTitle("start");
if (window.location.href == getBrowserURL()) {
if (!this._privateBrowsingAutoStarted) {
// Adjust the window's title
let docElement = document.documentElement;
docElement.setAttribute("title",
@ -6977,8 +6977,8 @@ let gPrivateBrowsingUI = {
docElement.getAttribute("titlemodifier_normal"));
docElement.setAttribute("browsingmode", "normal");
}
this._privateBrowsingAutoStarted = false;
else
this._privateBrowsingAutoStarted = false;
},
_setPBMenuTitle: function PBUI__setPBMenuTitle(aMode) {