Move WebExtensions enabled Add-ons Manager

This commit is contained in:
NTD 2018-02-10 02:49:12 -05:00 • committed by Roy Tam
commit 358cd0404a
1100 changed files with 133 additions and 106 deletions

View file

@ -1,59 +0,0 @@
-------------------------------------------------------
About The Cisco-Provided Binary of OpenH264 Video Codec
-------------------------------------------------------
Cisco provides this program under the terms of the BSD license.
Additionally, this binary is licensed under Cisco’s AVC/H.264 Patent Portfolio License from MPEG LA, at no cost to you, provided that the requirements and conditions shown below in the AVC/H.264 Patent Portfolio sections are met.
As with all AVC/H.264 codecs, you may also obtain your own patent license from MPEG LA or from the individual patent owners, or proceed at your own risk. Your rights from Cisco under the BSD license are not affected by this choice.
For more information on the OpenH264 binary licensing, please see the OpenH264 FAQ found at http://www.openh264.org/faq.html#binary
A corresponding source code to this binary program is available under the same BSD terms, which can be found at http://www.openh264.org
-----------
BSD License
-----------
Copyright © 2014 Cisco Systems, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------
AVC/H.264 Patent Portfolio License Notice
-----------------------------------------
The binary form of this Software is distributed by Cisco under the AVC/H.264 Patent Portfolio License from MPEG LA, and is subject to the following requirements, which may or may not be applicable to your use of this software:
THIS PRODUCT IS LICENSED UNDER THE AVC PATENT PORTFOLIO LICENSE FOR THE PERSONAL USE OF A CONSUMER OR OTHER USES IN WHICH IT DOES NOT RECEIVE REMUNERATION TO (i) ENCODE VIDEO IN COMPLIANCE WITH THE AVC STANDARD (“AVC VIDEO”) AND/OR (ii) DECODE AVC VIDEO THAT WAS ENCODED BY A CONSUMER ENGAGED IN A PERSONAL ACTIVITY AND/OR WAS OBTAINED FROM A VIDEO PROVIDER LICENSED TO PROVIDE AVC VIDEO. NO LICENSE IS GRANTED OR SHALL BE IMPLIED FOR ANY OTHER USE. ADDITIONAL INFORMATION MAY BE OBTAINED FROM MPEG LA, L.L.C. SEE HTTP://WWW.MPEGLA.COM
Accordingly, please be advised that content providers and broadcasters using AVC/H.264 in their service may be required to obtain a separate use license from MPEG LA, referred to as "(b) sublicenses" in the SUMMARY OF AVC/H.264 LICENSE TERMS from MPEG LA found at http://www.openh264.org/mpegla
---------------------------------------------
AVC/H.264 Patent Portfolio License Conditions
---------------------------------------------
In addition, the Cisco-provided binary of this Software is licensed under Cisco's license from MPEG LA only if the following conditions are met:
1. The Cisco-provided binary is separately downloaded to an end user’s device, and not integrated into or combined with third party software prior to being downloaded to the end user’s device;
2. The end user must have the ability to control (e.g., to enable, disable, or re-enable) the use of the Cisco-provided binary;
3. Third party software, in the location where end users can control the use of the Cisco-provided binary, must display the following text:
"OpenH264 Video Codec provided by Cisco Systems, Inc."
4. Any third-party software that makes use of the Cisco-provided binary must reproduce all of the above text, as well as this last condition, in the EULA and/or in another location where licensing information is to be presented to the end user.
v1.0

View file

@ -1,103 +0,0 @@
// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/* import-globals-from ../../../content/contentAreaUtils.js */
var Cu = Components.utils;
Cu.import("resource://gre/modules/AddonManager.jsm");
function init() {
var addon = window.arguments[0];
var extensionsStrings = document.getElementById("extensionsStrings");
document.documentElement.setAttribute("addontype", addon.type);
var iconURL = AddonManager.getPreferredIconURL(addon, 48, window);
if (iconURL) {
var extensionIcon = document.getElementById("extensionIcon");
extensionIcon.src = iconURL;
}
document.title = extensionsStrings.getFormattedString("aboutWindowTitle", [addon.name]);
var extensionName = document.getElementById("extensionName");
extensionName.textContent = addon.name;
var extensionVersion = document.getElementById("extensionVersion");
if (addon.version)
extensionVersion.setAttribute("value", extensionsStrings.getFormattedString("aboutWindowVersionString", [addon.version]));
else
extensionVersion.hidden = true;
var extensionDescription = document.getElementById("extensionDescription");
if (addon.description)
extensionDescription.textContent = addon.description;
else
extensionDescription.hidden = true;
var numDetails = 0;
var extensionCreator = document.getElementById("extensionCreator");
if (addon.creator) {
extensionCreator.setAttribute("value", addon.creator);
numDetails++;
} else {
extensionCreator.hidden = true;
var extensionCreatorLabel = document.getElementById("extensionCreatorLabel");
extensionCreatorLabel.hidden = true;
}
var extensionHomepage = document.getElementById("extensionHomepage");
var homepageURL = addon.homepageURL;
if (homepageURL) {
extensionHomepage.setAttribute("homepageURL", homepageURL);
extensionHomepage.setAttribute("tooltiptext", homepageURL);
numDetails++;
} else {
extensionHomepage.hidden = true;
}
numDetails += appendToList("extensionDevelopers", "developersBox", addon.developers);
numDetails += appendToList("extensionTranslators", "translatorsBox", addon.translators);
numDetails += appendToList("extensionContributors", "contributorsBox", addon.contributors);
if (numDetails == 0) {
var groove = document.getElementById("groove");
groove.hidden = true;
var extensionDetailsBox = document.getElementById("extensionDetailsBox");
extensionDetailsBox.hidden = true;
}
var acceptButton = document.documentElement.getButton("accept");
acceptButton.label = extensionsStrings.getString("aboutWindowCloseButton");
setTimeout(sizeToContent, 0);
}
function appendToList(aHeaderId, aNodeId, aItems) {
var header = document.getElementById(aHeaderId);
var node = document.getElementById(aNodeId);
if (!aItems || aItems.length == 0) {
header.hidden = true;
return 0;
}
for (let currentItem of aItems) {
var label = document.createElement("label");
label.textContent = currentItem;
label.setAttribute("class", "contributor");
node.appendChild(label);
}
return aItems.length;
}
function loadHomepage(aEvent) {
window.close();
openURL(aEvent.target.getAttribute("homepageURL"));
}

View file

@ -1,57 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://mozapps/skin/extensions/about.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://mozapps/locale/extensions/about.dtd">
<dialog id="genericAbout"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init();"
buttons="accept"
buttoniconaccept="close"
onaccept="close();">
<script type="application/javascript" src="chrome://mozapps/content/extensions/about.js"/>
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
<stringbundleset id="aboutSet">
<stringbundle id="extensionsStrings" src="chrome://mozapps/locale/extensions/extensions.properties"/>
</stringbundleset>
<vbox id="clientBox" flex="1">
<hbox class="basic-info">
<vbox pack="center">
<image id="extensionIcon"/>
</vbox>
<vbox flex="1">
<label id="extensionName"/>
<label id="extensionVersion" crop="end"/>
</vbox>
</hbox>
<description id="extensionDescription" class="boxIndent"/>
<separator id="groove" class="groove"/>
<vbox id="extensionDetailsBox" flex="1">
<label id="extensionCreatorLabel" class="sectionTitle">&creator.label;</label>
<hbox id="creatorBox" class="boxIndent">
<label id="extensionCreator" flex="1" crop="end"/>
<label id="extensionHomepage" onclick="if (event.button == 0) { loadHomepage(event); }"
class="text-link" value="&homepage.label;"/>
</hbox>
<label id="extensionDevelopers" class="sectionTitle">&developers.label;</label>
<vbox flex="1" id="developersBox" class="boxIndent"/>
<label id="extensionTranslators" class="sectionTitle">&translators.label;</label>
<vbox flex="1" id="translatorsBox" class="boxIndent"/>
<label id="extensionContributors" class="sectionTitle">&contributors.label;</label>
<vbox flex="1" id="contributorsBox" class="boxIndent"/>
</vbox>
</vbox>
</dialog>

View file

@ -1,11 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
.hardBlockedAddon {
-moz-binding: url("chrome://mozapps/content/extensions/blocklist.xml#hardblockedaddon");
}
.softBlockedAddon {
-moz-binding: url("chrome://mozapps/content/extensions/blocklist.xml#softblockedaddon");
}

View file

@ -1,72 +0,0 @@
// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
Components.utils.import("resource://gre/modules/Services.jsm");
var gArgs;
function init() {
var hasHardBlocks = false;
var hasSoftBlocks = false;
gArgs = window.arguments[0].wrappedJSObject;
// NOTE: We use strings from the "updates.properties" bundleset to change the
// text on the "Cancel" button to "Restart Later". (bug 523784)
let bundle = Services.strings.
createBundle("chrome://mozapps/locale/update/updates.properties");
let cancelButton = document.documentElement.getButton("cancel");
cancelButton.setAttribute("label", bundle.GetStringFromName("restartLaterButton"));
cancelButton.setAttribute("accesskey",
bundle.GetStringFromName("restartLaterButton.accesskey"));
var richlist = document.getElementById("addonList");
var list = gArgs.list;
list.sort(function(a, b) { return String.localeCompare(a.name, b.name); });
for (let listItem of list) {
let item = document.createElement("richlistitem");
item.setAttribute("name", listItem.name);
item.setAttribute("version", listItem.version);
item.setAttribute("icon", listItem.icon);
if (listItem.blocked) {
item.setAttribute("class", "hardBlockedAddon");
hasHardBlocks = true;
}
else {
item.setAttribute("class", "softBlockedAddon");
hasSoftBlocks = true;
}
richlist.appendChild(item);
}
if (hasHardBlocks && hasSoftBlocks)
document.getElementById("bothMessage").hidden = false;
else if (hasHardBlocks)
document.getElementById("hardBlockMessage").hidden = false;
else
document.getElementById("softBlockMessage").hidden = false;
var link = document.getElementById("moreInfo");
if (list.length == 1 && list[0].url) {
link.setAttribute("href", list[0].url);
}
else {
var url = Services.urlFormatter.formatURLPref("extensions.blocklist.detailsURL");
link.setAttribute("href", url);
}
}
function finish(shouldRestartNow) {
gArgs.restart = shouldRestartNow;
var list = gArgs.list;
var items = document.getElementById("addonList").childNodes;
for (let i = 0; i < list.length; i++) {
if (!list[i].blocked)
list[i].disable = items[i].checked;
}
return true;
}

View file

@ -1,58 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE bindings [
<!ENTITY % blocklistDTD SYSTEM "chrome://mozapps/locale/extensions/blocklist.dtd" >
%blocklistDTD;
]>
<bindings id="blocklistBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="hardblockedaddon">
<content align="start">
<xul:image xbl:inherits="src=icon"/>
<xul:vbox flex="1">
<xul:hbox class="addon-name-version">
<xul:label class="addonName" crop="end" xbl:inherits="value=name"/>
<xul:label class="addonVersion" xbl:inherits="value=version"/>
</xul:hbox>
<xul:hbox>
<xul:spacer flex="1"/>
<xul:label class="blockedLabel" value="&blocklist.blocked.label;"/>
</xul:hbox>
</xul:vbox>
</content>
</binding>
<binding id="softblockedaddon">
<content align="start">
<xul:image xbl:inherits="src=icon"/>
<xul:vbox flex="1">
<xul:hbox class="addon-name-version">
<xul:label class="addonName" crop="end" xbl:inherits="value=name"/>
<xul:label class="addonVersion" xbl:inherits="value=version"/>
</xul:hbox>
<xul:hbox>
<xul:spacer flex="1"/>
<xul:checkbox class="disableCheckbox" checked="true" label="&blocklist.checkbox.label;"/>
</xul:hbox>
</xul:vbox>
</content>
<implementation>
<field name="_checkbox">
document.getAnonymousElementByAttribute(this, "class", "disableCheckbox")
</field>
<property name="checked" readonly="true">
<getter>
return this._checkbox.checked;
</getter>
</property>
</implementation>
</binding>
</bindings>

View file

@ -1,46 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://mozapps/skin/extensions/blocklist.css"?>
<?xml-stylesheet href="chrome://mozapps/content/extensions/blocklist.css"?>
<!DOCTYPE dialog [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
%brandDTD;
<!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/blocklist.dtd">
%extensionsDTD;
]>
<dialog windowtype="Addons:Blocklist" title="&blocklist.title;" align="stretch"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init();" ondialogaccept="return finish(true)"
ondialogcancel="return finish(false)"
buttons="accept,cancel" style="&blocklist.style;"
buttonlabelaccept="&blocklist.accept.label;"
buttonaccesskeyaccept="&blocklist.accept.accesskey;">
<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/javascript" src="chrome://mozapps/content/extensions/blocklist.js"/>
<hbox align="stretch" flex="1">
<vbox pack="start">
<image class="error-icon"/>
</vbox>
<vbox flex="1">
<label>&blocklist.summary;</label>
<separator class="thin"/>
<richlistbox id="addonList" flex="1"/>
<separator class="thin"/>
<description id="bothMessage" hidden="true" class="bold">&blocklist.softandhard;</description>
<description id="hardBlockMessage" hidden="true" class="bold">&blocklist.hardblocked;</description>
<description id="softBlockMessage" hidden="true" class="bold">&blocklist.softblocked;</description>
<hbox pack="start">
<label id="moreInfo" class="text-link" value="&blocklist.moreinfo;"/>
</hbox>
</vbox>
</hbox>
</dialog>

View file

