Bug 369075 - Add permanent button for restarting Firefox to Add-ons Mgr.

Patch by Dao Gottwald <dao@design-noir.de>. r=robstrong
This commit is contained in:
dtownsend@oxymoronical.com 2007-06-21 17:27:03 -07:00
parent f1f2e453d2
commit ac383abd58
2 changed files with 14 additions and 13 deletions

View File

@ -273,7 +273,7 @@ function showView(aView) {
catch (e) { }
var showCheckUpdatesAll = true;
var showInstallUpdatesAll = false;
var showRestartApp = false;
var showRestartApp = true;
var showSkip = false;
var showContinue = false;
switch (aView) {
@ -319,10 +319,10 @@ function showView(aView) {
showInstallFile = false;
showCheckUpdatesAll = false;
showInstallUpdatesAll = false;
if (gUpdatesOnly)
if (gUpdatesOnly) {
showContinue = true;
else
showRestartApp = true;
showRestartApp = false;
}
bindingList = [ ["aboutURL", "?aboutURL"],
["addonID", "?addonID"],
["availableUpdateURL", "?availableUpdateURL"],
@ -711,6 +711,7 @@ XPInstallDownloadManager.prototype = {
}
gExtensionManager.addDownloads(items, items.length, false);
updateGlobalCommands();
},
getElementForAddon: function(aAddon)
@ -1365,7 +1366,7 @@ function updateGlobalCommands() {
var disableInstallFile = false;
var disableUpdateCheck = true;
var disableInstallUpdate = true;
var disableAppRestart = true;
var disableAppRestart = false;
if (gExtensionsView.hasAttribute("update-operation")) {
disableInstallFile = true;
disableAppRestart = true;
@ -1378,10 +1379,8 @@ function updateGlobalCommands() {
disableUpdateCheck = false;
if (disableInstallUpdate && child.hasAttribute("availableUpdateURL"))
disableInstallUpdate = false;
if (disableAppRestart && child.hasAttribute("state")) {
if (child.getAttribute("state") == "success")
disableAppRestart = false;
}
if (!disableAppRestart && child.hasAttribute("state") && child.getAttribute("state") != "success")
disableAppRestart = true;
}
}
setElementDisabledByID("cmd_checkUpdatesAll", disableUpdateCheck);
@ -1692,6 +1691,7 @@ var gExtensionsViewController = {
showView("installs");
var item = gExtensionManager.getItemForID(getIDFromResourceURI(aSelectedItem.id));
gExtensionManager.addDownloads([item], 1, true);
updateGlobalCommands();
// Remove the updates view if there are no add-ons left to update
updateOptionalViews();
},

View File

@ -207,6 +207,11 @@
tooltiptext="&cmd.skip.tooltip;"
command="cmd_close"/>
<spacer flex="1"/>
<label id="getMore" class="text-link"
onclick="openURL(this.getAttribute('getMoreURL'));"
valuethemes="&getThemes.label;"
valueextensions="&getExtensions.label;"/>
<spacer flex="1"/>
<button id="installUpdatesAllButton" label="&cmd.installUpdatesAll.label;"
accesskey="&cmd.installUpdatesAll.accesskey;"
tooltiptext="&cmd.installUpdatesAll.tooltip;"
@ -219,10 +224,6 @@
accesskey="&cmd.continue.accesskey;"
tooltiptext="&cmd.continue.tooltip;"
command="cmd_continue"/>
<label id="getMore" class="text-link"
onclick="openURL(this.getAttribute('getMoreURL'));"
valuethemes="&getThemes.label;"
valueextensions="&getExtensions.label;"/>
</hbox>
<hbox id="resizerBox" style="min-width:1px;">
<spacer flex="1"/>