diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js index a4977893219a..107eb8b275f4 100644 --- a/toolkit/mozapps/extensions/content/extensions.js +++ b/toolkit/mozapps/extensions/content/extensions.js @@ -329,7 +329,6 @@ function showView(aView) { var showCheckUpdatesAll = true; var showInstallUpdatesAll = false; var showSkip = false; - var showContinue = false; switch (aView) { case "search": var bindingList = [ [ ["action", "?action"], @@ -406,8 +405,6 @@ function showView(aView) { showInstallFile = false; showCheckUpdatesAll = false; showInstallUpdatesAll = false; - if (gUpdatesOnly) - showContinue = true; bindingList = [ [ ["aboutURL", "?aboutURL"], ["addonID", "?addonID"], ["availableUpdateURL", "?availableUpdateURL"], @@ -469,7 +466,6 @@ function showView(aView) { document.getElementById("checkUpdatesAllButton").hidden = !showCheckUpdatesAll; document.getElementById("installUpdatesAllButton").hidden = !showInstallUpdatesAll; document.getElementById("skipDialogButton").hidden = !showSkip; - document.getElementById("continueDialogButton").hidden = !showContinue; document.getElementById("themePreviewArea").hidden = !isThemes; document.getElementById("themeSplitter").hidden = !isThemes; document.getElementById("showUpdateInfoButton").hidden = aView != "updates"; @@ -488,11 +484,6 @@ function showView(aView) { } else document.getElementById("installUpdatesAllButton").removeAttribute("default"); - if (showContinue) - document.getElementById("continueDialogButton").setAttribute("default", "true"); - else - document.getElementById("continueDialogButton").removeAttribute("default"); - if (isThemes) onAddonSelect(); updateGlobalCommands(); @@ -1342,8 +1333,12 @@ XPInstallDownloadManager.prototype = { { }, + _failed: false, onInstallEnded: function(aAddon, aStatus) { + if (aStatus < 0) + this._failed = true; + // From nsInstall.h // USER_CANCELLED = -210 // All other xpinstall errors are <= -200 @@ -1371,8 +1366,15 @@ XPInstallDownloadManager.prototype = { gInstalling = false; gExtensionManager.sortTypeByProperty(nsIUpdateItem.TYPE_ANY, "name", true); if (gUpdatesOnly) { - setElementDisabledByID("cmd_continue", false); - document.getElementById("continueDialogButton").focus(); + if (this._failed) { + let continueButton = document.getElementById("continueDialogButton"); + setElementDisabledByID("cmd_continue", false); + continueButton.hidden = false; + continueButton.setAttribute("default", "true"); + continueButton.focus(); + } else { + setTimeout(closeEM, 2000); + } } else { updateOptionalViews(); diff --git a/toolkit/mozapps/extensions/content/extensions.xul b/toolkit/mozapps/extensions/content/extensions.xul index ee3d4b42df5b..cfcbcbbb9086 100644 --- a/toolkit/mozapps/extensions/content/extensions.xul +++ b/toolkit/mozapps/extensions/content/extensions.xul @@ -267,7 +267,8 @@