@ -1,25 +0,0 @@
// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var Cu = Components.utils;
Cu.import("resource://gre/modules/AddonManager.jsm");
function Startup() {
var bundle = document.getElementById("extensionsStrings");
var addon = window.arguments[0].addon;
document.documentElement.setAttribute("addontype", addon.type);
var iconURL = AddonManager.getPreferredIconURL(addon, 48, window);
if (iconURL)
document.getElementById("icon").src = iconURL;
var label = document.createTextNode(bundle.getFormattedString("eulaHeader", [addon.name]));
document.getElementById("heading").appendChild(label);
document.getElementById("eula").value = addon.eula;
}

View file

@ -1,35 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://mozapps/skin/extensions/eula.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
%brandDTD;
<!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/extensions.dtd">
%extensionsDTD;
]>
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&eula.title;" width="&eula.width;" height="&eula.height;"
buttons="accept,cancel" buttonlabelaccept="&eula.accept;"
ondialogaccept="window.arguments[0].accepted = true"
onload="Startup();">
<script type="application/javascript" src="chrome://mozapps/content/extensions/eula.js"/>
<stringbundleset id="extensionsSet">
<stringbundle id="extensionsStrings" src="chrome://mozapps/locale/extensions/extensions.properties"/>
</stringbundleset>
<hbox id="heading-container">
<image id="icon"/>
<label id="heading" flex="1"/>
</hbox>
<textbox id="eula" multiline="true" readonly="true" flex="1"/>
</dialog>

View file

@ -1,270 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@namespace xhtml "http://www.w3.org/1999/xhtml";
/* HTML link elements do weird things to the layout if they are not hidden */
xhtml|link {
display: none;
}
#categories {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#categories-list");
}
.category {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#category");
}
.sort-controls {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#sorters");
}
.addon[status="installed"] {
-moz-box-orient: vertical;
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#addon-generic");
}
.addon[status="installing"] {
-moz-box-orient: vertical;
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#addon-installing");
}
.addon[pending="uninstall"] {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#addon-uninstalled");
}
.creator {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#creator-link");
}
.meta-rating {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#rating");
}
.download-progress, .download-progress[mode="undetermined"] {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#download-progress");
}
.install-status {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#install-status");
}
.detail-row {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#detail-row");
}
.text-list {
white-space: pre-line;
-moz-user-select: element;
}
setting, row[unsupported="true"] {
display: none;
}
setting[type="bool"] {
display: -moz-grid-line;
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-bool");
}
setting[type="bool"][localized="true"] {
display: -moz-grid-line;
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-localized-bool");
}
setting[type="bool"]:not([learnmore]) .preferences-learnmore,
setting[type="boolint"]:not([learnmore]) .preferences-learnmore {
visibility: collapse;
}
setting[type="boolint"] {
display: -moz-grid-line;
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-boolint");
}
setting[type="integer"] {
display: -moz-grid-line;
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-integer");
}
setting[type="integer"]:not([size]) textbox {
-moz-box-flex: 1;
}
setting[type="control"] {
display: -moz-grid-line;
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-control");
}
setting[type="string"] {
display: -moz-grid-line;
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-string");
}
setting[type="color"] {
display: -moz-grid-line;
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-color");
}
setting[type="file"],
setting[type="directory"] {
display: -moz-grid-line;
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-path");
}
setting[type="radio"],
setting[type="menulist"] {
display: -moz-grid-line;
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-multi");
}
#addonitem-popup > menuitem[disabled="true"] {
display: none;
}
#addonitem-popup[addontype="theme"] > #menuitem_enableItem,
#addonitem-popup[addontype="theme"] > #menuitem_disableItem,
#addonitem-popup:not([addontype="theme"]) > #menuitem_enableTheme,
#addonitem-popup:not([addontype="theme"]) > #menuitem_disableTheme {
display: none;
}
#show-disabled-unsigned-extensions .button-text {
margin-inline-start: 3px !important;
margin-inline-end: 2px !important;
}
#header-searching:not([active]) {
visibility: hidden;
}
#search-list[local="false"] > .addon[remote="false"],
#search-list[remote="false"] > .addon[remote="true"] {
visibility: collapse;
}
#detail-view {
overflow: auto;
}
.addon:not([notification="warning"]) .warning,
.addon:not([notification="error"]) .error,
.addon:not([notification="info"]) .info,
.addon:not([pending]) .pending,
.addon:not([upgrade="true"]) .update-postfix,
.addon[active="true"] .disabled-postfix,
.addon[pending="install"] .update-postfix,
.addon[pending="install"] .disabled-postfix,
#detail-view:not([notification="warning"]) .warning,
#detail-view:not([notification="error"]) .error,
#detail-view:not([notification="info"]) .info,
#detail-view:not([pending]) .pending,
#detail-view:not([upgrade="true"]) .update-postfix,
#detail-view[active="true"] .disabled-postfix,
#detail-view[loading] .detail-view-container,
#detail-view:not([loading]) .alert-container,
.detail-row:not([value]),
#search-list[remote="false"] #search-allresults-link {
display: none;
}
#addons-page:not([warning]) #list-view > .global-warning-container {
display: none;
}
#addon-list .date-updated {
display: none;
}
.view-pane:not(#updates-view) .addon .relnotes-toggle,
.view-pane:not(#updates-view) .addon .include-update,
#updates-view:not([updatetype="available"]) .addon .include-update,
#updates-view[updatetype="available"] .addon .update-available-notice {
display: none;
}
#addons-page:not([warning]) .global-warning,
#addons-page:not([warning="safemode"]) .global-warning-safemode,
#addons-page:not([warning="checkcompatibility"]) .global-warning-checkcompatibility,
#addons-page:not([warning="updatesecurity"]) .global-warning-updatesecurity {
display: none;
}
/* Plugins aren't yet disabled by safemode (bug 342333),
so don't show that warning when viewing plugins. */
#addons-page[warning="safemode"] .view-pane[type="plugin"] .global-warning-container,
#addons-page[warning="safemode"] #detail-view[loading="true"] .global-warning {
display: none;
}
#addons-page .view-pane:not([type="plugin"]) #plugindeprecation-notice {
display: none;
}
#addons-page .view-pane:not([type="experiment"]) .experiment-info-container {
display: none;
}
.addon .relnotes {
-moz-user-select: text;
}
#detail-name, #detail-desc, #detail-fulldesc {
-moz-user-select: text;
}
/* Make sure we're not animating hidden images. See bug 623739. */
#view-port:not([selectedIndex="0"]) #discover-view .loading,
#discover-view:not([selectedIndex="0"]) .loading {
display: none;
}
/* Elements in unselected richlistitems cannot be focused */
richlistitem:not([selected]) * {
-moz-user-focus: ignore;
}
#header-search {
width: 22em;
}
#header-utils-btn {
-moz-user-focus: normal;
}
.discover-button[disabled="true"] {
display: none;
}
#experiments-learn-more[disabled="true"] {
display: none;
}
#experiments-change-telemetry[disabled="true"] {
display: none;
}
.view-pane[type="experiment"] .error,
.view-pane[type="experiment"] .warning,
.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"] .addon-control.enable,
.view-pane[type="experiment"] .addon-control.disable,
#detail-view[type="experiment"] .alert-container,
#detail-view[type="experiment"] #detail-version,
#detail-view[type="experiment"] #detail-creator,
#detail-view[type="experiment"] #detail-enable-btn,
#detail-view[type="experiment"] #detail-disable-btn {
display: none;
}
.view-pane:not([type="experiment"]) .experiment-container,
.view-pane:not([type="experiment"]) #detail-experiment-container {
display: none;
}
.addon[type="experiment"][status="installing"] .experiment-time,
.addon[type="experiment"][status="installing"] .experiment-state {
display: none;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,715 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://mozapps/content/extensions/extensions.css"?>
<?xml-stylesheet href="chrome://mozapps/skin/extensions/extensions.css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/extensions.dtd">
%extensionsDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
id="addons-page" title="&addons.windowTitle;"
role="application" windowtype="Addons:Manager"
disablefastfind="true">
<xhtml:link rel="shortcut icon"
href="chrome://mozapps/skin/extensions/extensionGeneric-16.png"/>
<script type="application/javascript"
src="chrome://mozapps/content/extensions/extensions.js"/>
<script type="application/javascript"
src="chrome://global/content/contentAreaUtils.js"/>
<popupset>
<!-- menu for an addon item -->
<menupopup id="addonitem-popup">
<menuitem id="menuitem_showDetails" command="cmd_showItemDetails"
default="true" label="&cmd.showDetails.label;"
accesskey="&cmd.showDetails.accesskey;"/>
<menuitem id="menuitem_enableItem" command="cmd_enableItem"
label="&cmd.enableAddon.label;"
accesskey="&cmd.enableAddon.accesskey;"/>
<menuitem id="menuitem_disableItem" command="cmd_disableItem"
label="&cmd.disableAddon.label;"
accesskey="&cmd.disableAddon.accesskey;"/>
<menuitem id="menuitem_enableTheme" command="cmd_enableItem"
label="&cmd.enableTheme.label;"
accesskey="&cmd.enableTheme.accesskey;"/>
<menuitem id="menuitem_disableTheme" command="cmd_disableItem"
label="&cmd.disableTheme.label;"
accesskey="&cmd.disableTheme.accesskey;"/>
<menuitem id="menuitem_installItem" command="cmd_installItem"
label="&cmd.installAddon.label;"
accesskey="&cmd.installAddon.accesskey;"/>
<menuitem id="menuitem_uninstallItem" command="cmd_uninstallItem"
label="&cmd.uninstallAddon.label;"
accesskey="&cmd.uninstallAddon.accesskey;"/>
<menuseparator id="addonitem-menuseparator" />
<menuitem id="menuitem_preferences" command="cmd_showItemPreferences"
#ifdef XP_WIN
label="&cmd.preferencesWin.label;"
accesskey="&cmd.preferencesWin.accesskey;"/>
#else
label="&cmd.preferencesUnix.label;"
accesskey="&cmd.preferencesUnix.accesskey;"/>
#endif
<menuitem id="menuitem_findUpdates" command="cmd_findItemUpdates"
label="&cmd.findUpdates.label;"
accesskey="&cmd.findUpdates.accesskey;"/>
<menuitem id="menuitem_about" command="cmd_showItemAbout"
label="&cmd.about.label;"
accesskey="&cmd.about.accesskey;"/>
</menupopup>
<tooltip id="addonitem-tooltip"/>
</popupset>
<!-- global commands - these act on all addons, or affect the addons manager
in some other way -->
<commandset id="globalCommandSet">
<!-- XXXsw remove useless oncommand attribute once bug 371900 is fixed -->
<command id="cmd_focusSearch" oncommand=";"/>
<command id="cmd_findAllUpdates"/>
<command id="cmd_restartApp"/>
<command id="cmd_goToDiscoverPane"/>
<command id="cmd_goToRecentUpdates"/>
<command id="cmd_goToAvailableUpdates"/>
<command id="cmd_installFromFile"/>
<command id="cmd_debugAddons"/>
<command id="cmd_back"/>
<command id="cmd_forward"/>
<command id="cmd_enableCheckCompatibility"/>
<command id="cmd_enableUpdateSecurity"/>
<command id="cmd_toggleAutoUpdateDefault"/>
<command id="cmd_resetAddonAutoUpdate"/>
<command id="cmd_experimentsLearnMore"/>
<command id="cmd_experimentsOpenTelemetryPreferences"/>
<command id="cmd_showUnsignedExtensions"/>
<command id="cmd_showAllExtensions"/>
</commandset>
<!-- view commands - these act on the selected addon -->
<commandset id="viewCommandSet"
events="richlistbox-select" commandupdater="true">
<command id="cmd_showItemDetails"/>
<command id="cmd_findItemUpdates"/>
<command id="cmd_showItemPreferences"/>
<command id="cmd_showItemAbout"/>
<command id="cmd_enableItem"/>
<command id="cmd_disableItem"/>
<command id="cmd_installItem"/>
<command id="cmd_purchaseItem"/>
<command id="cmd_uninstallItem"/>
<command id="cmd_cancelUninstallItem"/>
<command id="cmd_cancelOperation"/>
<command id="cmd_contribute"/>
<command id="cmd_askToActivateItem"/>
<command id="cmd_alwaysActivateItem"/>
<command id="cmd_neverActivateItem"/>
</commandset>
<keyset>
<key id="focusSearch" key="&search.commandkey;" modifiers="accel"
command="cmd_focusSearch"/>
</keyset>
<hbox flex="1">
<vbox>
<hbox id="nav-header"
align="center"
pack="center">
<toolbarbutton id="back-btn"
class="nav-button header-button"
command="cmd_back"
tooltiptext="&cmd.back.tooltip;"
hidden="true"
disabled="true"/>
<toolbarbutton id="forward-btn"
class="nav-button header-button"
command="cmd_forward"
tooltiptext="&cmd.forward.tooltip;"
hidden="true"
disabled="true"/>
</hbox>
<!-- category list -->
<richlistbox id="categories" flex="1">
<richlistitem id="category-search" value="addons://search/"
class="category"
name="&view.search.label;" priority="0"
tooltiptext="&view.search.label;" disabled="true"/>
<richlistitem id="category-discover" value="addons://discover/"
class="category"
name="&view.discover.label;" priority="1000"
tooltiptext="&view.discover.label;"/>
<richlistitem id="category-availableUpdates" value="addons://updates/available"
class="category"
name="&view.availableUpdates.label;" priority="100000"
tooltiptext="&view.availableUpdates.label;"
disabled="true"/>
<richlistitem id="category-recentUpdates" value="addons://updates/recent"
class="category"
name="&view.recentUpdates.label;" priority="101000"
tooltiptext="&view.recentUpdates.label;" disabled="true"/>
</richlistbox>
</vbox>
<vbox class="main-content" flex="1">
<!-- view port -->
<deck id="view-port" flex="1" selectedIndex="0">
<!-- discover view -->
<deck id="discover-view" flex="1" class="view-pane" selectedIndex="0" tabindex="0">
<vbox id="discover-loading" align="center" pack="stretch" flex="1" class="alert-container">
<spacer class="alert-spacer-before"/>
<hbox class="alert loading" align="center">
<image/>
<label value="&loading.label;"/>
</hbox>
<spacer class="alert-spacer-after"/>
</vbox>
<vbox id="discover-error" align="center" pack="stretch" flex="1" class="alert-container">
<spacer class="alert-spacer-before"/>
<hbox>
<spacer class="discover-spacer-before"/>
<hbox class="alert" align="center">
<image class="discover-logo"/>
<vbox flex="1" align="stretch">
<label class="discover-title">&discover.title;</label>
<description class="discover-description">&discover.description2;</description>
<description class="discover-footer">&discover.footer;</description>
</vbox>
</hbox>
<spacer class="discover-spacer-after"/>
</hbox>
<spacer class="alert-spacer-after"/>
</vbox>
<browser id="discover-browser" type="content" flex="1"
disablehistory="true" homepage="about:blank"/>
</deck>
<!-- container for views with the search/tools header -->
<vbox id="headered-views" flex="1">
<!-- main header -->
<hbox id="header" align="center">
<button id="show-all-extensions" hidden="true"
label="&showAllExtensions.button.label;"
command="cmd_showAllExtensions"/>
<spacer flex="1"/>
<hbox id="updates-container" align="center">
<image class="spinner"/>
<label id="updates-noneFound" hidden="true"
value="&updates.noneFound.label;"/>
<button id="updates-manualUpdatesFound-btn" class="button-link"
hidden="true" label="&updates.manualUpdatesFound.label;"
command="cmd_goToAvailableUpdates"/>
<label id="updates-progress" hidden="true"
value="&updates.updating.label;"/>
<label id="updates-installed" hidden="true"
value="&updates.installed.label;"/>
<label id="updates-downloaded" hidden="true"
value="&updates.downloaded.label;"/>
<button id="updates-restart-btn" class="button-link" hidden="true"
label="&updates.restart.label;"
command="cmd_restartApp"/>
</hbox>
<button id="show-disabled-unsigned-extensions" hidden="true"
class="warning"
label="&showUnsignedExtensions.button.label;"
command="cmd_showUnsignedExtensions"/>
<toolbarbutton id="header-utils-btn" class="header-button" type="menu"
tooltiptext="&toolsMenu.tooltip;">
<menupopup id="utils-menu">
<menuitem id="utils-updateNow"
label="&updates.checkForUpdates.label;"
accesskey="&updates.checkForUpdates.accesskey;"
command="cmd_findAllUpdates"/>
<menuitem id="utils-viewUpdates"
label="&updates.viewUpdates.label;"
accesskey="&updates.viewUpdates.accesskey;"
command="cmd_goToRecentUpdates"/>
<menuseparator id="utils-installFromFile-separator"/>
<menuitem id="utils-installFromFile"
label="&installAddonFromFile.label;"
accesskey="&installAddonFromFile.accesskey;"
command="cmd_installFromFile"/>
<menuitem id="utils-debugAddons"
label="&debugAddons.label;"
accesskey="&debugAddons.accesskey;"
command="cmd_debugAddons"/>
<menuseparator/>
<menuitem id="utils-autoUpdateDefault"
label="&updates.updateAddonsAutomatically.label;"
accesskey="&updates.updateAddonsAutomatically.accesskey;"
type="checkbox" autocheck="false"
command="cmd_toggleAutoUpdateDefault"/>
<menuitem id="utils-resetAddonUpdatesToAutomatic"
label="&updates.resetUpdatesToAutomatic.label;"
accesskey="&updates.resetUpdatesToAutomatic.accesskey;"
command="cmd_resetAddonAutoUpdate"/>
<menuitem id="utils-resetAddonUpdatesToManual"
label="&updates.resetUpdatesToManual.label;"
accesskey="&updates.resetUpdatesToManual.accesskey;"
command="cmd_resetAddonAutoUpdate"/>
</menupopup>
</toolbarbutton>
<textbox id="header-search" type="search" searchbutton="true"
searchbuttonlabel="&search.buttonlabel;"
placeholder="&search.placeholder;"/>
</hbox>
<deck id="headered-views-content" flex="1" selectedIndex="0">
<!-- search view -->
<vbox id="search-view" flex="1" class="view-pane" tabindex="0">
<hbox class="view-header global-warning-container" align="center">
<!-- global warnings -->
<hbox class="global-warning" flex="1">
<hbox class="global-warning-safemode" flex="1" align="center"
tooltiptext="&warning.safemode.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.safemode.label;"/>
</hbox>
<hbox class="global-warning-checkcompatibility" flex="1" align="center"
tooltiptext="&warning.checkcompatibility.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.checkcompatibility.label;"/>
</hbox>
<button class="button-link global-warning-checkcompatibility"
label="&warning.checkcompatibility.enable.label;"
tooltiptext="&warning.checkcompatibility.enable.tooltip;"
command="cmd_enableCheckCompatibility"/>
<hbox class="global-warning-updatesecurity" flex="1" align="center"
tooltiptext="&warning.updatesecurity.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.updatesecurity.label;"/>
</hbox>
<button class="button-link global-warning-updatesecurity"
label="&warning.updatesecurity.enable.label;"
tooltiptext="&warning.updatesecurity.enable.tooltip;"
command="cmd_enableUpdateSecurity"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
<spacer flex="1"/>
<hbox id="search-sorters" class="sort-controls"
showrelevance="true" sortby="relevancescore" ascending="false"/>
</hbox>
<hbox id="search-filter" align="center">
<label id="search-filter-label" value="&search.filter2.label;"/>
<radiogroup id="search-filter-radiogroup" orient="horizontal"
align="center" persist="value" value="remote">
<radio id="search-filter-local" class="search-filter-radio"
label="&search.filter2.installed.label;" value="local"
tooltiptext="&search.filter2.installed.tooltip;"/>
<radio id="search-filter-remote" class="search-filter-radio"
label="&search.filter2.available.label;" value="remote"
tooltiptext="&search.filter2.available.tooltip;"/>
</radiogroup>
</hbox>
<vbox id="search-loading" class="alert-container"
flex="1" hidden="true">
<spacer class="alert-spacer-before"/>
<hbox class="alert loading" align="center">
<image/>
<label value="&loading.label;"/>
</hbox>
<spacer class="alert-spacer-after"/>
</vbox>
<vbox id="search-list-empty" class="alert-container"
flex="1" hidden="true">
<spacer class="alert-spacer-before"/>
<vbox class="alert">
<label value="&listEmpty.search.label;"/>
<button class="discover-button"
id="discover-button-search"
label="&listEmpty.button.label;"
command="cmd_goToDiscoverPane"/>
</vbox>
<spacer class="alert-spacer-after"/>
</vbox>
<richlistbox id="search-list" class="list" flex="1">
<hbox pack="center">
<label id="search-allresults-link" class="text-link"/>
</hbox>
</richlistbox>
</vbox>
<!-- list view -->
<vbox id="list-view" flex="1" class="view-pane" align="stretch" tabindex="0">
<!-- info UI for add-ons that have been disabled for being unsigned -->
<vbox id="disabled-unsigned-addons-info" hidden="true">
<label id="disabled-unsigned-addons-heading" value="&disabledUnsigned.heading;"/>
<description>
&disabledUnsigned.description.start;<label class="text-link plain" id="find-alternative-addons">&disabledUnsigned.description.findAddonsLink;</label>&disabledUnsigned.description.end;
</description>
<hbox pack="start"><label class="text-link" id="signing-learn-more">&disabledUnsigned.learnMore;</label></hbox>
<description id="signing-dev-info">
&disabledUnsigned.devInfo.start;<label class="text-link plain" id="signing-dev-manual-link">&disabledUnsigned.devInfo.linkToManual;</label>&disabledUnsigned.devInfo.end;
</description>
</vbox>
<vbox id="plugindeprecation-notice" class="alert-container">
<hbox class="alert">
<description>&pluginDeprecation.description; &#160;
<label class="text-link plain" id="plugindeprecation-learnmore-link">&pluginDeprecation.learnMore;</label>
</description>
</hbox>
</vbox>
<hbox class="view-header global-warning-container">
<!-- global warnings -->
<hbox class="global-warning" flex="1">
<hbox class="global-warning-safemode" flex="1" align="center"
tooltiptext="&warning.safemode.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.safemode.label;"/>
</hbox>
<hbox class="global-warning-checkcompatibility" flex="1" align="center"
tooltiptext="&warning.checkcompatibility.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.checkcompatibility.label;"/>
</hbox>
<button class="button-link global-warning-checkcompatibility"
label="&warning.checkcompatibility.enable.label;"
tooltiptext="&warning.checkcompatibility.enable.tooltip;"
command="cmd_enableCheckCompatibility"/>
<hbox class="global-warning-updatesecurity" flex="1" align="center"
tooltiptext="&warning.updatesecurity.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.updatesecurity.label;"/>
</hbox>
<button class="button-link global-warning-updatesecurity"
label="&warning.updatesecurity.enable.label;"
tooltiptext="&warning.updatesecurity.enable.tooltip;"
command="cmd_enableUpdateSecurity"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
</hbox>
<hbox class="view-header global-info-container experiment-info-container">
<hbox class="global-info" flex="1" align="center">
<label value="&experiment.info.label;"/>
<button id="experiments-learn-more"
label="&experiment.info.learnmore;"
tooltiptext="&experiment.info.learnmore;"
accesskey="&experiment.info.learnmore.accesskey;"
command="cmd_experimentsLearnMore"/>
<button id="experiments-change-telemetry"
label="&experiment.info.changetelemetry;"
tooltiptext="&experiment.info.changetelemetry;"
accesskey="&experiment.info.changetelemetry.accesskey;"
command="cmd_experimentsOpenTelemetryPreferences"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap. -->
</hbox>
</hbox>
<vbox id="addon-list-empty" class="alert-container"
flex="1" hidden="true">
<spacer class="alert-spacer-before"/>
<vbox class="alert">
<label value="&listEmpty.installed.label;"/>
<button class="discover-button"
id="discover-button-install"
label="&listEmpty.button.label;"
command="cmd_goToDiscoverPane"/>
</vbox>
<spacer class="alert-spacer-after"/>
</vbox>
<richlistbox id="addon-list" class="list" flex="1"/>
</vbox>
<!-- updates view -->
<vbox id="updates-view" flex="1" class="view-pane" tabindex="0">
<hbox class="view-header global-warning-container" align="center">
<!-- global warnings -->
<hbox class="global-warning" flex="1">
<hbox class="global-warning-safemode" flex="1" align="center"
tooltiptext="&warning.safemode.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.safemode.label;"/>
</hbox>
<hbox class="global-warning-checkcompatibility" flex="1" align="center"
tooltiptext="&warning.checkcompatibility.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.checkcompatibility.label;"/>
</hbox>
<button class="button-link global-warning-checkcompatibility"
label="&warning.checkcompatibility.enable.label;"
tooltiptext="&warning.checkcompatibility.enable.tooltip;"
command="cmd_enableCheckCompatibility"/>
<hbox class="global-warning-updatesecurity" flex="1" align="center"
tooltiptext="&warning.updatesecurity.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.updatesecurity.label;"/>
</hbox>
<button class="button-link global-warning-updatesecurity"
label="&warning.updatesecurity.enable.label;"
tooltiptext="&warning.updatesecurity.enable.tooltip;"
command="cmd_enableUpdateSecurity"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
<spacer flex="1"/>
<hbox id="updates-sorters" class="sort-controls" sortby="updateDate"
ascending="false"/>
</hbox>
<vbox id="updates-list-empty" class="alert-container"
flex="1" hidden="true">
<spacer class="alert-spacer-before"/>
<vbox class="alert">
<label id="empty-availableUpdates-msg" value="&listEmpty.availableUpdates.label;"/>
<label id="empty-recentUpdates-msg" value="&listEmpty.recentUpdates.label;"/>
<button label="&listEmpty.findUpdates.label;"
command="cmd_findAllUpdates"/>
</vbox>
<spacer class="alert-spacer-after"/>
</vbox>
<hbox id="update-actions" pack="center">
<button id="update-selected-btn" hidden="true"
label="&updates.updateSelected.label;"
tooltiptext="&updates.updateSelected.tooltip;"/>
</hbox>
<richlistbox id="updates-list" class="list" flex="1"/>
</vbox>
<!-- detail view -->
<scrollbox id="detail-view" flex="1" class="view-pane addon-view" orient="vertical" tabindex="0"
role="document">
<!-- global warnings -->
<hbox class="global-warning-container global-warning">
<hbox class="global-warning-safemode" flex="1" align="center"
tooltiptext="&warning.safemode.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.safemode.label;"/>
</hbox>
<hbox class="global-warning-checkcompatibility" flex="1" align="center"
tooltiptext="&warning.checkcompatibility.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.checkcompatibility.label;"/>
</hbox>
<button class="button-link global-warning-checkcompatibility"
label="&warning.checkcompatibility.enable.label;"
tooltiptext="&warning.checkcompatibility.enable.tooltip;"
command="cmd_enableCheckCompatibility"/>
<hbox class="global-warning-updatesecurity" flex="1" align="center"
tooltiptext="&warning.updatesecurity.label;">
<image class="warning-icon"/>
<label class="global-warning-text" flex="1" crop="end"
value="&warning.updatesecurity.label;"/>
</hbox>
<button class="button-link global-warning-updatesecurity"
label="&warning.updatesecurity.enable.label;"
tooltiptext="&warning.updatesecurity.enable.tooltip;"
command="cmd_enableUpdateSecurity"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
<hbox flex="1">
<spacer flex="1"/>
<!-- "loading" splash screen -->
<vbox class="alert-container">
<spacer class="alert-spacer-before"/>
<hbox class="alert loading">
<image/>
<label value="&loading.label;"/>
</hbox>
<spacer class="alert-spacer-after"/>
</vbox>
<!-- actual detail view -->
<vbox class="detail-view-container" flex="3" contextmenu="addonitem-popup">
<vbox id="detail-notifications">
<hbox id="warning-container" align="center" class="warning">
<image class="warning-icon"/>
<label id="detail-warning" flex="1"/>
<label id="detail-warning-link" class="text-link"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
<hbox id="error-container" align="center" class="error">
<image class="error-icon"/>
<label id="detail-error" flex="1"/>
<label id="detail-error-link" class="text-link"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
<hbox id="pending-container" align="center" class="pending">
<image class="pending-icon"/>
<label id="detail-pending" flex="1"/>
<button id="detail-restart-btn" class="button-link"
label="&addon.restartNow.label;"
command="cmd_restartApp"/>
<button id="detail-undo-btn" class="button-link"
label="&addon.undoAction.label;"
tooltipText="&addon.undoAction.tooltip;"
command="cmd_cancelOperation"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
</vbox>
<hbox align="start">
<vbox id="detail-icon-container" align="end">
<image id="detail-icon" class="icon"/>
</vbox>
<vbox flex="1">
<vbox id="detail-summary">
<hbox id="detail-name-container" class="name-container"
align="start">
<label id="detail-name" flex="1"/>
<label id="detail-version"/>
<label class="disabled-postfix" value="&addon.disabled.postfix;"/>
<label class="update-postfix" value="&addon.update.postfix;"/>
<spacer flex="5000"/> <!-- Necessary to allow the name to wrap -->
</hbox>
<label id="detail-creator" class="creator"/>
</vbox>
<hbox id="detail-experiment-container">
<svg width="8" height="8" viewBox="0 0 8 8" version="1.1"
xmlns="http://www.w3.org/2000/svg"
id="detail-experiment-bullet-container">
<circle cx="4" cy="4" r="4" id="detail-experiment-bullet"/>
</svg>
<label id="detail-experiment-state"/>
<label id="detail-experiment-time"/>
</hbox>
<hbox id="detail-desc-container" align="start">
<vbox id="detail-screenshot-box" pack="center" hidden="true"> <!-- Necessary to work around bug 394738 -->
<image id="detail-screenshot"/>
</vbox>
<vbox flex="1">
<description id="detail-desc"/>
<description id="detail-fulldesc"/>
</vbox>
</hbox>
<vbox id="detail-contributions">
<description id="detail-contrib-description">
&detail.contributions.description;
</description>
<hbox align="center">
<label id="detail-contrib-suggested"/>
<spacer flex="1"/>
<button id="detail-contrib-btn"
label="&cmd.contribute.label;"
accesskey="&cmd.contribute.accesskey;"
tooltiptext="&cmd.contribute.tooltip;"
command="cmd_contribute"/>
</hbox>
</vbox>
<grid id="detail-grid">
<columns>
<column flex="1"/>
<column flex="2"/>
</columns>
<rows id="detail-rows">
<row class="detail-row-complex" id="detail-updates-row">
<label class="detail-row-label" value="&detail.updateType;"/>
<hbox align="center">
<radiogroup id="detail-autoUpdate" orient="horizontal">
<!-- The values here need to match the values of
AddonManager.AUTOUPDATE_* -->
<radio label="&detail.updateDefault.label;"
tooltiptext="&detail.updateDefault.tooltip;"
value="1"/>
<radio label="&detail.updateAutomatic.label;"
tooltiptext="&detail.updateAutomatic.tooltip;"
value="2"/>
<radio label="&detail.updateManual.label;"
tooltiptext="&detail.updateManual.tooltip;"
value="0"/>
</radiogroup>
<button id="detail-findUpdates-btn" class="button-link"
label="&detail.checkForUpdates.label;"
accesskey="&detail.checkForUpdates.accesskey;"
tooltiptext="&detail.checkForUpdates.tooltip;"
command="cmd_findItemUpdates"/>
</hbox>
</row>
<row class="detail-row" id="detail-dateUpdated" label="&detail.lastupdated.label;"/>
<row class="detail-row-complex" id="detail-homepage-row" label="&detail.home;">
<label class="detail-row-label" value="&detail.home;"/>
<label id="detail-homepage" class="detail-row-value text-link" crop="end"/>
</row>
<row class="detail-row-complex" id="detail-repository-row" label="&detail.repository;">
<label class="detail-row-label" value="&detail.repository;"/>
<label id="detail-repository" class="detail-row-value text-link"/>
</row>
<row class="detail-row" id="detail-size" label="&detail.size;"/>
<row class="detail-row-complex" id="detail-rating-row">
<label class="detail-row-label" value="&rating2.label;"/>
<hbox>
<label id="detail-rating" class="meta-value meta-rating"
showrating="average"/>
<label id="detail-reviews" class="text-link"/>
</hbox>
</row>
<row class="detail-row" id="detail-downloads" label="&detail.numberOfDownloads.label;"/>
</rows>
</grid>
<hbox id="detail-controls">
<button id="detail-prefs-btn" class="addon-control preferences"
#ifdef XP_WIN
label="&detail.showPreferencesWin.label;"
accesskey="&detail.showPreferencesWin.accesskey;"
tooltiptext="&detail.showPreferencesWin.tooltip;"
#else
label="&detail.showPreferencesUnix.label;"
accesskey="&detail.showPreferencesUnix.accesskey;"
tooltiptext="&detail.showPreferencesUnix.tooltip;"
#endif
command="cmd_showItemPreferences"/>
<spacer flex="1"/>
<button id="detail-enable-btn" class="addon-control enable"
label="&cmd.enableAddon.label;"
accesskey="&cmd.enableAddon.accesskey;"
command="cmd_enableItem"/>
<button id="detail-disable-btn" class="addon-control disable"
label="&cmd.disableAddon.label;"
accesskey="&cmd.disableAddon.accesskey;"
command="cmd_disableItem"/>
<button id="detail-uninstall-btn" class="addon-control remove"
label="&cmd.uninstallAddon.label;"
accesskey="&cmd.uninstallAddon.accesskey;"
command="cmd_uninstallItem"/>
<button id="detail-purchase-btn" class="addon-control purchase"
command="cmd_purchaseItem"/>
<button id="detail-install-btn" class="addon-control install"
label="&cmd.installAddon.label;"
accesskey="&cmd.installAddon.accesskey;"
command="cmd_installItem"/>
<menulist id="detail-state-menulist"
crop="none" sizetopopup="always"
tooltiptext="&cmd.stateMenu.tooltip;">
<menupopup>
<menuitem id="detail-ask-to-activate-menuitem"
class="addon-control"
label="&cmd.askToActivate.label;"
tooltiptext="&cmd.askToActivate.tooltip;"
command="cmd_askToActivateItem"/>
<menuitem id="detail-always-activate-menuitem"
class="addon-control"
label="&cmd.alwaysActivate.label;"
tooltiptext="&cmd.alwaysActivate.tooltip;"
command="cmd_alwaysActivateItem"/>
<menuitem id="detail-never-activate-menuitem"
class="addon-control"
label="&cmd.neverActivate.label;"
tooltiptext="&cmd.neverActivate.tooltip;"
command="cmd_neverActivateItem"/>
</menupopup>
</menulist>
</hbox>
</vbox>
</hbox>
</vbox>
<spacer flex="1"/>
</hbox>
</scrollbox>
</deck>
</vbox>
</deck>
</vbox>
</hbox>
</page>

View file

@ -1,8 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!-- This is intentionally empty and a dummy to let the GMPProvider
have a preferences button in the list view. -->

View file

@ -1,165 +0,0 @@
// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const kDialog = "dialog";
/**
* This dialog can be initialized from parameters supplied via window.arguments
* or it can be used to display blocklist notification and blocklist blocked
* installs via nsIDialogParamBlock as is done by nsIExtensionManager.
*
* When using this dialog with window.arguments it must be opened modally, the
* caller can inspect the user action after the dialog closes by inspecting the
* value of the |result| parameter on this object which is set to the dlgtype
* of the button used to close the dialog.
*
* window.arguments[0] is an array of strings to display in the tree. If the
* array is empty the tree will not be displayed.
* window.arguments[1] a JS Object with the following properties:
*
* title: A title string, to be displayed in the title bar of the dialog.
* message1: A message string, displayed above the addon list
* message2: A message string, displayed below the addon list
* message3: A bolded message string, displayed below the addon list
* moreInfoURL: An url for displaying more information
* iconClass : Can be one of the following values (default is alert-icon)
* alert-icon, error-icon, or question-icon
*
* If no value is supplied for message1, message2, message3, or moreInfoURL,
* the element is not displayed.
*
* buttons: {
* accept: { label: "A Label for the Accept button",
* focused: true },
* cancel: { label: "A Label for the Cancel button" },
* ...
* },
*
* result: The dlgtype of button that was used to dismiss the dialog.
*/
"use strict";
var gButtons = { };
function init() {
var de = document.documentElement;
var items = [];
if (window.arguments[0] instanceof Components.interfaces.nsIDialogParamBlock) {
// This is a warning about a blocklisted item the user is trying to install
var args = window.arguments[0];
var softblocked = args.GetInt(0) == 1 ? true : false;
var extensionsBundle = document.getElementById("extensionsBundle");
try {
var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
.getService(Components.interfaces.nsIURLFormatter);
var url = formatter.formatURLPref("extensions.blocklist.detailsURL");
}
catch (e) { }
var params = {
moreInfoURL: url,
};
if (softblocked) {
params.title = extensionsBundle.getString("softBlockedInstallTitle");
params.message1 = extensionsBundle.getFormattedString("softBlockedInstallMsg",
[args.GetString(0)]);
var accept = de.getButton("accept");
accept.label = extensionsBundle.getString("softBlockedInstallAcceptLabel");
accept.accessKey = extensionsBundle.getString("softBlockedInstallAcceptKey");
de.getButton("cancel").focus();
document.addEventListener("dialogaccept", allowInstall, false);
}
else {
params.title = extensionsBundle.getString("blocklistedInstallTitle2");
params.message1 = extensionsBundle.getFormattedString("blocklistedInstallMsg2",
[args.GetString(0)]);
de.buttons = "accept";
de.getButton("accept").focus();
}
}
else {
items = window.arguments[0];
params = window.arguments[1];
}
var addons = document.getElementById("addonsChildren");
if (items.length > 0)
document.getElementById("addonsTree").hidden = false;
// Fill the addons list
for (var item of items) {
var treeitem = document.createElementNS(kXULNS, "treeitem");
var treerow = document.createElementNS(kXULNS, "treerow");
var treecell = document.createElementNS(kXULNS, "treecell");
treecell.setAttribute("label", item);
treerow.appendChild(treecell);
treeitem.appendChild(treerow);
addons.appendChild(treeitem);
}
// Set the messages
var messages = ["message1", "message2", "message3"];
for (let messageEntry of messages) {
if (messageEntry in params) {
var message = document.getElementById(messageEntry);
message.hidden = false;
message.appendChild(document.createTextNode(params[messageEntry]));
}
}
document.getElementById("infoIcon").className =
params["iconClass"] ? "spaced " + params["iconClass"] : "spaced alert-icon";
if ("moreInfoURL" in params && params["moreInfoURL"]) {
message = document.getElementById("moreInfo");
message.value = extensionsBundle.getString("moreInfoText");
message.setAttribute("href", params["moreInfoURL"]);
document.getElementById("moreInfoBox").hidden = false;
}
// Set the window title
if ("title" in params)
document.title = params.title;
// Set up the buttons
if ("buttons" in params) {
gButtons = params.buttons;
var buttonString = "";
for (var buttonType in gButtons)
buttonString += "," + buttonType;
de.buttons = buttonString.substr(1);
for (buttonType in gButtons) {
var button = de.getButton(buttonType);
button.label = gButtons[buttonType].label;
if (gButtons[buttonType].focused)
button.focus();
document.addEventListener(kDialog + buttonType, handleButtonCommand, true);
}
}
}
function shutdown() {
for (var buttonType in gButtons)
document.removeEventListener(kDialog + buttonType, handleButtonCommand, true);
}
function allowInstall() {
var args = window.arguments[0];
args.SetInt(1, 1);
}
/**
* Watch for the user hitting one of the buttons to dismiss the dialog
* and report the result back to the caller through the |result| property on
* the arguments object.
*/
function handleButtonCommand(event) {
window.arguments[1].result = event.type.substr(kDialog.length);
}

View file

@ -1,44 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/"?>
<dialog id="addonList" windowtype="Addons:List"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onunload="shutdown();"
buttons="accept,cancel" onload="init();">
<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/javascript"
src="chrome://mozapps/content/extensions/list.js"/>
<stringbundle id="extensionsBundle"
src="chrome://mozapps/locale/extensions/extensions.properties"/>
<stringbundle id="brandBundle"
src="chrome://branding/locale/brand.properties"/>
<hbox align="start">
<vbox>
<image id="infoIcon"/>
</vbox>
<vbox class="spaced" style="min-width: 20em; max-width: 40em">
<label id="message1" class="spaced" hidden="true"/>
<separator class="thin"/>
<tree id="addonsTree" rows="6" hidecolumnpicker="true" hidden="true" class="spaced">
<treecols style="max-width: 25em;">
<treecol flex="1" id="nameColumn" hideheader="true"/>
</treecols>
<treechildren id="addonsChildren"/>
</tree>
<label id="message2" class="spaced" hidden="true"/>
<label class="bold spaced" id="message3" hidden="true"/>
<hbox id="moreInfoBox" hidden="true">
<label id="moreInfo" class="text-link spaced"/>
<spacer flex="1"/>
</hbox>
</vbox>
</hbox>
</dialog>

View file

@ -1,137 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/AddonManager.jsm");
var gAddon = null;
// If the user enables the add-on through some other UI close this window
var EnableListener = {
onEnabling: function(aAddon) {
if (aAddon.id == gAddon.id)
window.close();
}
}
AddonManager.addAddonListener(EnableListener);
function initialize() {
// About URIs don't implement nsIURL so we have to find the query string
// manually
let spec = document.location.href;
let pos = spec.indexOf("?");
let query = "";
if (pos >= 0)
query = spec.substring(pos + 1);
// Just assume the query is "id=<id>"
let id = query.substring(3);
if (!id) {
window.location = "about:blank";
return;
}
let bundle = Services.strings.createBundle("chrome://mozapps/locale/extensions/newaddon.properties");
AddonManager.getAddonByID(id, function(aAddon) {
// If the add-on doesn't exist or it is already enabled or it has already
// been seen or it cannot be enabled then this UI is useless, just close it.
// This shouldn't normally happen unless session restore restores the tab.
if (!aAddon || !aAddon.userDisabled || aAddon.seen ||
!(aAddon.permissions & AddonManager.PERM_CAN_ENABLE)) {
window.close();
return;
}
gAddon = aAddon;
document.getElementById("addon-info").setAttribute("type", aAddon.type);
let icon = document.getElementById("icon");
if (aAddon.icon64URL)
icon.src = aAddon.icon64URL;
else if (aAddon.iconURL)
icon.src = aAddon.iconURL;
let name = bundle.formatStringFromName("name", [aAddon.name, aAddon.version],
2);
document.getElementById("name").value = name;
if (aAddon.creator) {
let creator = bundle.formatStringFromName("author", [aAddon.creator], 1);
document.getElementById("author").value = creator;
} else {
document.getElementById("author").hidden = true;
}
let uri = "getResourceURI" in aAddon ? aAddon.getResourceURI() : null;
let locationLabel = document.getElementById("location");
if (uri instanceof Ci.nsIFileURL) {
let location = bundle.formatStringFromName("location", [uri.file.path], 1);
locationLabel.value = location;
locationLabel.setAttribute("tooltiptext", location);
} else {
document.getElementById("location").hidden = true;
}
// Only mark the add-on as seen if the page actually gets focus
if (document.hasFocus()) {
aAddon.markAsSeen();
}
else {
document.addEventListener("focus", () => aAddon.markAsSeen(), false);
}
var event = document.createEvent("Events");
event.initEvent("AddonDisplayed", true, true);
document.dispatchEvent(event);
});
}
function unload() {
AddonManager.removeAddonListener(EnableListener);
}
function continueClicked() {
AddonManager.removeAddonListener(EnableListener);
if (document.getElementById("allow").checked) {
gAddon.userDisabled = false;
if (gAddon.pendingOperations & AddonManager.PENDING_ENABLE) {
document.getElementById("allow").disabled = true;
document.getElementById("buttonDeck").selectedPanel = document.getElementById("restartPanel");
return;
}
}
window.close();
}
function restartClicked() {
let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].
createInstance(Ci.nsISupportsPRBool);
Services.obs.notifyObservers(cancelQuit, "quit-application-requested",
"restart");
if (cancelQuit.data)
return; // somebody canceled our quit request
window.close();
let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
getService(Components.interfaces.nsIAppStartup);
appStartup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
}
function cancelClicked() {
gAddon.userDisabled = true;
AddonManager.addAddonListener(EnableListener);
document.getElementById("allow").disabled = false;
document.getElementById("buttonDeck").selectedPanel = document.getElementById("continuePanel");
}

