Bug 1168954 - Unexpected "Install" button appears on add-on install progress doorhanger. r=dao, a=lizzard
authorDave Townsend <dtownsend@oxymoronical.com>
Wed, 27 May 2015 13:08:37 -0700
changeset 266178 bb5ac2094352
parent 266177 499efe6e8a4b
child 266179 8f1677195e6f
push id4776
push userryanvm@gmail.com
push date2015-06-03 20:24 +0000
treeherdermozilla-beta@59793d7e1b7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao, lizzard
bugs1168954
milestone39.0
Bug 1168954 - Unexpected "Install" button appears on add-on install progress doorhanger. r=dao, a=lizzard
browser/base/content/browser-addons.js
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -127,18 +127,22 @@ const gXPInstallObserver = {
                                                  anchorID, null, null, options);
       notification._startTime = Date.now();
 
       let cancelButton = document.getElementById("addon-progress-cancel");
       cancelButton.label = gNavigatorBundle.getString("addonInstall.cancelButton.label");
       cancelButton.accessKey = gNavigatorBundle.getString("addonInstall.cancelButton.accesskey");
 
       let acceptButton = document.getElementById("addon-progress-accept");
-      acceptButton.label = gNavigatorBundle.getString("addonInstall.acceptButton.label");
-      acceptButton.accessKey = gNavigatorBundle.getString("addonInstall.acceptButton.accesskey");
+      if (Preferences.get("xpinstall.customConfirmationUI", false)) {
+        acceptButton.label = gNavigatorBundle.getString("addonInstall.acceptButton.label");
+        acceptButton.accessKey = gNavigatorBundle.getString("addonInstall.acceptButton.accesskey");
+      } else {
+        acceptButton.hidden = true;
+      }
       break; }
     case "addon-install-failed": {
       // TODO This isn't terribly ideal for the multiple failure case
       for (let install of installInfo.installs) {
         let host = options.originHost;
         if (!host)
           host = (install.sourceURI instanceof Ci.nsIStandardURL) &&
                  install.sourceURI.host;