Bug 270170 XPInstall Permission Manager UI

p=me r=db48x sr=jag
This commit is contained in:
bugzilla%arlen.demon.co.uk 2006-05-17 02:40:02 +00:00
parent 8580338496
commit f50c3889cd
3 changed files with 24 additions and 23 deletions

View File

@ -48,12 +48,14 @@
onload="parent.initPanel('chrome://communicator/content/pref/pref-popups.xul');"
headertitle="&pref.popups.title;">
<script type="application/x-javascript" src="chrome://communicator/content/permissions/permissionsOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["popupPolicy","playSound","playSoundUrl","displayIcon","removeBlacklist","prefillWhitelist"];
const nsIPermissionManager = Components.interfaces.nsIPermissionManager
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
const popupType = "popup";
var gPolicyCheckbox;
@ -68,7 +70,7 @@
function Startup() {
permissionManager = Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager);
.getService(nsIPermissionManager);
ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
@ -114,7 +116,7 @@
}
}
for (var i = 0; i < hosts.length; i++) {
for (var i in hosts) {
permissionManager.remove(hosts[i], popupType);
}
@ -122,16 +124,11 @@
function loadWhitelist() {
try {
var whitelist;
var hosts;
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
var prefs = prefService.getBranch(null);
whitelist = prefs.getComplexValue("privacy.popups.default_whitelist",
Components.interfaces.nsIPrefLocalizedString).data;
hosts = whitelist.split(",");
var whitelist = parent.hPrefWindow.getPref("localizedstring",
"privacy.popups.default_whitelist");
var hosts = whitelist.split(",");
for (var i = 0; i < hosts.length; i++) {
for (var i in hosts) {
var host = hosts[i];
host = "http://" + host;
var uri = ioService.newURI(host, null, null);
@ -207,11 +204,6 @@
gPreviewSoundButton.disabled = gSoundUrlBox.value == "";
}
function viewPopups() {
window.openDialog("chrome://communicator/content/permissions/permissionsManager.xul", "",
"chrome,resizable=yes", "");
}
]]>
</script>
@ -226,7 +218,7 @@
<spacer flex="1"/>
<button id="exceptionsButton" label="&popupExceptions.label;"
accesskey="&popupExceptions.accesskey;"
oncommand="viewPopups();"/>
oncommand="viewPopups('');"/>
</hbox>
<separator class="thin"/>
<description id="whenBlock">&whenBlock.description;</description>

View File

@ -7,6 +7,8 @@
onload="parent.initPanel('chrome://communicator/content/pref/pref-smartupdate.xul');"
headertitle="&pref.smartUpdate.title;">
<script type="application/x-javascript" src="chrome://communicator/content/permissions/permissionsOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["XPInstallEnabled", "updateNotificationsEnabled",
@ -26,10 +28,15 @@
]]>
</script>
<groupbox align="start">
<groupbox>
<caption label="&smartTitle.label;"/>
<checkbox id="XPInstallEnabled" label="&enableSU.label;" accesskey="&enableSU.accesskey;"
prefstring="xpinstall.enabled"/>
<hbox align="center">
<checkbox id="XPInstallEnabled" label="&enableSU.label;" accesskey="&enableSU.accesskey;"
prefstring="xpinstall.enabled"/>
<spacer flex="1"/>
<button id="allowedSitesButton" label="&allowedSites.label;" permissiontype="install"
accesskey="&allowedSites.accesskey;" oncommand="viewInstalls('');"/>
</hbox>
</groupbox>
<groupbox align="start">

View File

@ -1,9 +1,11 @@
<!--LOCALIZATION NOTE : FILE UI for Software Updates prefs -->
<!ENTITY pref.smartUpdate.title "Software Installation">
<!ENTITY smartTitle.label "Manage Software Installations and Updates">
<!ENTITY enableSU.label "Enable software installation. (You will be prompted before each update.)">
<!ENTITY enableSU.label "Allow web sites to install extensions and updates">
<!ENTITY enableSU.accesskey "A">
<!ENTITY allowedSites.label "Allowed Sites">
<!ENTITY allowedSites.accesskey "S">
<!ENTITY enableSU.accesskey "E">
<!ENTITY enableNotification.label "Notify me when new and updated software is available">
<!ENTITY enableNotification.accesskey "N">
<!ENTITY requireConfirmation.label "Require manual confirmation of each install">