View file

@ -1,67 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://mozapps/skin/extensions/newaddon.css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % newaddonDTD SYSTEM "chrome://mozapps/locale/extensions/newaddon.dtd">
%newaddonDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xhtml="http://www.w3.org/1999/xhtml" title="&title;"
disablefastfind="true" id="addon-page" onload="initialize()"
onunload="unload()" role="application" align="stretch" pack="stretch">
<xhtml:link rel="shortcut icon" style="display: none"
href="chrome://mozapps/skin/extensions/extensionGeneric-16.png"/>
<script type="application/javascript"
src="chrome://mozapps/content/extensions/newaddon.js"/>
<scrollbox id="addon-scrollbox" align="center">
<spacer id="spacer-start"/>
<vbox id="addon-container" class="main-content">
<description>&intro;</description>
<hbox id="addon-info">
<image id="icon"/>
<vbox flex="1">
<label id="name"/>
<label id="author"/>
<label id="location" crop="end"/>
</vbox>
</hbox>
<hbox id="warning">
<image id="warning-icon"/>
<description flex="1">&warning;</description>
</hbox>
<checkbox id="allow" label="&allow;"/>
<description id="later">&later;</description>
<deck id="buttonDeck">
<hbox id="continuePanel">
<button id="continue-button" label="&continue;"
oncommand="continueClicked()"/>
</hbox>
<vbox id="restartPanel">
<description id="restartMessage">&restartMessage;</description>
<hbox id="restartPanelButtons">
<button id="restart-button" label="&restartButton;" oncommand="restartClicked()"/>
<button id="cancel-button" label="&cancelButton;" oncommand="cancelClicked()"/>
</hbox>
</vbox>
</deck>
</vbox>
<spacer id="spacer-end"/>
</scrollbox>
</page>

