Bug 757439 - Use the updateButton string for the Update & Restart button in the About dialog; r=rstrong
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 22 May 2012 11:35:59 -0400
changeset 94769 bc2e6cb641ab410b33a25610bc75b63eb6070c5e
parent 94768 48de43cf133748382c630203830f8457e68d16d3
child 94770 62ca6f4bd8f0078b57b271389f82bef47b45f885
push id9791
push usereakhgari@mozilla.com
push dateThu, 24 May 2012 02:02:13 +0000
treeherdermozilla-inbound@bc2e6cb641ab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong
bugs757439
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 757439 - Use the updateButton string for the Update & Restart button in the About dialog; r=rstrong
browser/base/content/aboutDialog.js
browser/locales/en-US/chrome/browser/browser.properties
--- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js
@@ -111,28 +111,22 @@ function appUpdater()
   manualLink.href = manualURL;
   document.getElementById("failedLink").href = manualURL;
 
   if (this.updateDisabledAndLocked) {
     this.selectPanel("adminDisabled");
     return;
   }
 
-  if (this.isPending) {
+  if (this.isPending || this.isApplied) {
     this.setupUpdateButton("update.restart." +
                            (this.isMajor ? "upgradeButton" : "updateButton"));
     return;
   }
 
-  if (this.isApplied) {
-    this.setupUpdateButton("update.restart." +
-                           (this.isMajor ? "upgradeButton" : "restartButton"));
-    return;
-  }
-
   if (this.isDownloading) {
     this.startDownload();
     return;
   }
 
   if (this.updateEnabled && this.updateAuto) {
     this.selectPanel("checkingForUpdates");
     this.isChecking = true;
@@ -534,17 +528,17 @@ appUpdater.prototype =
         let timer = Components.classes["@mozilla.org/timer;1"]
                               .createInstance(Components.interfaces.nsITimer);
         timer.initWithCallback(function () {
           // Update the UI when the background updater is finished
           let status = update.state;
           if (status == "applied" || status == "applied-service") {
             self.selectPanel("updateButtonBox");
             self.setupUpdateButton("update.restart." +
-                                   (self.isMajor ? "upgradeButton" : "restartButton"));
+                                   (self.isMajor ? "upgradeButton" : "updateButton"));
             timer.cancel();
             timer = null;
           } else if (status == "failed") {
             // Background update has failed, let's show the UI responsible for
             // prompting the user to update manually.
             self.selectPanel("downloadFailed");
             timer.cancel();
             timer = null;
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -151,18 +151,16 @@ sanitizeSelectedWarning=All selected ite
 update.checkInsideButton.label=Check for Updates
 update.checkInsideButton.accesskey=C
 update.resumeButton.label=Resume Downloading %S…
 update.resumeButton.accesskey=D
 update.openUpdateUI.applyButton.label=Apply Update…
 update.openUpdateUI.applyButton.accesskey=A
 update.restart.updateButton.label=Restart to Update
 update.restart.updateButton.accesskey=R
-update.restart.restartButton.label=Update & Restart
-update.restart.restartButton.accesskey=R
 update.openUpdateUI.upgradeButton.label=Upgrade Now…
 update.openUpdateUI.upgradeButton.accesskey=U
 update.restart.upgradeButton.label=Upgrade Now
 update.restart.upgradeButton.accesskey=U
 
 # RSS Pretty Print
 feedShowFeedNew=Subscribe to '%S'…