diff --git a/mozilla/browser/base/content/utilityOverlay.js b/mozilla/browser/base/content/utilityOverlay.js index cce241bd5a8..c372c27b6b4 100644 --- a/mozilla/browser/base/content/utilityOverlay.js +++ b/mozilla/browser/base/content/utilityOverlay.js @@ -482,12 +482,16 @@ function buildHelpMenu() label = strings.getString("updates_resumeDownloadingFallback"); } } - + var checkForUpdates = document.getElementById("checkForUpdates"); checkForUpdates.label = label; if (um.activeUpdate && updates.isDownloading) checkForUpdates.setAttribute("loading", "true"); else checkForUpdates.removeAttribute("loading"); + + // Disable the UI if the update enabled pref has been locked by the + // administrator. + checkForUpdates.disabled = gPrefService.prefIsLocked("app.update.enabled"); } diff --git a/mozilla/browser/components/preferences/advanced.js b/mozilla/browser/components/preferences/advanced.js index bc17c676405..113f5cb27d7 100644 --- a/mozilla/browser/components/preferences/advanced.js +++ b/mozilla/browser/components/preferences/advanced.js @@ -93,27 +93,28 @@ var gAdvancedPane = { updateAppUpdateUI: function () { - var preference = document.getElementById("app.update.autoUpdateEnabled"); - var ids = ["enableAutoInstall", "autoInstallMode", "updateAnd"]; - if (!preference.value) - for (var i = 0; i < ids.length; ++i) - document.getElementById(ids[i]).disabled = true; - else { - document.getElementById("enableAutoInstall").disabled = false; - this.updateAutoInstallUI(); - } + var preference = document.getElementById("app.update.enabled"); + document.getElementById("enableAutoInstall").disabled = !preference.value; + this.updateAutoInstallUI(); return undefined; }, updateAutoInstallUI: function () { - var preference = document.getElementById("app.update.autoInstallEnabled"); + var autoInstallPref = document.getElementById("app.update.autoInstallEnabled"); + var updateEnabledPref = document.getElementById("app.update.enabled"); var ids = ["autoInstallMode", "updateAnd"]; + var disabled = !updateEnabledPref.value || !autoInstallPref.value; for (var i = 0; i < ids.length; ++i) - document.getElementById(ids[i]).disabled = !preference.value; + document.getElementById(ids[i]).disabled = disabled; return undefined; }, + checkForAddonUpdates: function () + { + goats + }, + checkForUpdates: function () { var prompter = Components.classes["@mozilla.org/updates/update-prompt;1"] diff --git a/mozilla/browser/components/preferences/advanced.xul b/mozilla/browser/components/preferences/advanced.xul index fc35ffa11c4..ba1adb16c3d 100644 --- a/mozilla/browser/components/preferences/advanced.xul +++ b/mozilla/browser/components/preferences/advanced.xul @@ -81,15 +81,6 @@ - - -