mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
1. Restore add-on version numbers 2. Hidden preference to toggle add-on version in add-on manager Puts Show add-on version in add-on manager add-on list behind user preference "extensions.addonVersionInfo", currently on by default (Change ported from Waterfox)
This commit is contained in:
parent
593762743f
commit
d9fb4e872d
3 changed files with 36 additions and 3 deletions
|
|
@ -1174,7 +1174,8 @@
|
|||
else
|
||||
this._icon.src = "";
|
||||
|
||||
if (shouldShowVersionNumber(this.mAddon))
|
||||
if (shouldShowVersionNumber(this.mAddon) &&
|
||||
Services.prefs.getBoolPref("extensions.addonVersionInfo", true))
|
||||
this._version.value = this.mAddon.version;
|
||||
else
|
||||
this._version.hidden = true;
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ richlistitem:not([selected]) * {
|
|||
.view-pane[type="experiment"] .addon:not([pending="uninstall"]) .pending,
|
||||
.view-pane[type="experiment"] .disabled-postfix,
|
||||
.view-pane[type="experiment"] .update-postfix,
|
||||
.view-pane[type="experiment"] .version,
|
||||
.view-pane[type="experiment"] .addon-control.enable,
|
||||
.view-pane[type="experiment"] .addon-control.disable,
|
||||
#detail-view[type="experiment"] .alert-container,
|
||||
|
|
|
|||
|
|
@ -808,6 +808,7 @@
|
|||
<xul:hbox class="name-container">
|
||||
<xul:label anonid="name" class="name" crop="end" flex="1"
|
||||
tooltip="addonitem-tooltip" xbl:inherits="value=name"/>
|
||||
<xul:label anonid="version" class="version"/>
|
||||
<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 -->
|
||||
|
|
@ -986,6 +987,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>
|
||||
|
|
@ -1117,7 +1121,11 @@
|
|||
this._icon.src = iconURL;
|
||||
else
|
||||
this._icon.src = "";
|
||||
|
||||
if (shouldShowVersionNumber(this.mAddon) &&
|
||||
Services.prefs.getBoolPref("extensions.addonVersionInfo", true))
|
||||
this._version.value = this.mAddon.version;
|
||||
else
|
||||
this._version.hidden = true;
|
||||
if (this.mAddon.description)
|
||||
this._description.value = this.mAddon.description;
|
||||
else
|
||||
|
|
@ -1402,7 +1410,13 @@
|
|||
}
|
||||
]]></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[
|
||||
|
|
@ -1689,6 +1703,7 @@
|
|||
|
||||
this.mManualUpdate = aInstall;
|
||||
this._showStatus("update-available");
|
||||
this._updateUpgradeInfo();
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
|
@ -1891,6 +1906,7 @@
|
|||
<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="version" class="version" hidden="true"/>
|
||||
</xul:hbox>
|
||||
</xul:vbox>
|
||||
<xul:vbox class="install-status-container">
|
||||
|
|
@ -1912,6 +1928,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 +1958,12 @@
|
|||
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 +1977,12 @@
|
|||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue