From 2dcc022b0380a7eff9af8e940d2dfd7b8158392c Mon Sep 17 00:00:00 2001 From: "ben%bengoodger.com" Date: Wed, 29 Jun 2005 01:34:36 +0000 Subject: [PATCH] clean up on restart git-svn-id: svn://10.0.0.236/trunk@175275 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/app/profile/firefox.js | 6 +- .../components/preferences/advanced.js | 20 +- .../components/preferences/advanced.xul | 46 +-- mozilla/browser/components/preferences/jar.mn | 2 + .../browser/components/preferences/update.js | 0 .../browser/components/preferences/update.xul | 81 +++++ .../chrome/browser/preferences/advanced.dtd | 16 +- .../chrome/browser/preferences/update.dtd | 22 ++ mozilla/browser/locales/jar.mn | 1 + .../toolkit/mozapps/update/content/history.js | 4 +- .../mozapps/update/content/updates.css | 6 + .../toolkit/mozapps/update/content/updates.js | 10 +- .../update/public/nsIUpdateService.idl | 58 +-- .../mozapps/update/src/nsUpdateService.js.in | 341 +++++++++++------- 14 files changed, 410 insertions(+), 203 deletions(-) create mode 100755 mozilla/browser/components/preferences/update.js create mode 100755 mozilla/browser/components/preferences/update.xul create mode 100755 mozilla/browser/locales/en-US/chrome/browser/preferences/update.dtd 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 @@ - - - - - - - - - - - - - - - - + + + +