Bug 557814 - Add manual add-ons update back into Add-ons Manager [r=vingtetun]

This commit is contained in:
Mark Finkle 2010-04-19 09:05:55 -04:00
parent a8173d56b3
commit 2c00fe4359
4 changed files with 18 additions and 0 deletions

View File

@ -161,6 +161,7 @@ pref("extensions.ignoreMTimeChanges", false);
pref("extensions.logging.enabled", false);
pref("extensions.hideInstallButton", true);
pref("extensions.showMismatchUI", false);
pref("extensions.hideUpdateButton", true);
pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%&currentAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%");

View File

@ -360,6 +360,8 @@
<richlistitem id="addons-local" class="section-header" align="center" nohighlight="true">
<label value="&addonsLocal.label;" flex="1"/>
<spacer flex="1"/>
<button id="addons-update-all" label="&addonsUpdate.label;" hidden="true"
oncommand="ExtensionsView.updateAll();"/>
</richlistitem>
<richlistitem id="addons-repo" class="section-header" nohighlight="true">
<label value="&addonsRepo.label;" flex="1"/>

View File

@ -239,6 +239,9 @@ var ExtensionsView = {
os.addObserver(this, "addon-update-started", false);
os.addObserver(this, "addon-update-ended", false);
if (!gPrefService.getBoolPref("extensions.hideUpdateButton"))
document.getElementById("addons-update-all").hidden = false;
let self = this;
let panels = document.getElementById("panel-items");
panels.addEventListener("select",
@ -664,6 +667,17 @@ var ExtensionsView = {
BrowserUI.newTab(uri);
},
updateAll: function ev_updateAll() {
if (!this._isXPInstallEnabled())
return;
let aus = Cc["@mozilla.org/browser/addon-update-service;1"].getService(Ci.nsITimerCallback);
aus.notify(null);
if (this._list.selectedItem)
this._list.selectedItem.focus();
},
observe: function ev_observe(aSubject, aTopic, aData) {
if (!document)
return;

View File

@ -38,6 +38,7 @@
<!ENTITY addonsHeader.label "Add-ons">
<!ENTITY addonsLocal.label "Your Add-ons">
<!ENTITY addonsUpdate.label "Update">
<!ENTITY addonsRepo.label "Get Add-ons">
<!ENTITY addonsRecommended.label "Recommended">
<!ENTITY addonsSearch.label "Search">