diff options
author | Moonchild <moonchild@palemoon.org> | 2020-06-03 10:51:52 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-06-03 10:51:52 +0000 |
commit | 0ccb51f2aebd7b1f88d1911a32f397218a77129d (patch) | |
tree | 9544ce8b2bb7e021dba0c18408739c9ba4405edf /toolkit/mozapps | |
parent | 5e5f2277f5e6700325618adae685c55716f325c7 (diff) | |
parent | c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810 (diff) | |
download | UXP-0ccb51f2aebd7b1f88d1911a32f397218a77129d.tar UXP-0ccb51f2aebd7b1f88d1911a32f397218a77129d.tar.gz UXP-0ccb51f2aebd7b1f88d1911a32f397218a77129d.tar.lz UXP-0ccb51f2aebd7b1f88d1911a32f397218a77129d.tar.xz UXP-0ccb51f2aebd7b1f88d1911a32f397218a77129d.zip |
Merge branch 'release' of https://github.com/MoonchildProductions/UXP into release
Diffstat (limited to 'toolkit/mozapps')
-rw-r--r-- | toolkit/mozapps/extensions/content/extensions.css | 17 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/content/extensions.js | 13 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/content/extensions.xml | 18 | ||||
-rw-r--r-- | toolkit/mozapps/extensions/internal/XPIProvider.jsm | 19 |
4 files changed, 30 insertions, 37 deletions
diff --git a/toolkit/mozapps/extensions/content/extensions.css b/toolkit/mozapps/extensions/content/extensions.css index 51828d544..41c140565 100644 --- a/toolkit/mozapps/extensions/content/extensions.css +++ b/toolkit/mozapps/extensions/content/extensions.css @@ -152,6 +152,8 @@ setting[type="menulist"] { .addon:not([notification="info"]) .info, .addon:not([pending]) .pending, .addon:not([upgrade="true"]) .update-postfix, +.addon:not([native="true"]) .nativeAddon, +.addon:not([native="false"]) .compatAddon, .addon[active="true"] .disabled-postfix, .addon[pending="install"] .update-postfix, .addon[pending="install"] .disabled-postfix, @@ -264,6 +266,21 @@ richlistitem:not([selected]) * { display: none; } +/* Indicator style for extension target application */ +.addon[native] .nativeIndicator { + margin-left: 5pt; + padding-bottom: 1pt; +} +.addon[native][active="false"] .nativeIndicator { + opacity: 0.4; +} +.addon[native] .nativeAddon { + color: #3366FF; +} +.addon[native] .compatAddon { + color: #FF6600; +} + /* Translators for Language Pack details */ .translators > label { -moz-margin-start: 0px; diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js index 3c3b5894b..9576e9a3b 100644 --- a/toolkit/mozapps/extensions/content/extensions.js +++ b/toolkit/mozapps/extensions/content/extensions.js @@ -3059,19 +3059,6 @@ var gDetailView = { warning.textContent = gStrings.ext.formatStringFromName("details.notification.gmpPending", [this._addon.name], 1); -#ifdef MOZ_PHOENIX_EXTENSIONS - } else if (this._addon.native == false) { - this.node.setAttribute("notification", "warning"); - this.node.setAttribute("native", "false"); - document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName( - "details.notification.compatibility", - [this._addon.name, gStrings.brandShortName], 2 - ); - var warningLink = document.getElementById("detail-warning-link"); - warningLink.value = gStrings.ext.GetStringFromName("details.notification.compatibility.link"); - warningLink.href = Services.urlFormatter.formatURLPref("extensions.compatibility.url"); - warningLink.hidden = false; -#endif } else { this.node.removeAttribute("notification"); } diff --git a/toolkit/mozapps/extensions/content/extensions.xml b/toolkit/mozapps/extensions/content/extensions.xml index e2eef852a..9c8fda8ed 100644 --- a/toolkit/mozapps/extensions/content/extensions.xml +++ b/toolkit/mozapps/extensions/content/extensions.xml @@ -857,6 +857,10 @@ <xul:label anonid="name" class="name" crop="end" flex="1" xbl:inherits="value=name,tooltiptext=name"/> <xul:label anonid="version" class="version"/> +#ifdef MOZ_PHOENIX_EXTENSIONS + <xul:label class="nativeIndicator nativeAddon" value="●" tooltiptext="&addon.nativeAddon;"/> + <xul:label class="nativeIndicator compatAddon" value="●" tooltiptext="&addon.compatAddon;"/> +#endif <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 --> @@ -1355,20 +1359,8 @@ } else { this.removeAttribute("notification"); #ifdef MOZ_PHOENIX_EXTENSIONS - if (this.mAddon.type == "extension") { + if (this.mAddon.type == "extension") this.setAttribute("native", this.mAddon.native); - if (this.mAddon.native == false) { - this.setAttribute("notification", "warning"); - this._warning.textContent = gStrings.ext.formatStringFromName( - "notification.compatibility", - [this.mAddon.name, gStrings.brandShortName], 2 - ); - this._warningLink.value = gStrings.ext.GetStringFromName("notification.compatibility.link"); - this._warningLink.href = Services.urlFormatter.formatURLPref("extensions.compatibility.url"); - this._warningLink.hidden = false; - this._warningBtn.hidden = true; - } - } #endif } } diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index d12e1de59..600ec2ff5 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -6472,8 +6472,8 @@ AddonInternal.prototype = { } else if (app.id == FIREFOX_ID) { version = FIREFOX_APPCOMPATVERSION; - if (this.type != "extension") - //Only allow extensions in Firefox compatibility mode + if (this.type == "locale") + //Never allow language packs in Firefox compatibility mode return false; #endif } @@ -6528,15 +6528,12 @@ AddonInternal.prototype = { app = targetApp; } #ifdef MOZ_PHOENIX_EXTENSIONS - // Special case: check for Firefox TargetApps. this has to be done AFTER - // the initial check to make sure appinfo.ID is preferred, even if - // Firefox is listed before it in the install manifest. - // Only do this for extensions. Other types should not be allowed. - if (this.type == "extension") { - for (let targetApp of this.targetApplications) { - if (targetApp.id == FIREFOX_ID) //Firefox GUID - return targetApp; - } + //Special case: check for Firefox TargetApps. this has to be done AFTER + //the initial check to make sure appinfo.ID is preferred, even if + //Firefox is listed before it in the install manifest. + for (let targetApp of this.targetApplications) { + if (targetApp.id == FIREFOX_ID) //Firefox GUID + return targetApp; } #endif // Return toolkit ID if toolkit. |