View file

@ -1,20 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE window SYSTEM "chrome://pluginproblem/locale/pluginproblem.dtd">
<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<setting type="control" title="&plugin.file;">
<label class="text-list" id="pluginLibraries"/>
</setting>
<setting type="control" title="&plugin.mimeTypes;">
<label class="text-list" id="pluginMimeTypes"/>
</setting>
<setting type="bool" pref="dom.ipc.plugins.flash.disable-protected-mode"
inverted="true" title="&plugin.flashProtectedMode.label;"
id="pluginEnableProtectedMode"
learnmore="https://support.mozilla.org/kb/flash-protected-mode-settings" />
</vbox>

View file

@ -1,486 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE page [
<!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/extensions.dtd">
%extensionsDTD;
]>
<!-- import-globals-from extensions.js -->
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="setting-base">
<implementation>
<constructor><![CDATA[
this.preferenceChanged();
this.addEventListener("keypress", function(event) {
event.stopPropagation();
}, false);
if (this.usePref)
Services.prefs.addObserver(this.pref, this._observer, true);
]]></constructor>
<field name="_observer"><![CDATA[({
_self: this,
QueryInterface: function(aIID) {
const Ci = Components.interfaces;
if (aIID.equals(Ci.nsIObserver) ||
aIID.equals(Ci.nsISupportsWeakReference) ||
aIID.equals(Ci.nsISupports))
return this;
throw Components.Exception("No interface", Components.results.NS_ERROR_NO_INTERFACE);
},
observe: function(aSubject, aTopic, aPrefName) {
if (aTopic != "nsPref:changed")
return;
if (this._self.pref == aPrefName)
this._self.preferenceChanged();
}
})]]>
</field>
<method name="fireEvent">
<parameter name="eventName"/>
<parameter name="funcStr"/>
<body>
<![CDATA[
let body = funcStr || this.getAttribute(eventName);
if (!body)
return;
try {
let event = document.createEvent("Events");
event.initEvent(eventName, true, true);
let f = new Function("event", body);
f.call(this, event);
}
catch (e) {
Cu.reportError(e);
}
]]>
</body>
</method>
<method name="valueFromPreference">
<body>
<![CDATA[
// Should be code to set the from the preference input.value
throw Components.Exception("No valueFromPreference implementation",
Components.results.NS_ERROR_NOT_IMPLEMENTED);
]]>
</body>
</method>
<method name="valueToPreference">
<body>
<![CDATA[
// Should be code to set the input.value from the preference
throw Components.Exception("No valueToPreference implementation",
Components.results.NS_ERROR_NOT_IMPLEMENTED);
]]>
</body>
</method>
<method name="inputChanged">
<body>
<![CDATA[
if (this.usePref && !this._updatingInput) {
this.valueToPreference();
this.fireEvent("oninputchanged");
}
]]>
</body>
</method>
<method name="preferenceChanged">
<body>
<![CDATA[
if (this.usePref) {
this._updatingInput = true;
try {
this.valueFromPreference();
this.fireEvent("onpreferencechanged");
} catch (e) {}
this._updatingInput = false;
}
]]>
</body>
</method>
<property name="usePref" readonly="true" onget="return this.hasAttribute('pref');"/>
<property name="pref" readonly="true" onget="return this.getAttribute('pref');"/>
<property name="type" readonly="true" onget="return this.getAttribute('type');"/>
<property name="value" onget="return this.input.value;" onset="return this.input.value = val;"/>
<field name="_updatingInput">false</field>
<field name="input">document.getAnonymousElementByAttribute(this, "anonid", "input");</field>
<field name="settings">
this.parentNode.localName == "settings" ? this.parentNode : null;
</field>
</implementation>
</binding>
<binding id="setting-bool" extends="chrome://mozapps/content/extensions/setting.xml#setting-base">
<content>
<xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:label class="preferences-title" flex="1" xbl:inherits="xbl:text=title"/>
</xul:hbox>
<xul:description class="preferences-description" flex="1" xbl:inherits="xbl:text=desc"/>
<xul:label class="preferences-learnmore text-link"
onclick="document.getBindingParent(this).openLearnMore()">&setting.learnmore;</xul:label>
</xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:checkbox anonid="input" xbl:inherits="disabled,onlabel,offlabel,label=checkboxlabel" oncommand="inputChanged();"/>
</xul:hbox>
</content>
<implementation>
<method name="valueFromPreference">
<body>
<![CDATA[
let val = Services.prefs.getBoolPref(this.pref);
this.value = this.inverted ? !val : val;
]]>
</body>
</method>
<method name="valueToPreference">
<body>
<![CDATA[
let val = this.value;
Services.prefs.setBoolPref(this.pref, this.inverted ? !val : val);
]]>
</body>
</method>
<property name="value" onget="return this.input.checked;" onset="return this.input.setChecked(val);"/>
<property name="inverted" readonly="true" onget="return this.getAttribute('inverted');"/>
<method name="openLearnMore">
<body>
<![CDATA[
window.open(this.getAttribute("learnmore"), "_blank");
]]>
</body>
</method>
</implementation>
</binding>
<binding id="setting-boolint" extends="chrome://mozapps/content/extensions/setting.xml#setting-bool">
<implementation>
<method name="valueFromPreference">
<body>
<![CDATA[
let val = Services.prefs.getIntPref(this.pref);
this.value = (val == this.getAttribute("on"));
]]>
</body>
</method>
<method name="valueToPreference">
<body>
<![CDATA[
Services.prefs.setIntPref(this.pref, this.getAttribute(this.value ? "on" : "off"));
]]>
</body>
</method>
</implementation>
</binding>
<binding id="setting-localized-bool" extends="chrome://mozapps/content/extensions/setting.xml#setting-bool">
<implementation>
<method name="valueFromPreference">
<body>
<![CDATA[
let val = Services.prefs.getComplexValue(this.pref, Components.interfaces.nsIPrefLocalizedString).data;
if (this.inverted) val = !val;
this.value = (val == "true");
]]>
</body>
</method>
<method name="valueToPreference">
<body>
<![CDATA[
let val = this.value;
if (this.inverted) val = !val;
let pref = Components.classes["@mozilla.org/pref-localizedstring;1"].createInstance(Components.interfaces.nsIPrefLocalizedString);
pref.data = this.inverted ? (!val).toString() : val.toString();
Services.prefs.setComplexValue(this.pref, Components.interfaces.nsIPrefLocalizedString, pref);
]]>
</body>
</method>
</implementation>
</binding>
<binding id="setting-integer" extends="chrome://mozapps/content/extensions/setting.xml#setting-base">
<content>
<xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:label class="preferences-title" flex="1" xbl:inherits="xbl:text=title"/>
</xul:hbox>
<xul:description class="preferences-description" flex="1" xbl:inherits="xbl:text=desc"/>
</xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:textbox type="number" anonid="input" oninput="inputChanged();" onchange="inputChanged();"
xbl:inherits="disabled,emptytext,min,max,increment,hidespinbuttons,wraparound,size"/>
</xul:hbox>
</content>
<implementation>
<method name="valueFromPreference">
<body>
<![CDATA[
let val = Services.prefs.getIntPref(this.pref);
this.value = val;
]]>
</body>
</method>
<method name="valueToPreference">
<body>
<![CDATA[
Services.prefs.setIntPref(this.pref, this.value);
]]>
</body>
</method>
</implementation>
</binding>
<binding id="setting-control" extends="chrome://mozapps/content/extensions/setting.xml#setting-base">
<content>
<xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:label class="preferences-title" flex="1" xbl:inherits="xbl:text=title"/>
</xul:hbox>
<xul:description class="preferences-description" flex="1" xbl:inherits="xbl:text=desc"/>
</xul:vbox>
<xul:hbox class="preferences-alignment">
<children/>
</xul:hbox>
</content>
</binding>
<binding id="setting-string" extends="chrome://mozapps/content/extensions/setting.xml#setting-base">
<content>
<xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:label class="preferences-title" flex="1" xbl:inherits="xbl:text=title"/>
</xul:hbox>
<xul:description class="preferences-description" flex="1" xbl:inherits="xbl:text=desc"/>
</xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:textbox anonid="input" flex="1" oninput="inputChanged();"
xbl:inherits="disabled,emptytext,type=inputtype,min,max,increment,hidespinbuttons,decimalplaces,wraparound"/>
</xul:hbox>
</content>
<implementation>
<method name="valueFromPreference">
<body>
<![CDATA[
this.value = Preferences.get(this.pref, "");
]]>
</body>
</method>
<method name="valueToPreference">
<body>
<![CDATA[
Preferences.set(this.pref, this.value);
]]>
</body>
</method>
</implementation>
</binding>
<binding id="setting-color" extends="chrome://mozapps/content/extensions/setting.xml#setting-base">
<content>
<xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:label class="preferences-title" flex="1" xbl:inherits="xbl:text=title"/>
</xul:hbox>
<xul:description class="preferences-description" flex="1" xbl:inherits="xbl:text=desc"/>
</xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:colorpicker type="button" anonid="input" xbl:inherits="disabled" onchange="document.getBindingParent(this).inputChanged();"/>
</xul:hbox>
</content>
<implementation>
<method name="valueFromPreference">
<body>
<![CDATA[
// We must wait for the colorpicker's binding to be applied before setting the value
if (!this.input.color)
this.input.initialize();
this.value = Services.prefs.getCharPref(this.pref);
]]>
</body>
</method>
<method name="valueToPreference">
<body>
<![CDATA[
Services.prefs.setCharPref(this.pref, this.value);
]]>
</body>
</method>
<property name="value" onget="return this.input.color;" onset="return this.input.color = val;"/>
</implementation>
</binding>
<binding id="setting-path" extends="chrome://mozapps/content/extensions/setting.xml#setting-base">
<content>
<xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:label class="preferences-title" flex="1" xbl:inherits="xbl:text=title"/>
</xul:hbox>
<xul:description class="preferences-description" flex="1" xbl:inherits="xbl:text=desc"/>
</xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:button type="button" anonid="button" label="&settings.path.button.label;" xbl:inherits="disabled" oncommand="showPicker();"/>
<xul:label anonid="input" flex="1" crop="center" xbl:inherits="disabled"/>
</xul:hbox>
</content>
<implementation>
<method name="showPicker">
<body>
<![CDATA[
var filePicker = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
filePicker.init(window, this.getAttribute("title"),
this.type == "file" ? Ci.nsIFilePicker.modeOpen : Ci.nsIFilePicker.modeGetFolder);
if (this.value) {
try {
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
file.initWithPath(this.value);
filePicker.displayDirectory = this.type == "file" ? file.parent : file;
if (this.type == "file") {
filePicker.defaultString = file.leafName;
}
} catch (e) {}
}
if (filePicker.show() != Ci.nsIFilePicker.returnCancel) {
this.value = filePicker.file.path;
this.inputChanged();
}
]]>
</body>
</method>
<method name="valueFromPreference">
<body>
<![CDATA[
this.value = Preferences.get(this.pref, "");
]]>
</body>
</method>
<method name="valueToPreference">
<body>
<![CDATA[
Preferences.set(this.pref, this.value);
]]>
</body>
</method>
<field name="_value"></field>
<property name="value">
<getter>
<![CDATA[
return this._value;
]]>
</getter>
<setter>
<![CDATA[
this._value = val;
let label = "";
if (val) {
try {
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
file.initWithPath(val);
label = this.hasAttribute("fullpath") ? file.path : file.leafName;
} catch (e) {}
}
this.input.tooltipText = val;
return this.input.value = label;
]]>
</setter>
</property>
</implementation>
</binding>
<binding id="setting-multi" extends="chrome://mozapps/content/extensions/setting.xml#setting-base">
<content>
<xul:vbox>
<xul:hbox class="preferences-alignment">
<xul:label class="preferences-title" flex="1" xbl:inherits="xbl:text=title"/>
</xul:hbox>
<xul:description class="preferences-description" flex="1" xbl:inherits="xbl:text=desc"/>
</xul:vbox>
<xul:hbox class="preferences-alignment">
<children includes="radiogroup|menulist"/>
</xul:hbox>
</content>
<implementation>
<constructor>
<![CDATA[
this.control.addEventListener("command", this.inputChanged.bind(this), false);
]]>
</constructor>
<method name="valueFromPreference">
<body>
<![CDATA[
let val = Preferences.get(this.pref, "").toString();
if ("itemCount" in this.control) {
for (let i = 0; i < this.control.itemCount; i++) {
if (this.control.getItemAtIndex(i).value == val) {
this.control.selectedIndex = i;
break;
}
}
} else {
this.control.setAttribute("value", val);
}
]]>
</body>
</method>
<method name="valueToPreference">
<body>
<![CDATA[
// We might not have a pref already set, so we guess the type from the value attribute
let val = this.control.selectedItem.value;
if (val == "true" || val == "false") {
val = val == "true";
} else if (/^-?\d+$/.test(val)) {
val = parseInt(val, 10);
}
Preferences.set(this.pref, val);
]]>
</body>
</method>
<field name="control">this.getElementsByTagName(this.getAttribute("type") == "radio" ? "radiogroup" : "menulist")[0];</field>
</implementation>
</binding>
</bindings>

View file

@ -1,663 +0,0 @@
// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// This UI is only opened from the Extension Manager when the app is upgraded.
"use strict";
const PREF_UPDATE_EXTENSIONS_ENABLED = "extensions.update.enabled";
const PREF_XPINSTALL_ENABLED = "xpinstall.enabled";
// timeout (in milliseconds) to wait for response to the metadata ping
const METADATA_TIMEOUT = 30000;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AddonManagerPrivate", "resource://gre/modules/AddonManager.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AddonRepository", "resource://gre/modules/addons/AddonRepository.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise", "resource://gre/modules/Promise.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Log", "resource://gre/modules/Log.jsm");
var logger = null;
var gUpdateWizard = {
// When synchronizing app compatibility info this contains all installed
// add-ons. When checking for compatible versions this contains only
// incompatible add-ons.
addons: [],
// Contains a Set of IDs for add-on that were disabled by the application update.
affectedAddonIDs: null,
// The add-ons that we found updates available for
addonsToUpdate: [],
shouldSuggestAutoChecking: false,
shouldAutoCheck: false,
xpinstallEnabled: true,
xpinstallLocked: false,
// cached AddonInstall entries for add-ons we might want to update,
// keyed by add-on ID
addonInstalls: new Map(),
shuttingDown: false,
// Count the add-ons disabled by this update, enabled/disabled by
// metadata checks, and upgraded.
disabled: 0,
metadataEnabled: 0,
metadataDisabled: 0,
upgraded: 0,
upgradeFailed: 0,
upgradeDeclined: 0,
init: function()
{
logger = Log.repository.getLogger("addons.update-dialog");
// XXX could we pass the addons themselves rather than the IDs?
this.affectedAddonIDs = new Set(window.arguments[0]);
try {
this.shouldSuggestAutoChecking =
!Services.prefs.getBoolPref(PREF_UPDATE_EXTENSIONS_ENABLED);
}
catch (e) {
}
try {
this.xpinstallEnabled = Services.prefs.getBoolPref(PREF_XPINSTALL_ENABLED);
this.xpinstallLocked = Services.prefs.prefIsLocked(PREF_XPINSTALL_ENABLED);
}
catch (e) {
}
if (Services.io.offline)
document.documentElement.currentPage = document.getElementById("offline");
else
document.documentElement.currentPage = document.getElementById("versioninfo");
},
onWizardFinish: function gUpdateWizard_onWizardFinish ()
{
if (this.shouldSuggestAutoChecking)
Services.prefs.setBoolPref(PREF_UPDATE_EXTENSIONS_ENABLED, this.shouldAutoCheck);
},
_setUpButton: function(aButtonID, aButtonKey, aDisabled)
{
var strings = document.getElementById("updateStrings");
var button = document.documentElement.getButton(aButtonID);
if (aButtonKey) {
button.label = strings.getString(aButtonKey);
try {
button.setAttribute("accesskey", strings.getString(aButtonKey + "Accesskey"));
}
catch (e) {
}
}
button.disabled = aDisabled;
},
setButtonLabels: function(aBackButton, aBackButtonIsDisabled,
aNextButton, aNextButtonIsDisabled,
aCancelButton, aCancelButtonIsDisabled)
{
this._setUpButton("back", aBackButton, aBackButtonIsDisabled);
this._setUpButton("next", aNextButton, aNextButtonIsDisabled);
this._setUpButton("cancel", aCancelButton, aCancelButtonIsDisabled);
},
// Update Errors
errorItems: [],
checkForErrors: function(aElementIDToShow)
{
if (this.errorItems.length > 0)
document.getElementById(aElementIDToShow).hidden = false;
},
onWizardClose: function(aEvent)
{
return this.onWizardCancel();
},
onWizardCancel: function()
{
gUpdateWizard.shuttingDown = true;
// Allow add-ons to continue downloading and installing
// in the background, though some may require a later restart
// Pages that are waiting for user input go into the background
// on cancel
if (gMismatchPage.waiting) {
logger.info("Dialog closed in mismatch page");
if (gUpdateWizard.addonInstalls.size > 0) {
gInstallingPage.startInstalls(
Array.from(gUpdateWizard.addonInstalls.values()));
}
return true;
}
// Pages that do asynchronous things will just keep running and check
// gUpdateWizard.shuttingDown to trigger background behaviour
if (!gInstallingPage.installing) {
logger.info("Dialog closed while waiting for updated compatibility information");
}
else {
logger.info("Dialog closed while downloading and installing updates");
}
return true;
}
};
var gOfflinePage = {
onPageAdvanced: function()
{
Services.io.offline = false;
return true;
},
toggleOffline: function()
{
var nextbtn = document.documentElement.getButton("next");
nextbtn.disabled = !nextbtn.disabled;
}
}
// Addon listener to count addons enabled/disabled by metadata checks
var listener = {
onDisabled: function(aAddon) {
gUpdateWizard.affectedAddonIDs.add(aAddon.id);
gUpdateWizard.metadataDisabled++;
},
onEnabled: function(aAddon) {
gUpdateWizard.affectedAddonIDs.delete(aAddon.id);
gUpdateWizard.metadataEnabled++;
}
};
var gVersionInfoPage = {
_completeCount: 0,
_totalCount: 0,
_versionInfoDone: false,
onPageShow: Task.async(function*() {
gUpdateWizard.setButtonLabels(null, true,
"nextButtonText", true,
"cancelButtonText", false);
gUpdateWizard.disabled = gUpdateWizard.affectedAddonIDs.size;
// Ensure compatibility overrides are up to date before checking for
// individual addon updates.
AddonManager.addAddonListener(listener);
if (AddonRepository.isMetadataStale()) {
// Do the metadata ping, listening for any newly enabled/disabled add-ons.
yield AddonRepository.repopulateCache(METADATA_TIMEOUT);
if (gUpdateWizard.shuttingDown) {
logger.debug("repopulateCache completed after dialog closed");
}
}
// Fetch the add-ons that are still affected by this update,
// excluding the hotfix add-on.
let idlist = Array.from(gUpdateWizard.affectedAddonIDs).filter(
a => a.id != AddonManager.hotfixID);
if (idlist.length < 1) {
gVersionInfoPage.onAllUpdatesFinished();
return;
}
logger.debug("Fetching affected addons " + idlist.toSource());
let fetchedAddons = yield new Promise((resolve, reject) =>
AddonManager.getAddonsByIDs(idlist, resolve));
// We shouldn't get nulls here, but let's be paranoid...
gUpdateWizard.addons = fetchedAddons.filter(a => a);
if (gUpdateWizard.addons.length < 1) {
gVersionInfoPage.onAllUpdatesFinished();
return;
}
gVersionInfoPage._totalCount = gUpdateWizard.addons.length;
for (let addon of gUpdateWizard.addons) {
logger.debug("VersionInfo Finding updates for ${id}", addon);
addon.findUpdates(gVersionInfoPage, AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED);
}
}),
onAllUpdatesFinished: function() {
AddonManager.removeAddonListener(listener);
AddonManagerPrivate.recordSimpleMeasure("appUpdate_disabled",
gUpdateWizard.disabled);
AddonManagerPrivate.recordSimpleMeasure("appUpdate_metadata_enabled",
gUpdateWizard.metadataEnabled);
AddonManagerPrivate.recordSimpleMeasure("appUpdate_metadata_disabled",
gUpdateWizard.metadataDisabled);
// Record 0 for these here in case we exit early; values will be replaced
// later if we actually upgrade any.
AddonManagerPrivate.recordSimpleMeasure("appUpdate_upgraded", 0);
AddonManagerPrivate.recordSimpleMeasure("appUpdate_upgradeFailed", 0);
AddonManagerPrivate.recordSimpleMeasure("appUpdate_upgradeDeclined", 0);
// Filter out any add-ons that are now enabled.
let addonList = gUpdateWizard.addons.map(a => a.id + ":" + a.appDisabled);
logger.debug("VersionInfo updates finished: found " + addonList.toSource());
let filteredAddons = [];
for (let a of gUpdateWizard.addons) {
if (a.appDisabled) {
logger.debug("Continuing with add-on " + a.id);
filteredAddons.push(a);
}
else if (gUpdateWizard.addonInstalls.has(a.id)) {
gUpdateWizard.addonInstalls.get(a.id).cancel();
gUpdateWizard.addonInstalls.delete(a.id);
}
}
gUpdateWizard.addons = filteredAddons;
if (gUpdateWizard.shuttingDown) {
// jump directly to updating auto-update add-ons in the background
if (gUpdateWizard.addonInstalls.size > 0) {
let installs = Array.from(gUpdateWizard.addonInstalls.values());
gInstallingPage.startInstalls(installs);
}
return;
}
if (filteredAddons.length > 0) {
if (!gUpdateWizard.xpinstallEnabled && gUpdateWizard.xpinstallLocked) {
document.documentElement.currentPage = document.getElementById("adminDisabled");
return;
}
document.documentElement.currentPage = document.getElementById("mismatch");
}
else {
logger.info("VersionInfo: No updates require further action");
// VersionInfo compatibility updates resolved all compatibility problems,
// close this window and continue starting the application...
// XXX Bug 314754 - We need to use setTimeout to close the window due to
// the EM using xmlHttpRequest when checking for updates.
setTimeout(close, 0);
}
},
// UpdateListener
onUpdateFinished: function(aAddon, status) {
++this._completeCount;
if (status != AddonManager.UPDATE_STATUS_NO_ERROR) {
logger.debug("VersionInfo update " + this._completeCount + " of " + this._totalCount +
" failed for " + aAddon.id + ": " + status);
gUpdateWizard.errorItems.push(aAddon);
}
else {
logger.debug("VersionInfo update " + this._completeCount + " of " + this._totalCount +
" finished for " + aAddon.id);
}
// If we're not in the background, just make a list of add-ons that have
// updates available
if (!gUpdateWizard.shuttingDown) {
// If we're still in the update check window and the add-on is now active
// then it won't have been disabled by startup
if (aAddon.active) {
AddonManagerPrivate.removeStartupChange(AddonManager.STARTUP_CHANGE_DISABLED, aAddon.id);
gUpdateWizard.metadataEnabled++;
}
// Update the status text and progress bar
var updateStrings = document.getElementById("updateStrings");
var statusElt = document.getElementById("versioninfo.status");
var statusString = updateStrings.getFormattedString("statusPrefix", [aAddon.name]);
statusElt.setAttribute("value", statusString);
// Update the status text and progress bar
var progress = document.getElementById("versioninfo.progress");
progress.mode = "normal";
progress.value = Math.ceil((this._completeCount / this._totalCount) * 100);
}
if (this._completeCount == this._totalCount)
this.onAllUpdatesFinished();
},
onUpdateAvailable: function(aAddon, aInstall) {
logger.debug("VersionInfo got an install for " + aAddon.id + ": " + aAddon.version);
gUpdateWizard.addonInstalls.set(aAddon.id, aInstall);
},
};
var gMismatchPage = {
waiting: false,
onPageShow: function()
{
gMismatchPage.waiting = true;
gUpdateWizard.setButtonLabels(null, true,
"mismatchCheckNow", false,
"mismatchDontCheck", false);
document.documentElement.getButton("next").focus();
var incompatible = document.getElementById("mismatch.incompatible");
for (let addon of gUpdateWizard.addons) {
var listitem = document.createElement("listitem");
listitem.setAttribute("label", addon.name + " " + addon.version);
incompatible.appendChild(listitem);
}
}
};
var gUpdatePage = {
_totalCount: 0,
_completeCount: 0,
onPageShow: function()
{
gMismatchPage.waiting = false;
gUpdateWizard.setButtonLabels(null, true,
"nextButtonText", true,
"cancelButtonText", false);
document.documentElement.getButton("next").focus();
gUpdateWizard.errorItems = [];
this._totalCount = gUpdateWizard.addons.length;
for (let addon of gUpdateWizard.addons) {
logger.debug("UpdatePage requesting update for " + addon.id);
// Redundant call to find updates again here when we already got them
// in the VersionInfo page: https://bugzilla.mozilla.org/show_bug.cgi?id=960597
addon.findUpdates(this, AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED);
}
},
onAllUpdatesFinished: function() {
if (gUpdateWizard.shuttingDown)
return;
var nextPage = document.getElementById("noupdates");
if (gUpdateWizard.addonsToUpdate.length > 0)
nextPage = document.getElementById("found");
document.documentElement.currentPage = nextPage;
},
// UpdateListener
onUpdateAvailable: function(aAddon, aInstall) {
logger.debug("UpdatePage got an update for " + aAddon.id + ": " + aAddon.version);
gUpdateWizard.addonsToUpdate.push(aInstall);
},
onUpdateFinished: function(aAddon, status) {
if (status != AddonManager.UPDATE_STATUS_NO_ERROR)
gUpdateWizard.errorItems.push(aAddon);
++this._completeCount;
if (!gUpdateWizard.shuttingDown) {
// Update the status text and progress bar
var updateStrings = document.getElementById("updateStrings");
var statusElt = document.getElementById("checking.status");
var statusString = updateStrings.getFormattedString("statusPrefix", [aAddon.name]);
statusElt.setAttribute("value", statusString);
var progress = document.getElementById("checking.progress");
progress.value = Math.ceil((this._completeCount / this._totalCount) * 100);
}
if (this._completeCount == this._totalCount)
this.onAllUpdatesFinished()
},
};
var gFoundPage = {
onPageShow: function()
{
gUpdateWizard.setButtonLabels(null, true,
"installButtonText", false,
null, false);
var foundUpdates = document.getElementById("found.updates");
var itemCount = gUpdateWizard.addonsToUpdate.length;
for (let install of gUpdateWizard.addonsToUpdate) {
let listItem = foundUpdates.appendItem(install.name + " " + install.version);
listItem.setAttribute("type", "checkbox");
listItem.setAttribute("checked", "true");
listItem.install = install;
}
if (!gUpdateWizard.xpinstallEnabled) {
document.getElementById("xpinstallDisabledAlert").hidden = false;
document.getElementById("enableXPInstall").focus();
document.documentElement.getButton("next").disabled = true;
}
else {
document.documentElement.getButton("next").focus();
document.documentElement.getButton("next").disabled = false;
}
},
toggleXPInstallEnable: function(aEvent)
{
var enabled = aEvent.target.checked;
gUpdateWizard.xpinstallEnabled = enabled;
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
pref.setBoolPref(PREF_XPINSTALL_ENABLED, enabled);
this.updateNextButton();
},
updateNextButton: function()
{
if (!gUpdateWizard.xpinstallEnabled) {
document.documentElement.getButton("next").disabled = true;
return;
}
var oneChecked = false;
var foundUpdates = document.getElementById("found.updates");
var updates = foundUpdates.getElementsByTagName("listitem");
for (let update of updates) {
if (!update.checked)
continue;
oneChecked = true;
break;
}
gUpdateWizard.setButtonLabels(null, true,
"installButtonText", true,
null, false);
document.getElementById("found").setAttribute("next", "installing");
document.documentElement.getButton("next").disabled = !oneChecked;
}
};
var gInstallingPage = {
_installs : [],
_errors : [],
_strings : null,
_currentInstall : -1,
_installing : false,
// Initialize fields we need for installing and tracking progress,
// and start iterating through the installations
startInstalls: function(aInstallList) {
if (!gUpdateWizard.xpinstallEnabled) {
return;
}
let installs = Array.from(aInstallList).map(a => a.existingAddon.id);
logger.debug("Start installs for " + installs.toSource());
this._errors = [];
this._installs = aInstallList;
this._installing = true;
this.startNextInstall();
},
onPageShow: function()
{
gUpdateWizard.setButtonLabels(null, true,
"nextButtonText", true,
null, true);
var foundUpdates = document.getElementById("found.updates");
var updates = foundUpdates.getElementsByTagName("listitem");
let toInstall = [];
for (let update of updates) {
if (!update.checked) {
logger.info("User chose to cancel update of " + update.label);
gUpdateWizard.upgradeDeclined++;
update.install.cancel();
continue;
}
toInstall.push(update.install);
}
this._strings = document.getElementById("updateStrings");
this.startInstalls(toInstall);
},
startNextInstall: function() {
if (this._currentInstall >= 0) {
this._installs[this._currentInstall].removeListener(this);
}
this._currentInstall++;
if (this._installs.length == this._currentInstall) {
Services.obs.notifyObservers(null, "TEST:all-updates-done", null);
AddonManagerPrivate.recordSimpleMeasure("appUpdate_upgraded",
gUpdateWizard.upgraded);
AddonManagerPrivate.recordSimpleMeasure("appUpdate_upgradeFailed",
gUpdateWizard.upgradeFailed);
AddonManagerPrivate.recordSimpleMeasure("appUpdate_upgradeDeclined",
gUpdateWizard.upgradeDeclined);
this._installing = false;
if (gUpdateWizard.shuttingDown) {
return;
}
var nextPage = this._errors.length > 0 ? "installerrors" : "finished";
document.getElementById("installing").setAttribute("next", nextPage);
document.documentElement.advance();
return;
}
let install = this._installs[this._currentInstall];
if (gUpdateWizard.shuttingDown && !AddonManager.shouldAutoUpdate(install.existingAddon)) {
logger.debug("Don't update " + install.existingAddon.id + " in background");
gUpdateWizard.upgradeDeclined++;
install.cancel();
this.startNextInstall();
return;
}
install.addListener(this);
install.install();
},
// InstallListener
onDownloadStarted: function(aInstall) {
if (gUpdateWizard.shuttingDown) {
return;
}
var strings = document.getElementById("updateStrings");
var label = strings.getFormattedString("downloadingPrefix", [aInstall.name]);
var actionItem = document.getElementById("actionItem");
actionItem.value = label;
},
onDownloadProgress: function(aInstall) {
if (gUpdateWizard.shuttingDown) {
return;
}
var downloadProgress = document.getElementById("downloadProgress");
downloadProgress.value = Math.ceil(100 * aInstall.progress / aInstall.maxProgress);
},
onDownloadEnded: function(aInstall) {
},
onDownloadFailed: function(aInstall) {
this._errors.push(aInstall);
gUpdateWizard.upgradeFailed++;
this.startNextInstall();
},
onInstallStarted: function(aInstall) {
if (gUpdateWizard.shuttingDown) {
return;
}
var strings = document.getElementById("updateStrings");
var label = strings.getFormattedString("installingPrefix", [aInstall.name]);
var actionItem = document.getElementById("actionItem");
actionItem.value = label;
},
onInstallEnded: function(aInstall, aAddon) {
if (!gUpdateWizard.shuttingDown) {
// Remember that this add-on was updated during startup
AddonManagerPrivate.addStartupChange(AddonManager.STARTUP_CHANGE_CHANGED,
aAddon.id);
}
gUpdateWizard.upgraded++;
this.startNextInstall();
},
onInstallFailed: function(aInstall) {
this._errors.push(aInstall);
gUpdateWizard.upgradeFailed++;
this.startNextInstall();
}
};
var gInstallErrorsPage = {
onPageShow: function()
{
gUpdateWizard.setButtonLabels(null, true, null, true, null, true);
document.documentElement.getButton("finish").focus();
},
};
// Displayed when there are incompatible add-ons and the xpinstall.enabled
// pref is false and locked.
var gAdminDisabledPage = {
onPageShow: function()
{
gUpdateWizard.setButtonLabels(null, true, null, true,
"cancelButtonText", true);
document.documentElement.getButton("finish").focus();
}
};
// Displayed when selected add-on updates have been installed without error.
// There can still be add-ons that are not compatible and don't have an update.
var gFinishedPage = {
onPageShow: function()
{
gUpdateWizard.setButtonLabels(null, true, null, true, null, true);
document.documentElement.getButton("finish").focus();
if (gUpdateWizard.shouldSuggestAutoChecking) {
document.getElementById("finishedCheckDisabled").hidden = false;
gUpdateWizard.shouldAutoCheck = true;
}
else
document.getElementById("finishedCheckEnabled").hidden = false;
document.documentElement.getButton("finish").focus();
}
};
// Displayed when there are incompatible add-ons and there are no available
// updates.
var gNoUpdatesPage = {
onPageShow: function(aEvent)
{
gUpdateWizard.setButtonLabels(null, true, null, true, null, true);
if (gUpdateWizard.shouldSuggestAutoChecking) {
document.getElementById("noupdatesCheckDisabled").hidden = false;
gUpdateWizard.shouldAutoCheck = true;
}
else
document.getElementById("noupdatesCheckEnabled").hidden = false;
gUpdateWizard.checkForErrors("updateCheckErrorNotFound");
document.documentElement.getButton("finish").focus();
}
};

