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-22 00:27:03 +00:00
Родитель 84fb1e155c
Коммит 4e395f0669
2 изменённых файлов: 14 добавлений и 13 удалений

Просмотреть файл

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

Просмотреть файл

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