diff --git a/mozilla/browser/app/profile/firefox.js b/mozilla/browser/app/profile/firefox.js index a5db9cb793b..03658f6c70e 100644 --- a/mozilla/browser/app/profile/firefox.js +++ b/mozilla/browser/app/profile/firefox.js @@ -71,14 +71,24 @@ pref("extensions.ignoreMTimeChanges", false); pref("extensions.logging.enabled", false); // App-specific update preferences -pref("app.update.enabled", false); // Whether or not app updates are enabled -// Whether or not automated background app updates are enabled. -pref("app.update.autoInstallEnabled", true); -// If automatic download is enabled, whether or not the Update system should -// automatically install the downloaded updates or just download them and prompt -// the user to install. -pref("app.update.autoInstallMode", 0); +// Whether or not app updates are enabled +pref("app.update.enabled", false); + +// Defines how the Application Update Service notifies the user about updates: +// +// AUM Set to: Minor Releases: Major Releases: +// 0 download no prompt download no prompt +// 1 download no prompt download no prompt if no incompatibilities +// 2 download no prompt prompt +// 3 prompt prompt +// +// See chart in nsUpdateService.js.in for more details +// +pref("app.update.mode", 1); + +// If set to true, the Update Service will present no UI for any event. +pref("app.update.silent", false); // XXX these prefs and others like them are distribution specific and should move // into chrome://browser diff --git a/mozilla/browser/base/content/utilityOverlay.js b/mozilla/browser/base/content/utilityOverlay.js index 69bcf4a3a26..52283ed1570 100644 --- a/mozilla/browser/base/content/utilityOverlay.js +++ b/mozilla/browser/base/content/utilityOverlay.js @@ -459,11 +459,18 @@ function buildHelpMenu() var um = Components.classes["@mozilla.org/updates/update-manager;1"]. getService(Components.interfaces.nsIUpdateManager); - var activeUpdate = um.activeUpdate; + + // Disable the UI if the update enabled pref has been locked by the + // administrator or if we cannot update for some other reason + var checkForUpdates = document.getElementById("checkForUpdates"); + var canUpdate = updates.canUpdate; + checkForUpdates.setAttribute("disabled", !canUpdate); + if (!canUpdate) + return; var strings = document.getElementById("bundle_browser"); - var label = strings.getString("updates_checkForUpdates"); + var activeUpdate = um.activeUpdate; if (activeUpdate) { if (updates.isDownloading) { if (activeUpdate.name) { @@ -483,15 +490,10 @@ function buildHelpMenu() } } - 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 32d82a509cd..001a85fac77 100644 --- a/mozilla/browser/components/preferences/advanced.js +++ b/mozilla/browser/components/preferences/advanced.js @@ -95,6 +95,13 @@ var gAdvancedPane = { { var preference = document.getElementById("app.update.enabled"); document.getElementById("enableAutoInstall").disabled = !preference.value; + + var aus = + Components.classes["@mozilla.org/updates/update-service;1"]. + getService(Components.interfaces.nsIApplicationUpdateService); + var checkNowButton = document.getElementById("checkNowButton"); + checkNowButton.disabled = !aus.canUpdate; + this.updateAutoInstallUI(); return undefined; }, @@ -129,8 +136,9 @@ var gAdvancedPane = { var features = "chrome,centerscreen,dialog,titlebar"; const URI_EXTENSION_UPDATE_DIALOG = "chrome://mozapps/content/extensions/update.xul"; - var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] - .getService(Components.interfaces.nsIWindowWatcher); + var ww = + Components.classes["@mozilla.org/embedcomp/window-watcher;1"]. + getService(Components.interfaces.nsIWindowWatcher); ww.openWindow(window, URI_EXTENSION_UPDATE_DIALOG, "", features, ary); }, diff --git a/mozilla/browser/components/preferences/advanced.xul b/mozilla/browser/components/preferences/advanced.xul index ba1adb16c3d..00843333c55 100644 --- a/mozilla/browser/components/preferences/advanced.xul +++ b/mozilla/browser/components/preferences/advanced.xul @@ -59,7 +59,7 @@ - + @@ -142,7 +142,7 @@ accesskey="&enableAutoInstall.accesskey;" preference="app.update.autoInstallEnabled" onpreferenceread="return gAdvancedPane.updateAutoInstallUI();"/> - + @@ -161,7 +161,8 @@ -