diff options
Diffstat (limited to 'toolkit/mozapps/extensions/content/extensions.xml')
-rw-r--r-- | toolkit/mozapps/extensions/content/extensions.xml | 364 |
1 files changed, 232 insertions, 132 deletions
diff --git a/toolkit/mozapps/extensions/content/extensions.xml b/toolkit/mozapps/extensions/content/extensions.xml index b49645cf0..9c15902b5 100644 --- a/toolkit/mozapps/extensions/content/extensions.xml +++ b/toolkit/mozapps/extensions/content/extensions.xml @@ -7,10 +7,10 @@ <!DOCTYPE page [ <!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/extensions.dtd"> %extensionsDTD; +<!ENTITY % aboutDTD SYSTEM "chrome://mozapps/locale/extensions/about.dtd"> +%aboutDTD; ]> -<!-- import-globals-from extensions.js --> - <bindings id="addonBindings" xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" @@ -489,6 +489,52 @@ </binding> + <!-- Translators list - Names of a translators of Language Pack. --> + <binding id="translators-list"> + <content> + <xul:label anonid="label" value="&translators.label;" class="sectionTitle"/> + <xul:vbox flex="1" anonid="translatorsBox" class="boxIndent"/> + </content> + + <implementation> + <constructor><![CDATA[ + if (this.hasAttribute("nameonly") && + this.getAttribute("nameonly") == "true") { + this._label.hidden = true; + } + ]]></constructor> + + <field name="_label"> + document.getAnonymousElementByAttribute(this, "anonid", "label"); + </field> + <field name="_translatorsBox"> + document.getAnonymousElementByAttribute(this, "anonid", "translatorsBox"); + </field> + + <method name="setTranslators"> + <parameter name="aTranslators"/> + <parameter name="aType"/> + <body><![CDATA[ + if (aType != "locale" || !aTranslators || aTranslators.length == 0) { + this.collapsed = true; + return; + } + this.collapsed = false; + while (this._translatorsBox.firstChild) { + this._translatorsBox.removeChild(this._translatorsBox.firstChild); + } + for (let currentItem of aTranslators) { + var label = document.createElement("label"); + label.textContent = currentItem; + label.setAttribute("class", "contributor"); + this._translatorsBox.appendChild(label); + } + ]]></body> + </method> + </implementation> + </binding> + + <!-- Install status - Displays the status of an install/upgrade. --> <binding id="install-status"> <content> @@ -739,14 +785,6 @@ ]]></body> </method> - <method name="isPending"> - <parameter name="aAction"/> - <body><![CDATA[ - var action = AddonManager["PENDING_" + aAction.toUpperCase()]; - return !!(this.mAddon.pendingOperations & action); - ]]></body> - </method> - <method name="typeHasFlag"> <parameter name="aFlag"/> <body><![CDATA[ @@ -757,6 +795,14 @@ ]]></body> </method> + <method name="isPending"> + <parameter name="aAction"/> + <body><![CDATA[ + var action = AddonManager["PENDING_" + aAction.toUpperCase()]; + return !!(this.mAddon.pendingOperations & action); + ]]></body> + </method> + <method name="onUninstalled"> <body><![CDATA[ this.parentNode.removeChild(this); @@ -775,14 +821,14 @@ <xul:image class="warning-icon"/> <xul:label anonid="warning" flex="1"/> <xul:label anonid="warning-link" class="text-link"/> - <xul:button anonid="warning-btn" class="button-link" hidden="true"/> + <xul:button anonid="warning-btn" class="button-link"/> <xul:spacer flex="5000"/> <!-- Necessary to allow the message to wrap --> </xul:hbox> <xul:hbox anonid="error-container" class="error"> <xul:image class="error-icon"/> <xul:label anonid="error" flex="1"/> - <xul:label anonid="error-link" class="text-link" hidden="true"/> + <xul:label anonid="error-link" class="text-link"/> <xul:spacer flex="5000"/> <!-- Necessary to allow the message to wrap --> </xul:hbox> <xul:hbox anonid="pending-container" @@ -799,7 +845,7 @@ <xul:spacer flex="5000"/> <!-- Necessary to allow the message to wrap --> </xul:hbox> - <xul:hbox class="content-container" align="center"> + <xul:hbox class="content-container"> <xul:vbox class="icon-container"> <xul:image anonid="icon" class="icon"/> </xul:vbox> @@ -807,7 +853,10 @@ <xul:hbox class="basicinfo-container"> <xul:hbox class="name-container"> <xul:label anonid="name" class="name" crop="end" flex="1" - tooltip="addonitem-tooltip" xbl:inherits="value=name"/> + xbl:inherits="value=name,tooltiptext=name"/> + <xul:label anonid="version" class="version"/> + <xul:label class="nativeIndicator nativeAddon" value="●" tooltiptext="&addon.nativeAddon;"/> + <xul:label class="nativeIndicator compatAddon" value="●" tooltiptext="&addon.compatAddon;"/> <xul:label class="disabled-postfix" value="&addon.disabled.postfix;"/> <xul:label class="update-postfix" value="&addon.update.postfix;"/> <xul:spacer flex="5000"/> <!-- Necessary to make the name crop --> @@ -853,72 +902,77 @@ oncommand="document.getBindingParent(this).toggleReleaseNotes();"/> </xul:hbox> </xul:vbox> - </xul:hbox> - </xul:vbox> - <xul:vbox class="status-control-wrapper"> - <xul:hbox class="status-container"> - <xul:hbox anonid="checking-update" hidden="true"> - <xul:image class="spinner"/> - <xul:label value="&addon.checkingForUpdates.label;"/> - </xul:hbox> - <xul:vbox anonid="update-available" class="update-available" - hidden="true"> - <xul:checkbox anonid="include-update" class="include-update" - label="&addon.includeUpdate.label;" checked="true" - oncommand="document.getBindingParent(this).onIncludeUpdateChanged();"/> - <xul:hbox class="update-info-container"> - <xul:label class="update-available-notice" - value="&addon.updateAvailable.label;"/> - <xul:button anonid="update-btn" class="addon-control update" - label="&addon.updateNow.label;" - tooltiptext="&addon.updateNow.tooltip;" - oncommand="document.getBindingParent(this).upgrade();"/> + <xul:vbox class="status-control-wrapper"> + <xul:hbox class="status-container"> + <xul:hbox anonid="checking-update" hidden="true"> + <xul:image class="spinner"/> + <xul:label value="&addon.checkingForUpdates.label;"/> + </xul:hbox> + <xul:vbox anonid="update-available" class="update-available" + hidden="true"> + <xul:checkbox anonid="include-update" class="include-update" + label="&addon.includeUpdate.label;" checked="true" + oncommand="document.getBindingParent(this).onIncludeUpdateChanged();"/> + <xul:hbox class="update-info-container"> + <xul:label class="update-available-notice" + value="&addon.updateAvailable.label;"/> + <xul:button anonid="update-btn" class="addon-control update" + label="&addon.updateNow.label;" + tooltiptext="&addon.updateNow.tooltip;" + oncommand="document.getBindingParent(this).upgrade();"/> + </xul:hbox> + </xul:vbox> + <xul:hbox anonid="install-status" class="install-status" + hidden="true"/> </xul:hbox> - </xul:vbox> - <xul:hbox anonid="install-status" class="install-status" - hidden="true"/> - </xul:hbox> - <xul:hbox anonid="control-container" class="control-container"> - <xul:button anonid="preferences-btn" - class="addon-control preferences" + <xul:hbox anonid="control-container" class="control-container"> + <xul:button anonid="preferences-btn" + class="addon-control preferences" #ifdef XP_WIN - label="&cmd.showPreferencesWin.label;" - tooltiptext="&cmd.showPreferencesWin.tooltip;" + label="&cmd.showPreferencesWin.label;" + tooltiptext="&cmd.showPreferencesWin.tooltip;" #else - label="&cmd.showPreferencesUnix.label;" - tooltiptext="&cmd.showPreferencesUnix.tooltip;" + label="&cmd.showPreferencesUnix.label;" + tooltiptext="&cmd.showPreferencesUnix.tooltip;" #endif - oncommand="document.getBindingParent(this).showPreferences();"/> - <xul:button anonid="enable-btn" class="addon-control enable" - label="&cmd.enableAddon.label;" - oncommand="document.getBindingParent(this).userDisabled = false;"/> - <xul:button anonid="disable-btn" class="addon-control disable" - label="&cmd.disableAddon.label;" - oncommand="document.getBindingParent(this).userDisabled = true;"/> - <xul:button anonid="remove-btn" class="addon-control remove" - label="&cmd.uninstallAddon.label;" - oncommand="document.getBindingParent(this).uninstall();"/> - <xul:menulist anonid="state-menulist" - class="addon-control state" - tooltiptext="&cmd.stateMenu.tooltip;"> - <xul:menupopup> - <xul:menuitem anonid="ask-to-activate-menuitem" - class="addon-control" - label="&cmd.askToActivate.label;" - tooltiptext="&cmd.askToActivate.tooltip;" - oncommand="document.getBindingParent(this).userDisabled = AddonManager.STATE_ASK_TO_ACTIVATE;"/> - <xul:menuitem anonid="always-activate-menuitem" - class="addon-control" - label="&cmd.alwaysActivate.label;" - tooltiptext="&cmd.alwaysActivate.tooltip;" - oncommand="document.getBindingParent(this).userDisabled = false;"/> - <xul:menuitem anonid="never-activate-menuitem" - class="addon-control" - label="&cmd.neverActivate.label;" - tooltiptext="&cmd.neverActivate.tooltip;" - oncommand="document.getBindingParent(this).userDisabled = true;"/> - </xul:menupopup> - </xul:menulist> + oncommand="document.getBindingParent(this).showPreferences();"/> + <!-- label="&cmd.debugAddon.label;" --> + <xul:button anonid="debug-btn" class="addon-control debug" + label="&cmd.debugAddon.label;" + oncommand="document.getBindingParent(this).debug();"/> + + <xul:button anonid="enable-btn" class="addon-control enable" + label="&cmd.enableAddon.label;" + oncommand="document.getBindingParent(this).userDisabled = false;"/> + <xul:button anonid="disable-btn" class="addon-control disable" + label="&cmd.disableAddon.label;" + oncommand="document.getBindingParent(this).userDisabled = true;"/> + <xul:button anonid="remove-btn" class="addon-control remove" + label="&cmd.uninstallAddon.label;" + oncommand="document.getBindingParent(this).uninstall();"/> + <xul:menulist anonid="state-menulist" + class="addon-control state" + tooltiptext="&cmd.stateMenu.tooltip;"> + <xul:menupopup> + <xul:menuitem anonid="ask-to-activate-menuitem" + class="addon-control" + label="&cmd.askToActivate.label;" + tooltiptext="&cmd.askToActivate.tooltip;" + oncommand="document.getBindingParent(this).userDisabled = AddonManager.STATE_ASK_TO_ACTIVATE;"/> + <xul:menuitem anonid="always-activate-menuitem" + class="addon-control" + label="&cmd.alwaysActivate.label;" + tooltiptext="&cmd.alwaysActivate.tooltip;" + oncommand="document.getBindingParent(this).userDisabled = false;"/> + <xul:menuitem anonid="never-activate-menuitem" + class="addon-control" + label="&cmd.neverActivate.label;" + tooltiptext="&cmd.neverActivate.tooltip;" + oncommand="document.getBindingParent(this).userDisabled = true;"/> + </xul:menupopup> + </xul:menulist> + </xul:hbox> + </xul:vbox> </xul:hbox> </xul:vbox> </xul:hbox> @@ -926,7 +980,6 @@ <implementation> <constructor><![CDATA[ - this._installStatus = document.getAnonymousElementByAttribute(this, "anonid", "install-status"); this._installStatus.mControl = this; this.setAttribute("contextmenu", "addonitem-popup"); @@ -986,6 +1039,9 @@ document.getAnonymousElementByAttribute(this, "anonid", "info"); </field> + <field name="_version"> + document.getAnonymousElementByAttribute(this, "anonid", "version"); + </field> <field name="_experimentState"> document.getAnonymousElementByAttribute(this, "anonid", "experiment-state"); </field> @@ -1027,6 +1083,10 @@ document.getAnonymousElementByAttribute(this, "anonid", "enable-btn"); </field> + <field name="_debugBtn"> + document.getAnonymousElementByAttribute(this, "anonid", + "debug-btn"); + </field> <field name="_disableBtn"> document.getAnonymousElementByAttribute(this, "anonid", "disable-btn"); @@ -1095,8 +1155,8 @@ return this._includeUpdate.checked && !!this.mManualUpdate; ]]></getter> <setter><![CDATA[ - // XXXunf Eventually, we'll want to persist this for individual - // updates - see bug 594619. + //XXXunf Eventually, we'll want to persist this for individual + // updates - see bug 594619. this._includeUpdate.checked = !!val; ]]></setter> </property> @@ -1112,12 +1172,17 @@ this.setAttribute("name", aAddon.name); - var iconURL = AddonManager.getPreferredIconURL(aAddon, 48, window); + var iconURL = this.mAddon.iconURL; if (iconURL) this._icon.src = iconURL; else this._icon.src = ""; + if (shouldShowVersionNumber(this.mAddon)) + this._version.value = this.mAddon.version; + else + this._version.hidden = true; + if (this.mAddon.description) this._description.value = this.mAddon.description; else @@ -1127,17 +1192,18 @@ (this.mAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_DISABLE || (this.mAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_DEFAULT && !AddonManager.autoUpdateDefault))) { - AddonManager.getAllInstalls(aInstallsList => { + var self = this; + AddonManager.getAllInstalls(function(aInstallsList) { // This can return after the binding has been destroyed, // so try to detect that and return early - if (!("onNewInstall" in this)) + if (!("onNewInstall" in self)) return; for (let install of aInstallsList) { if (install.existingAddon && - install.existingAddon.id == this.mAddon.id && + install.existingAddon.id == self.mAddon.id && install.state == AddonManager.STATE_AVAILABLE) { - this.onNewInstall(install); - this.onIncludeUpdateChanged(); + self.onNewInstall(install); + self.onIncludeUpdateChanged(); } } }); @@ -1165,11 +1231,14 @@ <method name="_updateDates"> <body><![CDATA[ function formatDate(aDate) { - const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"] - .getService(Components.interfaces.nsIXULChromeRegistry) - .getSelectedLocale("global", true); - const dtOptions = { year: 'numeric', month: 'long', day: 'numeric' }; - return aDate.toLocaleDateString(locale, dtOptions); + return Cc["@mozilla.org/intl/scriptabledateformat;1"] + .getService(Ci.nsIScriptableDateFormat) + .FormatDate("", + Ci.nsIScriptableDateFormat.dateFormatLong, + aDate.getFullYear(), + aDate.getMonth() + 1, + aDate.getDate() + ); } if (this.mAddon.updateDate) @@ -1188,7 +1257,7 @@ if (pending != AddonManager.PENDING_NONE) { this.removeAttribute("notification"); - pending = null; + var pending = null; const PENDING_OPERATIONS = ["enable", "disable", "install", "uninstall", "upgrade"]; for (let op of PENDING_OPERATIONS) { @@ -1238,14 +1307,14 @@ this._errorLink.value = gStrings.ext.GetStringFromName("notification.blocked.link"); this._errorLink.href = this.mAddon.blocklistURL; this._errorLink.hidden = false; - } else if (!isUpgrade && !isCorrectlySigned(this.mAddon) && SIGNING_REQUIRED) { - this.setAttribute("notification", "error"); - this._error.textContent = gStrings.ext.formatStringFromName( - "notification.unsignedAndDisabled", [this.mAddon.name, gStrings.brandShortName], 2 + } else if (this.mAddon.jetsdk) { + this.setAttribute("notification", "warning"); + this._warning.textContent = gStrings.ext.formatStringFromName( + "notification.jetsdk", + [gStrings.brandShortName, gStrings.appVersion], 2 ); - this._errorLink.value = gStrings.ext.GetStringFromName("notification.unsigned.link"); - this._errorLink.href = Services.urlFormatter.formatURLPref("app.support.baseURL") + "unsigned-addons"; - this._errorLink.hidden = false; + this._warningLink.hidden = true; + this._warningBtn.hidden = true; } else if ((!isUpgrade && !this.mAddon.isCompatible) && (AddonManager.checkCompatibility || (this.mAddon.blocklistState != Ci.nsIBlocklistService.STATE_SOFTBLOCKED))) { this.setAttribute("notification", "warning"); @@ -1255,14 +1324,6 @@ ); this._warningLink.hidden = true; this._warningBtn.hidden = true; - } else if (!isUpgrade && !isCorrectlySigned(this.mAddon)) { - this.setAttribute("notification", "warning"); - this._warning.textContent = gStrings.ext.formatStringFromName( - "notification.unsigned", [this.mAddon.name, gStrings.brandShortName], 2 - ); - this._warningLink.value = gStrings.ext.GetStringFromName("notification.unsigned.link"); - this._warningLink.href = Services.urlFormatter.formatURLPref("app.support.baseURL") + "unsigned-addons"; - this._warningLink.hidden = false; } else if (!isUpgrade && this.mAddon.blocklistState == Ci.nsIBlocklistService.STATE_SOFTBLOCKED) { this.setAttribute("notification", "warning"); this._warning.textContent = gStrings.ext.formatStringFromName( @@ -1280,7 +1341,7 @@ [this.mAddon.name], 1 ); this._warningLink.value = gStrings.ext.GetStringFromName("notification.outdated.link"); - this._warningLink.href = this.mAddon.blocklistURL; + this._warningLink.href = Services.urlFormatter.formatURLPref("plugins.update.url"); this._warningLink.hidden = false; this._warningBtn.hidden = true; } else if (!isUpgrade && this.mAddon.blocklistState == Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE) { @@ -1309,6 +1370,8 @@ [this.mAddon.name], 1); } else { this.removeAttribute("notification"); + if (this.mAddon.type == "extension") + this.setAttribute("native", this.mAddon.native); } } @@ -1335,31 +1398,30 @@ this._stateMenulist.classList.add('no-auto-hide'); } else { this._stateMenulist.hidden = true; - - let enableTooltip = gViewController.commands["cmd_enableItem"] - .getTooltip(this.mAddon); - this._enableBtn.setAttribute("tooltiptext", enableTooltip); if (this.hasPermission("enable")) { this._enableBtn.hidden = false; + let tooltip = gViewController.commands["cmd_enableItem"] + .getTooltip(this.mAddon); + this._enableBtn.setAttribute("tooltiptext", tooltip); } else { this._enableBtn.hidden = true; } - let disableTooltip = gViewController.commands["cmd_disableItem"] - .getTooltip(this.mAddon); - this._disableBtn.setAttribute("tooltiptext", disableTooltip); if (this.hasPermission("disable")) { this._disableBtn.hidden = false; + let tooltip = gViewController.commands["cmd_disableItem"] + .getTooltip(this.mAddon); + this._disableBtn.setAttribute("tooltiptext", tooltip); } else { this._disableBtn.hidden = true; } } - let uninstallTooltip = gViewController.commands["cmd_uninstallItem"] - .getTooltip(this.mAddon); - this._removeBtn.setAttribute("tooltiptext", uninstallTooltip); if (this.hasPermission("uninstall")) { this._removeBtn.hidden = false; + let tooltip = gViewController.commands["cmd_uninstallItem"] + .getTooltip(this.mAddon); + this._removeBtn.setAttribute("tooltiptext", tooltip); } else { this._removeBtn.hidden = true; } @@ -1370,6 +1432,12 @@ this.mAddon.install.state != AddonManager.STATE_INSTALLED); this._showStatus(showProgress ? "progress" : "none"); + let debuggable = this.mAddon.isDebuggable && + Services.prefs.getBoolPref('devtools.chrome.enabled') && + Services.prefs.getBoolPref('devtools.debugger.remote-enabled'); + + this._debugBtn.disabled = this._debugBtn.hidden = !debuggable + if (this.mAddon.type == "experiment") { this.removeAttribute("notification"); let prefix = "experiment."; @@ -1403,9 +1471,18 @@ ]]></body> </method> + <method name="_updateUpgradeInfo"> + <body><![CDATA[ + // Only update the version string if we're displaying the upgrade info + if (this.hasAttribute("upgrade") && shouldShowVersionNumber(this.mAddon)) + this._version.value = this.mManualUpdate.version; + ]]></body> + </method> + <method name="_fetchReleaseNotes"> <parameter name="aURI"/> <body><![CDATA[ + var self = this; if (!aURI || this._relNotesLoaded) { sendToggleEvent(); return; @@ -1417,17 +1494,17 @@ this._relNotesLoading.hidden = false; this._relNotesError.hidden = true; - let sendToggleEvent = () => { + function sendToggleEvent() { var event = document.createEvent("Events"); event.initEvent("RelNotesToggle", true, true); - this.dispatchEvent(event); + self.dispatchEvent(event); } - let showRelNotes = () => { + function showRelNotes() { if (!relNotesData || !transformData) return; - this._relNotesLoading.hidden = true; + self._relNotesLoading.hidden = true; var processor = Components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createInstance(Components.interfaces.nsIXSLTProcessor); @@ -1435,20 +1512,20 @@ processor.importStylesheet(transformData); var fragment = processor.transformToFragment(relNotesData, document); - this._relNotes.appendChild(fragment); - if (this.hasAttribute("show-relnotes")) { - var container = this._relNotesContainer; + self._relNotes.appendChild(fragment); + if (self.hasAttribute("show-relnotes")) { + var container = self._relNotesContainer; container.style.height = container.scrollHeight + "px"; } sendToggleEvent(); } - let handleError = () => { + function handleError() { dataReq.abort(); styleReq.abort(); - this._relNotesLoading.hidden = true; - this._relNotesError.hidden = false; - this._relNotesLoaded = false; // allow loading to be re-tried + self._relNotesLoading.hidden = true; + self._relNotesError.hidden = false; + self._relNotesLoaded = false; // allow loading to be re-tried sendToggleEvent(); } @@ -1471,7 +1548,6 @@ var dataReq = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] .createInstance(Components.interfaces.nsIXMLHttpRequest); dataReq.open("GET", aURI.spec, true); - dataReq.responseType = "document"; dataReq.addEventListener("load", handleResponse, false); dataReq.addEventListener("error", handleError, false); dataReq.send(null); @@ -1479,7 +1555,6 @@ var styleReq = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] .createInstance(Components.interfaces.nsIXMLHttpRequest); styleReq.open("GET", UPDATES_RELEASENOTES_TRANSFORMFILE, true); - styleReq.responseType = "document"; styleReq.addEventListener("load", handleResponse, false); styleReq.addEventListener("error", handleError, false); styleReq.send(null); @@ -1555,6 +1630,12 @@ ]]></body> </method> + <method name="debug"> + <body><![CDATA[ + gViewController.doCommand("cmd_debugItem", this.mAddon); + ]]></body> + </method> + <method name="showPreferences"> <body><![CDATA[ gViewController.doCommand("cmd_showItemPreferences", this.mAddon); @@ -1637,7 +1718,6 @@ <parameter name="aProperties"/> <body><![CDATA[ if (aProperties.indexOf("appDisabled") != -1 || - aProperties.indexOf("signedState") != -1 || aProperties.indexOf("userDisabled") != -1) this._updateState(); ]]></body> @@ -1689,6 +1769,7 @@ this.mManualUpdate = aInstall; this._showStatus("update-available"); + this._updateUpgradeInfo(); ]]></body> </method> @@ -1890,7 +1971,8 @@ </xul:vbox> <xul:vbox class="fade name-outer-container" flex="1"> <xul:hbox class="name-container"> - <xul:label anonid="name" class="name" crop="end" tooltip="addonitem-tooltip"/> + <xul:label anonid="name" class="name" crop="end"/> + <xul:label anonid="version" class="version" hidden="true"/> </xul:hbox> </xul:vbox> <xul:vbox class="install-status-container"> @@ -1912,6 +1994,9 @@ <field name="_name"> document.getAnonymousElementByAttribute(this, "anonid", "name"); </field> + <field name="_version"> + document.getAnonymousElementByAttribute(this, "anonid", "version"); + </field> <field name="_warning"> document.getAnonymousElementByAttribute(this, "anonid", "warning"); </field> @@ -1939,6 +2024,14 @@ this._icon.src = this.mAddon.iconURL || (this.mInstall ? this.mInstall.iconURL : ""); this._name.value = this.mAddon.name; + + if (this.mAddon.version) { + this._version.value = this.mAddon.version; + this._version.hidden = false; + } else { + this._version.hidden = true; + } + } else { this._icon.src = this.mInstall.iconURL; // AddonInstall.name isn't always available - fallback to filename @@ -1952,6 +2045,13 @@ url.QueryInterface(Components.interfaces.nsIURL); this._name.value = url.fileName; } + + if (this.mInstall.version) { + this._version.value = this.mInstall.version; + this._version.hidden = false; + } else { + this._version.hidden = true; + } } if (this.mInstall.state == AddonManager.STATE_DOWNLOAD_FAILED) { |