From 7431196a223a81623541ce808b888e699cfd730d Mon Sep 17 00:00:00 2001 From: "mvl%exedo.nl" Date: Wed, 15 Dec 2004 18:34:23 +0000 Subject: [PATCH] enable permission extension for firefox. Update UI to set the right prefs. bug 240070, r=mconnor --- .../components/prefwindow/content/pref-features.js | 12 ++++++------ .../components/prefwindow/content/pref-features.xul | 2 +- configure.in | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/browser/components/prefwindow/content/pref-features.js b/browser/components/prefwindow/content/pref-features.js index e2957aa16a1..c3d829ebee7 100644 --- a/browser/components/prefwindow/content/pref-features.js +++ b/browser/components/prefwindow/content/pref-features.js @@ -51,18 +51,18 @@ function Startup() gImagesRestricted = document.getElementById("enableRestricted"); var prefValue = gImagesPref.getAttribute("value"); if (!prefValue) - prefValue = "0"; + prefValue = "1"; switch (prefValue) { - case "1": + case "3": gImagesRestricted.checked = true; - case "0": + case "1": gImagesEnabled.checked = true; break; } if (!gImagesEnabled.checked) gImagesRestricted.disabled = true; - if (parent.hPrefWindow.getPrefIsLocked("network.image.imageBehavior")) { + if (parent.hPrefWindow.getPrefIsLocked("permissions.default.image")) { gImagesRestricted.disabled = true; gImagesEnabled.disabled = true; } @@ -70,12 +70,12 @@ function Startup() function updateImagePref() { - if (!parent.hPrefWindow.getPrefIsLocked("network.image.imageBehavior")) { + if (!parent.hPrefWindow.getPrefIsLocked("permissions.default.image")) { if (!gImagesEnabled.checked) { gImagesPref.setAttribute("value", 2) gImagesRestricted.disabled = true; } else { - gImagesPref.setAttribute("value", gImagesRestricted.checked ? 1 : 0) + gImagesPref.setAttribute("value", gImagesRestricted.checked ? 3 : 1) gImagesRestricted.disabled = false; } } else { diff --git a/browser/components/prefwindow/content/pref-features.xul b/browser/components/prefwindow/content/pref-features.xul index 30e35b70100..e2f163e49ab 100644 --- a/browser/components/prefwindow/content/pref-features.xul +++ b/browser/components/prefwindow/content/pref-features.xul @@ -89,7 +89,7 @@ accesskey="&forOriginatingSiteOnly.accesskey;" oncommand="updateImagePref()" style="margin-left: 23px;"/> - +