View file

@ -1,194 +0,0 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://mozapps/skin/extensions/update.css" type="text/css"?>
<!DOCTYPE wizard [
<!ENTITY % updateDTD SYSTEM "chrome://mozapps/locale/extensions/update.dtd">
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
%updateDTD;
%brandDTD;
]>
<wizard id="updateWizard"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&updateWizard.title;"
windowtype="Addons:Compatibility"
branded="true"
onload="gUpdateWizard.init();"
onwizardfinish="gUpdateWizard.onWizardFinish();"
onwizardcancel="return gUpdateWizard.onWizardCancel();"
onclose="return gUpdateWizard.onWizardClose(event);"
buttons="accept,cancel">
<script type="application/javascript" src="chrome://mozapps/content/extensions/update.js"/>
<stringbundleset id="updateSet">
<stringbundle id="brandStrings" src="chrome://branding/locale/brand.properties"/>
<stringbundle id="updateStrings" src="chrome://mozapps/locale/extensions/update.properties"/>
</stringbundleset>
<wizardpage id="dummy" pageid="dummy"/>
<wizardpage id="offline" pageid="offline" next="versioninfo"
label="&offline.title;"
onpageadvanced="return gOfflinePage.onPageAdvanced();">
<description>&offline.description;</description>
<checkbox id="toggleOffline"
checked="true"
label="&offline.toggleOffline.label;"
accesskey="&offline.toggleOffline.accesskey;"
oncommand="gOfflinePage.toggleOffline();"/>
</wizardpage>
<wizardpage id="versioninfo" pageid="versioninfo" next="mismatch"
label="&versioninfo.wizard.title;"
onpageshow="gVersionInfoPage.onPageShow();">
<label>&versioninfo.top.label;</label>
<separator class="thin"/>
<progressmeter id="versioninfo.progress" mode="undetermined"/>
<hbox align="center">
<image id="versioninfo.throbber" class="throbber"/>
<label flex="1" id="versioninfo.status" crop="right">&versioninfo.waiting;</label>
</hbox>
<separator/>
</wizardpage>
<wizardpage id="mismatch" pageid="mismatch" next="checking"
label="&mismatch.win.title;"
onpageshow="gMismatchPage.onPageShow();">
<label>&mismatch.top.label;</label>
<separator class="thin"/>
<listbox id="mismatch.incompatible" flex="1"/>
<separator class="thin"/>
<label>&mismatch.bottom.label;</label>
</wizardpage>
<wizardpage id="checking" pageid="checking" next="noupdates"
label="&checking.wizard.title;"
onpageshow="gUpdatePage.onPageShow();">
<label>&checking.top.label;</label>
<separator class="thin"/>
<progressmeter id="checking.progress"/>
<hbox align="center">
<image id="checking.throbber" class="throbber"/>
<label id="checking.status" flex="1" crop="right">&checking.status;</label>
</hbox>
</wizardpage>
<wizardpage id="noupdates" pageid="noupdates"
label="&noupdates.wizard.title;"
onpageshow="gNoUpdatesPage.onPageShow();">
<description>&noupdates.intro.desc;</description>
<separator class="thin"/>
<hbox id="updateCheckErrorNotFound" class="alertBox" hidden="true" align="top">
<description flex="1">&noupdates.error.desc;</description>
</hbox>
<separator class="thin"/>
<description id="noupdatesCheckEnabled" hidden="true">
&noupdates.checkEnabled.desc;
</description>
<vbox id="noupdatesCheckDisabled" hidden="true">
<description>&finished.checkDisabled.desc;</description>
<checkbox label="&enableChecking.label;" checked="true"
oncommand="gUpdateWizard.shouldAutoCheck = this.checked;"/>
</vbox>
<separator flex="1"/>
#ifndef XP_MACOSX
<label>&clickFinish.label;</label>
#else
<label>&clickFinish.labelMac;</label>
#endif
<separator class="thin"/>
</wizardpage>
<wizardpage id="found" pageid="found" next="installing"
label="&found.wizard.title;"
onpageshow="gFoundPage.onPageShow();">
<label>&found.top.label;</label>
<separator class="thin"/>
<listbox id="found.updates" flex="1" seltype="multiple"
onclick="gFoundPage.updateNextButton();"/>
<separator class="thin"/>
<vbox align="left" id="xpinstallDisabledAlert" hidden="true">
<description>&found.disabledXPinstall.label;</description>
<checkbox label="&found.enableXPInstall.label;"
id="enableXPInstall"
accesskey="&found.enableXPInstall.accesskey;"
oncommand="gFoundPage.toggleXPInstallEnable(event);"/>
</vbox>
</wizardpage>
<wizardpage id="installing" pageid="installing" next="finished"
label="&installing.wizard.title;"
onpageshow="gInstallingPage.onPageShow();">
<label>&installing.top.label;</label>
<progressmeter id="downloadProgress"/>
<hbox align="center">
<image id="installing.throbber" class="throbber"/>
<label id="actionItem" flex="1" crop="right"/>
</hbox>
<separator/>
</wizardpage>
<wizardpage id="installerrors" pageid="installerrors"
label="&installerrors.wizard.title;"
onpageshow="gInstallErrorsPage.onPageShow();">
<hbox align="top" class="alertBox">
<description flex="1">&installerrors.intro.label;</description>
</hbox>
<separator flex="1"/>
#ifndef XP_MACOSX
<label>&clickFinish.label;</label>
#else
<label>&clickFinish.labelMac;</label>
#endif
<separator class="thin"/>
</wizardpage>
<wizardpage id="adminDisabled" pageid="adminDisabled"
label="&adminDisabled.wizard.title;"
onpageshow="gAdminDisabledPage.onPageShow();">
<separator/>
<hbox class="alertBox" align="top">
<description flex="1">&adminDisabled.warning.label;</description>
</hbox>
<separator flex="1"/>
#ifndef XP_MACOSX
<label>&clickFinish.label;</label>
#else
<label>&clickFinish.labelMac;</label>
#endif
<separator class="thin"/>
</wizardpage>
<wizardpage id="finished" pageid="finished"
label="&finished.wizard.title;"
onpageshow="gFinishedPage.onPageShow();">
<label>&finished.top.label;</label>
<separator/>
<description id="finishedCheckEnabled" hidden="true">
&finished.checkEnabled.desc;
</description>
<vbox id="finishedCheckDisabled" hidden="true">
<description>&finished.checkDisabled.desc;</description>
<checkbox label="&enableChecking.label;" checked="true"
oncommand="gUpdateWizard.shouldAutoCheck = this.checked;"/>
</vbox>
<separator flex="1"/>
#ifndef XP_MACOSX
<label>&clickFinish.label;</label>
#else
<label>&clickFinish.labelMac;</label>
#endif
<separator class="thin"/>
</wizardpage>
</wizard>

View file

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Any elements not otherwise specified will be stripped but the contents
will be displayed. All attributes are stripped from copied elements. -->
<!-- Block these elements and their contents -->
<xsl:template match="xhtml:head|xhtml:script|xhtml:style">
</xsl:template>
<!-- Allowable styling elements -->
<xsl:template match="xhtml:b|xhtml:i|xhtml:em|xhtml:strong|xhtml:u|xhtml:q|xhtml:sub|xhtml:sup|xhtml:code">
<xsl:copy><xsl:apply-templates/></xsl:copy>
</xsl:template>
<!-- Allowable block formatting elements -->
<xsl:template match="xhtml:h1|xhtml:h2|xhtml:h3|xhtml:p|xhtml:div|xhtml:blockquote|xhtml:pre">
<xsl:copy><xsl:apply-templates/></xsl:copy>
</xsl:template>
<!-- Allowable list formatting elements -->
<xsl:template match="xhtml:ul|xhtml:ol|xhtml:li|xhtml:dl|xhtml:dt|xhtml:dd">
<xsl:copy><xsl:apply-templates/></xsl:copy>
</xsl:template>
<!-- These elements are copied and their contents dropped -->
<xsl:template match="xhtml:br|xhtml:hr">
<xsl:copy/>
</xsl:template>
<!-- The root document -->
<xsl:template match="/">
<xhtml:body><xsl:apply-templates/></xhtml:body>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,8 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
installitem {
-moz-binding: url("chrome://mozapps/content/xpinstall/xpinstallItem.xml#installitem");
display: -moz-box;
}

View file

@ -1,196 +0,0 @@
// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var XPInstallConfirm = {};
XPInstallConfirm.init = function()
{
Components.utils.import("resource://gre/modules/AddonManager.jsm");
var _installCountdown;
var _installCountdownInterval;
var _focused;
var _timeout;
// Default to cancelling the install when the window unloads
XPInstallConfirm._installOK = false;
var bundle = document.getElementById("xpinstallConfirmStrings");
let args = window.arguments[0].wrappedJSObject;
// If all installs have already been cancelled in some way then just close
// the window
if (args.installs.every(i => i.state != AddonManager.STATE_DOWNLOADED)) {
window.close();
return;
}
var _installCountdownLength = 5;
try {
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var delay_in_milliseconds = prefs.getIntPref("security.dialog_enable_delay");
_installCountdownLength = Math.round(delay_in_milliseconds / 500);
} catch (ex) { }
var itemList = document.getElementById("itemList");
let installMap = new WeakMap();
let installListener = {
onDownloadCancelled: function(install) {
itemList.removeChild(installMap.get(install));
if (--numItemsToInstall == 0)
window.close();
}
};
var numItemsToInstall = args.installs.length;
for (let install of args.installs) {
var installItem = document.createElement("installitem");
itemList.appendChild(installItem);
installItem.name = install.addon.name;
installItem.url = install.sourceURI.spec;
var icon = install.iconURL;
if (icon)
installItem.icon = icon;
var type = install.type;
if (type)
installItem.type = type;
if (install.certName) {
installItem.cert = bundle.getFormattedString("signed", [install.certName]);
}
else {
installItem.cert = bundle.getString("unverified");
}
installItem.signed = install.certName ? "true" : "false";
installMap.set(install, installItem);
install.addListener(installListener);
}
var introString = bundle.getString("itemWarnIntroSingle");
if (numItemsToInstall > 4)
introString = bundle.getFormattedString("itemWarnIntroMultiple", [numItemsToInstall]);
var textNode = document.createTextNode(introString);
var introNode = document.getElementById("itemWarningIntro");
while (introNode.hasChildNodes())
introNode.removeChild(introNode.firstChild);
introNode.appendChild(textNode);
var okButton = document.documentElement.getButton("accept");
okButton.focus();
function okButtonCountdown() {
_installCountdown -= 1;
if (_installCountdown < 1) {
okButton.label = bundle.getString("installButtonLabel");
okButton.disabled = false;
clearInterval(_installCountdownInterval);
}
else
okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown]);
}
function myfocus() {
// Clear the timeout if it exists so only the last one will be used.
if (_timeout)
clearTimeout(_timeout);
// Use setTimeout since the last focus or blur event to fire is the one we
// want
_timeout = setTimeout(setWidgetsAfterFocus, 0);
}
function setWidgetsAfterFocus() {
if (_focused)
return;
_installCountdown = _installCountdownLength;
_installCountdownInterval = setInterval(okButtonCountdown, 500);
okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown]);
_focused = true;
}
function myblur() {
// Clear the timeout if it exists so only the last one will be used.
if (_timeout)
clearTimeout(_timeout);
// Use setTimeout since the last focus or blur event to fire is the one we
// want
_timeout = setTimeout(setWidgetsAfterBlur, 0);
}
function setWidgetsAfterBlur() {
if (!_focused)
return;
// Set _installCountdown to the inital value set in setWidgetsAfterFocus
// plus 1 so when the window is focused there is immediate ui feedback.
_installCountdown = _installCountdownLength + 1;
okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown]);
okButton.disabled = true;
clearInterval(_installCountdownInterval);
_focused = false;
}
function myUnload() {
if (_installCountdownLength > 0) {
document.removeEventListener("focus", myfocus, true);
document.removeEventListener("blur", myblur, true);
}
window.removeEventListener("unload", myUnload, false);
for (let install of args.installs)
install.removeListener(installListener);
// Now perform the desired action - either install the
// addons or cancel the installations
if (XPInstallConfirm._installOK) {
for (let install of args.installs)
install.install();
}
else {
for (let install of args.installs) {
if (install.state != AddonManager.STATE_CANCELLED)
install.cancel();
}
}
}
window.addEventListener("unload", myUnload, false);
if (_installCountdownLength > 0) {
document.addEventListener("focus", myfocus, true);
document.addEventListener("blur", myblur, true);
okButton.disabled = true;
setWidgetsAfterFocus();
}
else
okButton.label = bundle.getString("installButtonLabel");
}
XPInstallConfirm.onOK = function()
{
Components.classes["@mozilla.org/base/telemetry;1"].
getService(Components.interfaces.nsITelemetry).
getHistogramById("SECURITY_UI").
add(Components.interfaces.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL_CLICK_THROUGH);
// Perform the install or cancel after the window has unloaded
XPInstallConfirm._installOK = true;
return true;
}
XPInstallConfirm.onCancel = function()
{
// Perform the install or cancel after the window has unloaded
XPInstallConfirm._installOK = false;
return true;
}

View file

@ -1,37 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://mozapps/content/xpinstall/xpinstallConfirm.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://mozapps/skin/xpinstall/xpinstallConfirm.css" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://mozapps/locale/xpinstall/xpinstallConfirm.dtd">
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="xpinstallConfirm" title="&dialog.title;" style="&dialog.style;"
windowtype="Addons:Install"
onload="XPInstallConfirm.init()"
ondialogaccept="return XPInstallConfirm.onOK();"
ondialogcancel="return XPInstallConfirm.onCancel();">
<script src="chrome://mozapps/content/xpinstall/xpinstallConfirm.js" type="application/javascript"/>
<stringbundle id="xpinstallConfirmStrings"
src="chrome://mozapps/locale/xpinstall/xpinstallConfirm.properties"/>
<vbox flex="1" id="dialogContentBox">
<hbox id="xpinstallheader" align="start">
<image class="alert-icon"/>
<vbox flex="1">
<description class="warning">&warningPrimary.label;</description>
<description>&warningSecondary.label;</description>
</vbox>
</hbox>
<label id="itemWarningIntro"/>
<vbox id="itemList" class="listbox" flex="1" style="overflow: auto;"/>
</vbox>
</dialog>

View file

@ -1,51 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE bindings SYSTEM "chrome://mozapps/locale/xpinstall/xpinstallConfirm.dtd">
<bindings id="xpinstallItemBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="installitem">
<resources>
<stylesheet src="chrome://mozapps/skin/xpinstall/xpinstallConfirm.css"/>
</resources>
<content>
<xul:hbox flex="1">
<xul:vbox align="center" pack="center" class="xpinstallIconContainer">
<xul:image class="xpinstallItemIcon" xbl:inherits="src=icon"/>
</xul:vbox>
<xul:vbox flex="1" pack="center">
<xul:hbox class="xpinstallItemNameRow" align="center">
<xul:label class="xpinstallItemName" xbl:inherits="value=name" crop="right"/>
<xul:label class="xpinstallItemSigned" xbl:inherits="value=cert,signed"/>
</xul:hbox>
<xul:hbox class="xpinstallItemDetailsRow" align="center">
<xul:textbox class="xpinstallItemURL" xbl:inherits="value=url" flex="1" readonly="true" crop="right"/>
</xul:hbox>
</xul:vbox>
</xul:hbox>
</content>
<implementation>
<property name="name" onset="this.setAttribute('name', val); return val;"
onget="return this.getAttribute('name');"/>
<property name="cert" onset="this.setAttribute('cert', val); return val;"
onget="return this.getAttribute('cert');"/>
<property name="signed" onset="this.setAttribute('signed', val); return val;"
onget="return this.getAttribute('signed');"/>
<property name="url" onset="this.setAttribute('url', val); return val;"
onget="return this.getAttribute('url');"/>
<property name="icon" onset="this.setAttribute('icon', val); return val;"
onget="return this.getAttribute('icon');"/>
<property name="type" onset="this.setAttribute('type', val); return val;"
onget="return this.getAttribute('type');"/>
</implementation>
</binding>
</bindings>