diff --git a/mozilla/browser/app/profile/firefox.js b/mozilla/browser/app/profile/firefox.js index 03658f6c70e..2490deaa2fc 100644 --- a/mozilla/browser/app/profile/firefox.js +++ b/mozilla/browser/app/profile/firefox.js @@ -75,13 +75,17 @@ pref("extensions.logging.enabled", false); // Whether or not app updates are enabled pref("app.update.enabled", false); +// This preference turns on app.update.mode and allows automatic download and +// install to take place. We use a separate boolean toggle for this to make +// the UI easier to construct. +pref("app.update.auto", true); + // 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 // diff --git a/mozilla/browser/components/preferences/advanced.js b/mozilla/browser/components/preferences/advanced.js index 001a85fac77..3b32b367620 100644 --- a/mozilla/browser/components/preferences/advanced.js +++ b/mozilla/browser/components/preferences/advanced.js @@ -101,19 +101,17 @@ var gAdvancedPane = { getService(Components.interfaces.nsIApplicationUpdateService); var checkNowButton = document.getElementById("checkNowButton"); checkNowButton.disabled = !aus.canUpdate; - - this.updateAutoInstallUI(); + + this.updateAutoPref(); return undefined; }, - updateAutoInstallUI: function () + updateAutoPref: function () { - var autoInstallPref = document.getElementById("app.update.autoInstallEnabled"); + var preference = document.getElementById("app.update.auto"); 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 = disabled; + var autoInstallOptions = document.getElementById("autoInstallOptions"); + autoInstallOptions.disabled = !preference.value || !updateEnabledPref.value; return undefined; }, @@ -149,6 +147,12 @@ var gAdvancedPane = { prompter.checkForUpdates(window); }, + showAutoInstallOptions: function () + { + document.documentElement.openSubDialog("chrome://browser/content/preferences/update.xul", + "", null); + }, + showUpdates: 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 989791789ca..1d2864444e1 100644 --- a/mozilla/browser/components/preferences/advanced.xul +++ b/mozilla/browser/components/preferences/advanced.xul @@ -58,8 +58,7 @@ - - + @@ -131,34 +130,23 @@ - - - - - - - - - - - - - - - - + + + +