зеркало из https://github.com/mozilla/pjs.git
enable permission extension for firefox. Update UI to set the right prefs.
bug 240070, r=mconnor
This commit is contained in:
Родитель
d984e5beb1
Коммит
7431196a22
|
@ -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 {
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
accesskey="&forOriginatingSiteOnly.accesskey;"
|
||||
oncommand="updateImagePref()"
|
||||
style="margin-left: 23px;"/>
|
||||
<data id="enableImagePref" preftype="int" prefstring="network.image.imageBehavior"/>
|
||||
<data id="enableImagePref" preftype="int" prefstring="permissions.default.image"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
<button label="&exceptions.label;"
|
||||
|
|
|
@ -3485,7 +3485,7 @@ browser)
|
|||
MOZ_XUL_APP=1
|
||||
MOZ_PHOENIX=1
|
||||
MOZ_APP_VERSION=`cat $topsrcdir/browser/config/version.txt`
|
||||
MOZ_EXTENSIONS_DEFAULT=" cookie xml-rpc xmlextras pref transformiix universalchardet webservices inspector gnomevfs negotiateauth"
|
||||
MOZ_EXTENSIONS_DEFAULT=" cookie xml-rpc xmlextras pref transformiix universalchardet webservices inspector gnomevfs negotiateauth permissions"
|
||||
AC_DEFINE(MOZ_PHOENIX)
|
||||
;;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче