summaryrefslogtreecommitdiffstats
path: root/application/basilisk/components/preferences
diff options
context:
space:
mode:
Diffstat (limited to 'application/basilisk/components/preferences')
-rw-r--r--application/basilisk/components/preferences/connection.js2
-rw-r--r--application/basilisk/components/preferences/connection.xul6
-rw-r--r--application/basilisk/components/preferences/containers.js176
-rw-r--r--application/basilisk/components/preferences/containers.xul52
-rw-r--r--application/basilisk/components/preferences/cookies.js39
-rw-r--r--application/basilisk/components/preferences/cookies.xul4
-rw-r--r--application/basilisk/components/preferences/handlers.css4
-rw-r--r--application/basilisk/components/preferences/handlers.xml23
-rw-r--r--application/basilisk/components/preferences/in-content/advanced.js19
-rw-r--r--application/basilisk/components/preferences/in-content/advanced.xul13
-rw-r--r--application/basilisk/components/preferences/in-content/containers.js73
-rw-r--r--application/basilisk/components/preferences/in-content/containers.xul54
-rw-r--r--application/basilisk/components/preferences/in-content/content.js31
-rw-r--r--application/basilisk/components/preferences/in-content/content.xul24
-rw-r--r--application/basilisk/components/preferences/in-content/jar.mn5
-rw-r--r--application/basilisk/components/preferences/in-content/main.js77
-rw-r--r--application/basilisk/components/preferences/in-content/main.xul11
-rw-r--r--application/basilisk/components/preferences/in-content/preferences.js3
-rw-r--r--application/basilisk/components/preferences/in-content/preferences.xul19
-rw-r--r--application/basilisk/components/preferences/in-content/privacy.js88
-rw-r--r--application/basilisk/components/preferences/in-content/privacy.xul25
-rw-r--r--application/basilisk/components/preferences/in-content/sync.js564
-rw-r--r--application/basilisk/components/preferences/in-content/sync.xul321
-rw-r--r--application/basilisk/components/preferences/jar.mn4
-rw-r--r--application/basilisk/components/preferences/translation.js255
-rw-r--r--application/basilisk/components/preferences/translation.xul88
26 files changed, 126 insertions, 1854 deletions
diff --git a/application/basilisk/components/preferences/connection.js b/application/basilisk/components/preferences/connection.js
index f6b395a2d..349139bed 100644
--- a/application/basilisk/components/preferences/connection.js
+++ b/application/basilisk/components/preferences/connection.js
@@ -76,7 +76,7 @@ var gConnectionsDialog = {
var autologinProxyPref = document.getElementById("signon.autologin.proxy");
autologinProxyPref.disabled = proxyTypePref.value == 0;
var noProxiesPref = document.getElementById("network.proxy.no_proxies_on");
- noProxiesPref.disabled = proxyTypePref.value != 1;
+ noProxiesPref.disabled = proxyTypePref.value == 0;
var autoconfigURLPref = document.getElementById("network.proxy.autoconfig_url");
autoconfigURLPref.disabled = proxyTypePref.value != 2;
diff --git a/application/basilisk/components/preferences/connection.xul b/application/basilisk/components/preferences/connection.xul
index a3f0d082a..1eb0c1544 100644
--- a/application/basilisk/components/preferences/connection.xul
+++ b/application/basilisk/components/preferences/connection.xul
@@ -145,9 +145,6 @@
</radiogroup>
</box>
</row>
- <label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/>
- <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
- <label value="&noproxyExplain.label;" control="networkProxyNone"/>
</rows>
</grid>
<radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;"/>
@@ -162,6 +159,9 @@
</radiogroup>
</groupbox>
<separator class="thin"/>
+ <label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/>
+ <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
+ <label value="&noproxyExplain.label;" control="networkProxyNone"/>
<checkbox id="autologinProxy"
label="&autologinproxy.label;"
accesskey="&autologinproxy.accesskey;"
diff --git a/application/basilisk/components/preferences/containers.js b/application/basilisk/components/preferences/containers.js
deleted file mode 100644
index 6ca5853f7..000000000
--- a/application/basilisk/components/preferences/containers.js
+++ /dev/null
@@ -1,176 +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/. */
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/ContextualIdentityService.jsm");
-
-const containersBundle = Services.strings.createBundle("chrome://browser/locale/preferences/containers.properties");
-
-const HTMLNS = "http://www.w3.org/1999/xhtml";
-
-let gContainersManager = {
- icons: [
- "fingerprint",
- "briefcase",
- "dollar",
- "cart",
- "circle"
- ],
-
- colors: [
- "blue",
- "turquoise",
- "green",
- "yellow",
- "orange",
- "red",
- "pink",
- "purple"
- ],
-
- onLoad() {
- let params = window.arguments[0] || {};
- this.init(params);
- },
-
- init(aParams) {
- this.userContextId = aParams.userContextId || null;
- this.identity = aParams.identity;
-
- if (aParams.windowTitle) {
- document.title = aParams.windowTitle;
- }
-
- const iconWrapper = document.getElementById("iconWrapper");
- iconWrapper.appendChild(this.createIconButtons());
-
- const colorWrapper = document.getElementById("colorWrapper");
- colorWrapper.appendChild(this.createColorSwatches());
-
- if (this.identity.name) {
- const name = document.getElementById("name");
- name.value = this.identity.name;
- this.checkForm();
- }
-
- this.setLabelsMinWidth();
-
- // This is to prevent layout jank caused by the svgs and outlines rendering at different times
- document.getElementById("containers-content").removeAttribute("hidden");
- },
-
- setLabelsMinWidth() {
- const labelMinWidth = containersBundle.GetStringFromName("containers.labelMinWidth");
- const labels = [
- document.getElementById("nameLabel"),
- document.getElementById("iconLabel"),
- document.getElementById("colorLabel")
- ];
- for (let label of labels) {
- label.style.minWidth = labelMinWidth;
- }
- },
-
- uninit() {
- },
-
- // Check if name string as to if the form can be submitted
- checkForm() {
- const name = document.getElementById("name");
- let btnApplyChanges = document.getElementById("btnApplyChanges");
- if (!name.value) {
- btnApplyChanges.setAttribute("disabled", true);
- } else {
- btnApplyChanges.removeAttribute("disabled");
- }
- },
-
- createIconButtons(defaultIcon) {
- let radiogroup = document.createElement("radiogroup");
- radiogroup.setAttribute("id", "icon");
- radiogroup.className = "icon-buttons";
-
- for (let icon of this.icons) {
- let iconSwatch = document.createElement("radio");
- iconSwatch.id = "iconbutton-" + icon;
- iconSwatch.name = "icon";
- iconSwatch.type = "radio";
- iconSwatch.value = icon;
-
- if (this.identity.icon && this.identity.icon == icon) {
- iconSwatch.setAttribute("selected", true);
- }
-
- iconSwatch.setAttribute("label",
- containersBundle.GetStringFromName(`containers.${icon}.label`));
- let iconElement = document.createElement("hbox");
- iconElement.className = 'userContext-icon';
- iconElement.setAttribute("data-identity-icon", icon);
-
- iconSwatch.appendChild(iconElement);
- radiogroup.appendChild(iconSwatch);
- }
-
- return radiogroup;
- },
-
- createColorSwatches(defaultColor) {
- let radiogroup = document.createElement("radiogroup");
- radiogroup.setAttribute("id", "color");
-
- for (let color of this.colors) {
- let colorSwatch = document.createElement("radio");
- colorSwatch.id = "colorswatch-" + color;
- colorSwatch.name = "color";
- colorSwatch.type = "radio";
- colorSwatch.value = color;
-
- if (this.identity.color && this.identity.color == color) {
- colorSwatch.setAttribute("selected", true);
- }
-
- colorSwatch.setAttribute("label",
- containersBundle.GetStringFromName(`containers.${color}.label`));
- let iconElement = document.createElement("hbox");
- iconElement.className = 'userContext-icon';
- iconElement.setAttribute("data-identity-icon", "circle");
- iconElement.setAttribute("data-identity-color", color);
-
- colorSwatch.appendChild(iconElement);
- radiogroup.appendChild(colorSwatch);
- }
- return radiogroup;
- },
-
- onApplyChanges() {
- let icon = document.getElementById("icon").value;
- let color = document.getElementById("color").value;
- let name = document.getElementById("name").value;
-
- if (this.icons.indexOf(icon) == -1) {
- throw "Internal error. The icon value doesn't match.";
- }
-
- if (this.colors.indexOf(color) == -1) {
- throw "Internal error. The color value doesn't match.";
- }
-
- if (this.userContextId) {
- ContextualIdentityService.update(this.userContextId,
- name,
- icon,
- color);
- } else {
- ContextualIdentityService.create(name,
- icon,
- color);
- }
- window.parent.location.reload()
- },
-
- onWindowKeyPress(aEvent) {
- if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
- window.close();
- }
-}
diff --git a/application/basilisk/components/preferences/containers.xul b/application/basilisk/components/preferences/containers.xul
deleted file mode 100644
index 62a775fe4..000000000
--- a/application/basilisk/components/preferences/containers.xul
+++ /dev/null
@@ -1,52 +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://browser/skin/preferences/containers.css" type="text/css"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/containers.dtd" >
-
-<window id="ContainersDialog" class="windowDialog"
- windowtype="Browser:Permissions"
- title="&window.title;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- style="width: &window.width;;"
- onload="gContainersManager.onLoad();"
- onunload="gContainersManager.uninit();"
- persist="screenX screenY width height"
- onkeypress="gContainersManager.onWindowKeyPress(event);">
-
- <script src="chrome://global/content/treeUtils.js"/>
- <script src="chrome://browser/content/preferences/containers.js"/>
-
- <stringbundle id="bundlePreferences"
- src="chrome://browser/locale/preferences/preferences.properties"/>
-
- <keyset>
- <key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
- </keyset>
-
- <vbox class="contentPane largeDialogContainer" flex="1" hidden="true" id="containers-content">
- <description id="permissionsText" control="url"/>
- <separator class="thin"/>
- <hbox align="start">
- <label id="nameLabel" control="url" value="&name.label;" accesskey="&name.accesskey;"/>
- <textbox id="name" flex="1" onkeyup="gContainersManager.checkForm();" />
- </hbox>
- <hbox align="center" id="iconWrapper">
- <label id="iconLabel" control="url" value="&icon.label;" accesskey="&icon.accesskey;"/>
- </hbox>
- <hbox align="center" id="colorWrapper">
- <label id="colorLabel" control="url" value="&color.label;" accesskey="&color.accesskey;"/>
- </hbox>
- </vbox>
- <vbox>
- <hbox class="actionButtons" align="right" flex="1">
- <button id="btnApplyChanges" disabled="true" oncommand="gContainersManager.onApplyChanges();" icon="save"
- label="&button.ok.label;" accesskey="&button.ok.accesskey;"/>
- </hbox>
- </vbox>
-</window>
diff --git a/application/basilisk/components/preferences/cookies.js b/application/basilisk/components/preferences/cookies.js
index c420855f8..4ede5b6e6 100644
--- a/application/basilisk/components/preferences/cookies.js
+++ b/application/basilisk/components/preferences/cookies.js
@@ -7,12 +7,8 @@ const nsICookie = Components.interfaces.nsICookie;
Components.utils.import("resource://gre/modules/AppConstants.jsm");
Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm")
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
- "resource://gre/modules/ContextualIdentityService.jsm");
-
var gCookiesWindow = {
_cm : Components.classes["@mozilla.org/cookiemanager;1"]
.getService(Components.interfaces.nsICookieManager),
@@ -38,10 +34,6 @@ var gCookiesWindow = {
this._populateList(true);
document.getElementById("filter").focus();
-
- if (!Services.prefs.getBoolPref("privacy.userContext.enabled")) {
- document.getElementById("userContextRow").hidden = true;
- }
},
uninit: function () {
@@ -82,24 +74,11 @@ var gCookiesWindow = {
aCookieB.originAttributes);
},
- _isPrivateCookie: function (aCookie) {
- let { userContextId } = aCookie.originAttributes;
- if (!userContextId) {
- // Default identity is public.
- return false;
- }
- return !ContextualIdentityService.getIdentityFromId(userContextId).public;
- },
-
observe: function (aCookie, aTopic, aData) {
if (aTopic != "cookie-changed")
return;
if (aCookie instanceof Components.interfaces.nsICookie) {
- if (this._isPrivateCookie(aCookie)) {
- return;
- }
-
var strippedHost = this._makeStrippedHost(aCookie.host);
if (aData == "changed")
this._handleCookieChanged(aCookie, strippedHost);
@@ -498,9 +477,6 @@ var gCookiesWindow = {
while (e.hasMoreElements()) {
var cookie = e.getNext();
if (cookie && cookie instanceof Components.interfaces.nsICookie) {
- if (this._isPrivateCookie(cookie)) {
- continue;
- }
var strippedHost = this._makeStrippedHost(cookie.host);
this._addCookie(strippedHost, cookie, hostCount);
@@ -524,17 +500,9 @@ var gCookiesWindow = {
return this._bundle.getString("expireAtEndOfSession");
},
- _getUserContextString: function(aUserContextId) {
- if (parseInt(aUserContextId) == 0) {
- return this._bundle.getString("defaultUserContextLabel");
- }
-
- return ContextualIdentityService.getUserContextLabel(aUserContextId);
- },
-
_updateCookieData: function (aItem) {
var seln = this._view.selection;
- var ids = ["name", "value", "host", "path", "isSecure", "expires", "userContext"];
+ var ids = ["name", "value", "host", "path", "isSecure", "expires"];
var properties;
if (aItem && !aItem.container && seln.count > 0) {
@@ -543,8 +511,7 @@ var gCookiesWindow = {
isDomain: aItem.isDomain ? this._bundle.getString("domainColon")
: this._bundle.getString("hostColon"),
isSecure: aItem.isSecure ? this._bundle.getString("forSecureOnly")
- : this._bundle.getString("forAnyConnection"),
- userContext: this._getUserContextString(aItem.originAttributes.userContextId) };
+ : this._bundle.getString("forAnyConnection") };
for (let id of ids) {
document.getElementById(id).disabled = false;
}
@@ -553,7 +520,7 @@ var gCookiesWindow = {
var noneSelected = this._bundle.getString("noCookieSelected");
properties = { name: noneSelected, value: noneSelected, host: noneSelected,
path: noneSelected, expires: noneSelected,
- isSecure: noneSelected, userContext: noneSelected };
+ isSecure: noneSelected };
for (let id of ids) {
document.getElementById(id).disabled = true;
}
diff --git a/application/basilisk/components/preferences/cookies.xul b/application/basilisk/components/preferences/cookies.xul
index bd60d9346..d5fefdef7 100644
--- a/application/basilisk/components/preferences/cookies.xul
+++ b/application/basilisk/components/preferences/cookies.xul
@@ -85,10 +85,6 @@
<hbox pack="end"><label id="expiresLabel" control="expires" value="&props.expires.label;"/></hbox>
<textbox id="expires" readonly="true" class="plain"/>
</row>
- <row align="center" id="userContextRow">
- <hbox pack="end"><label id="userContextLabel" control="userContext" value="&props.container.label;"/></hbox>
- <textbox id="userContext" readonly="true" class="plain"/>
- </row>
</rows>
</grid>
</hbox>
diff --git a/application/basilisk/components/preferences/handlers.css b/application/basilisk/components/preferences/handlers.css
index 6af75a08b..d5f100831 100644
--- a/application/basilisk/components/preferences/handlers.css
+++ b/application/basilisk/components/preferences/handlers.css
@@ -10,10 +10,6 @@
-moz-binding: url("chrome://browser/content/preferences/handlers.xml#handler-selected");
}
-#containersView > richlistitem {
- -moz-binding: url("chrome://browser/content/preferences/handlers.xml#container");
-}
-
/**
* Make the icons appear.
* Note: we display the icon box for every item whether or not it has an icon
diff --git a/application/basilisk/components/preferences/handlers.xml b/application/basilisk/components/preferences/handlers.xml
index 0c629d759..ad07a493c 100644
--- a/application/basilisk/components/preferences/handlers.xml
+++ b/application/basilisk/components/preferences/handlers.xml
@@ -69,29 +69,6 @@
</binding>
- <binding id="container">
- <content>
- <xul:hbox flex="1" equalsize="always">
- <xul:hbox flex="1" align="center">
- <xul:hbox xbl:inherits="data-identity-icon=containerIcon,data-identity-color=containerColor" height="24" width="24" class="userContext-icon"/>
- <xul:label flex="1" crop="end" xbl:inherits="value=containerName"/>
- </xul:hbox>
- <xul:hbox flex="1" align="right">
- <xul:button anonid="preferencesButton"
- xbl:inherits="value=userContextId"
- onclick="gContainersPane.onPeferenceClick(event.originalTarget)">
- Preferences
- </xul:button>
- <xul:button anonid="removeButton"
- xbl:inherits="value=userContextId"
- onclick="gContainersPane.onRemoveClick(event.originalTarget)">
- Remove
- </xul:button>
- </xul:hbox>
- </xul:hbox>
- </content>
- </binding>
-
<binding id="offlineapp"
extends="chrome://global/content/bindings/listbox.xml#listitem">
<content>
diff --git a/application/basilisk/components/preferences/in-content/advanced.js b/application/basilisk/components/preferences/in-content/advanced.js
index 5f9458eee..850f0e09f 100644
--- a/application/basilisk/components/preferences/in-content/advanced.js
+++ b/application/basilisk/components/preferences/in-content/advanced.js
@@ -670,25 +670,6 @@ var gAdvancedPane = {
// or the binary platform or OS version is not known.
// A locked pref is sufficient to disable the radiogroup.
radiogroup.disabled = !canCheck || enabledPref.locked || autoPref.locked;
-
- if (AppConstants.MOZ_MAINTENANCE_SERVICE) {
- // Check to see if the maintenance service is installed.
- // If it is don't show the preference at all.
- var installed;
- try {
- var wrk = Components.classes["@mozilla.org/windows-registry-key;1"]
- .createInstance(Components.interfaces.nsIWindowsRegKey);
- wrk.open(wrk.ROOT_KEY_LOCAL_MACHINE,
- "SOFTWARE\\Mozilla\\MaintenanceService",
- wrk.ACCESS_READ | wrk.WOW64_64);
- installed = wrk.readIntValue("Installed");
- wrk.close();
- } catch (e) {
- }
- if (installed != 1) {
- document.getElementById("useService").hidden = true;
- }
- }
}
},
diff --git a/application/basilisk/components/preferences/in-content/advanced.xul b/application/basilisk/components/preferences/in-content/advanced.xul
index 4973f8e09..50e276501 100644
--- a/application/basilisk/components/preferences/in-content/advanced.xul
+++ b/application/basilisk/components/preferences/in-content/advanced.xul
@@ -79,12 +79,6 @@
<preference id="app.update.disable_button.showUpdateHistory"
name="app.update.disable_button.showUpdateHistory"
type="bool"/>
-
-#ifdef MOZ_MAINTENANCE_SERVICE
- <preference id="app.update.service.enabled"
- name="app.update.service.enabled"
- type="bool"/>
-#endif
#endif
<preference id="browser.search.update"
@@ -331,13 +325,6 @@
accesskey="&updateHistory.accesskey;"
preference="app.update.disable_button.showUpdateHistory"/>
</hbox>
-
-#ifdef MOZ_MAINTENANCE_SERVICE
- <checkbox id="useService"
- label="&useService.label;"
- accesskey="&useService.accesskey;"
- preference="app.update.service.enabled"/>
-#endif
</groupbox>
#endif
<groupbox id="updateOthers" align="start">
diff --git a/application/basilisk/components/preferences/in-content/containers.js b/application/basilisk/components/preferences/in-content/containers.js
deleted file mode 100644
index 758e45fff..000000000
--- a/application/basilisk/components/preferences/in-content/containers.js
+++ /dev/null
@@ -1,73 +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/. */
-
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-Components.utils.import("resource://gre/modules/ContextualIdentityService.jsm");
-
-const containersBundle = Services.strings.createBundle("chrome://browser/locale/preferences/containers.properties");
-
-const defaultContainerIcon = "fingerprint";
-const defaultContainerColor = "blue";
-
-let gContainersPane = {
-
- init() {
- this._list = document.getElementById("containersView");
-
- document.getElementById("backContainersLink").addEventListener("click", function () {
- gotoPref("privacy");
- });
-
- this._rebuildView();
- },
-
- _rebuildView() {
- const containers = ContextualIdentityService.getIdentities();
- while (this._list.firstChild) {
- this._list.firstChild.remove();
- }
- for (let container of containers) {
- let item = document.createElement("richlistitem");
- item.setAttribute("containerName", ContextualIdentityService.getUserContextLabel(container.userContextId));
- item.setAttribute("containerIcon", container.icon);
- item.setAttribute("containerColor", container.color);
- item.setAttribute("userContextId", container.userContextId);
-
- this._list.appendChild(item);
- }
- },
-
- onRemoveClick(button) {
- let userContextId = button.getAttribute("value");
- ContextualIdentityService.remove(userContextId);
- this._rebuildView();
- },
- onPeferenceClick(button) {
- this.openPreferenceDialog(button.getAttribute("value"));
- },
-
- onAddButtonClick(button) {
- this.openPreferenceDialog(null);
- },
-
- openPreferenceDialog(userContextId) {
- let identity = {
- name: "",
- icon: defaultContainerIcon,
- color: defaultContainerColor
- };
- let title;
- if (userContextId) {
- identity = ContextualIdentityService.getIdentityFromId(userContextId);
- // This is required to get the translation string from defaults
- identity.name = ContextualIdentityService.getUserContextLabel(identity.userContextId);
- title = containersBundle.formatStringFromName("containers.updateContainerTitle", [identity.name], 1);
- }
-
- const params = { userContextId, identity, windowTitle: title };
- gSubDialog.open("chrome://browser/content/preferences/containers.xul",
- null, params);
- }
-
-};
diff --git a/application/basilisk/components/preferences/in-content/containers.xul b/application/basilisk/components/preferences/in-content/containers.xul
deleted file mode 100644
index e83bac1c3..000000000
--- a/application/basilisk/components/preferences/in-content/containers.xul
+++ /dev/null
@@ -1,54 +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/.
-
-<!-- Containers panel -->
-
-<script type="application/javascript"
- src="chrome://browser/content/preferences/in-content/containers.js"/>
-
-<preferences id="containerPreferences" hidden="true" data-category="paneContainer">
- <!-- Containers -->
- <preference id="privacy.userContext.enabled"
- name="privacy.userContext.enabled"
- type="bool"/>
-
-</preferences>
-
-<hbox hidden="true"
- class="container-header-links"
- data-category="paneContainers">
- <label class="text-link" id="backContainersLink" value="&backLink.label;" />
-</hbox>
-
-<hbox id="header-containers"
- class="header"
- hidden="true"
- data-category="paneContainers">
- <label class="header-name" flex="1">&paneContainers.title;</label>
- <button class="help-button"
- aria-label="&helpButton.label;"/>
-</hbox>
-
-<!-- Containers -->
-<groupbox id="browserContainersGroup" data-category="paneContainers" hidden="true">
- <vbox id="browserContainersbox">
-
- <richlistbox id="containersView" orient="vertical" persist="lastSelectedType"
- flex="1">
- <listheader equalsize="always">
- <treecol id="typeColumn" label="&label.label;" value="type"
- persist="sortDirection"
- flex="1" sortDirection="ascending"/>
- <treecol id="actionColumn" value="action"
- persist="sortDirection"
- flex="1"/>
- </listheader>
- </richlistbox>
- </vbox>
- <vbox>
- <hbox flex="1">
- <button onclick="gContainersPane.onAddButtonClick();" accesskey="&addButton.accesskey;" label="&addButton.label;"/>
- </hbox>
- </vbox>
-</groupbox>
diff --git a/application/basilisk/components/preferences/in-content/content.js b/application/basilisk/components/preferences/in-content/content.js
index a957b1dd5..2eac10ca4 100644
--- a/application/basilisk/components/preferences/in-content/content.js
+++ b/application/basilisk/components/preferences/in-content/content.js
@@ -31,18 +31,6 @@ var gContentPane = {
menulist.value = FontBuilder.readFontSelection(menulist);
}
- // Show translation preferences if we may:
- const prefName = "browser.translation.ui.show";
- if (Services.prefs.getBoolPref(prefName)) {
- let row = document.getElementById("translationBox");
- row.removeAttribute("hidden");
- // Showing attribution only for Bing Translator.
- Components.utils.import("resource:///modules/translation/Translation.jsm");
- if (Translation.translationEngine == "bing") {
- document.getElementById("bingAttribution").removeAttribute("hidden");
- }
- }
-
if (AlertsServiceDND) {
let notificationsDoNotDisturbRow =
document.getElementById("notificationsDoNotDisturbRow");
@@ -66,10 +54,6 @@ var gContentPane = {
gContentPane.configureColors);
setEventListener("chooseLanguage", "command",
gContentPane.showLanguages);
- setEventListener("translationAttributionImage", "click",
- gContentPane.openTranslationProviderAttribution);
- setEventListener("translateButton", "command",
- gContentPane.showTranslationExceptions);
setEventListener("notificationsDoNotDisturb", "command",
gContentPane.toggleDoNotDisturbNotifications);
@@ -274,21 +258,6 @@ var gContentPane = {
gSubDialog.open("chrome://browser/content/preferences/languages.xul");
},
- /**
- * Displays the translation exceptions dialog where specific site and language
- * translation preferences can be set.
- */
- showTranslationExceptions: function ()
- {
- gSubDialog.open("chrome://browser/content/preferences/translation.xul");
- },
-
- openTranslationProviderAttribution: function ()
- {
- Components.utils.import("resource:///modules/translation/Translation.jsm");
- Translation.openProviderAttribution();
- },
-
toggleDoNotDisturbNotifications: function (event)
{
AlertsServiceDND.manualDoNotDisturb = event.target.checked;
diff --git a/application/basilisk/components/preferences/in-content/content.xul b/application/basilisk/components/preferences/in-content/content.xul
index 9434cba62..fac864411 100644
--- a/application/basilisk/components/preferences/in-content/content.xul
+++ b/application/basilisk/components/preferences/in-content/content.xul
@@ -22,11 +22,6 @@
<preference id="font.language.group"
name="font.language.group"
type="wstring"/>
-
- <!-- Languages -->
- <preference id="browser.translation.detectLanguage"
- name="browser.translation.detectLanguage"
- type="bool"/>
</preferences>
<script type="application/javascript"
@@ -191,23 +186,4 @@
label="&chooseButton.label;"
accesskey="&chooseButton.accesskey;"/>
</hbox>
-
- <hbox id="translationBox" hidden="true">
- <hbox align="center" flex="1">
- <checkbox id="translate" preference="browser.translation.detectLanguage"
- label="&translateWebPages.label;." accesskey="&translateWebPages.accesskey;"
- onsyncfrompreference="return gContentPane.updateButtons('translateButton',
- 'browser.translation.detectLanguage');"/>
- <hbox id="bingAttribution" hidden="true">
- <label>&translation.options.attribution.beforeLogo;</label>
- <separator orient="vertical" class="thin"/>
- <image id="translationAttributionImage" aria-label="Microsoft Translator"
- src="chrome://browser/content/microsoft-translator-attribution.png"/>
- <separator orient="vertical" class="thin"/>
- <label>&translation.options.attribution.afterLogo;</label>
- </hbox>
- </hbox>
- <button id="translateButton" label="&translateExceptions.label;"
- accesskey="&translateExceptions.accesskey;"/>
- </hbox>
</groupbox>
diff --git a/application/basilisk/components/preferences/in-content/jar.mn b/application/basilisk/components/preferences/in-content/jar.mn
index e61a88856..21f5ccf38 100644
--- a/application/basilisk/components/preferences/in-content/jar.mn
+++ b/application/basilisk/components/preferences/in-content/jar.mn
@@ -3,16 +3,17 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
browser.jar:
- content/browser/preferences/in-content/preferences.js
+* content/browser/preferences/in-content/preferences.js
* content/browser/preferences/in-content/preferences.xul
content/browser/preferences/in-content/subdialogs.js
content/browser/preferences/in-content/main.js
* content/browser/preferences/in-content/privacy.js
- content/browser/preferences/in-content/containers.js
content/browser/preferences/in-content/advanced.js
content/browser/preferences/in-content/applications.js
* content/browser/preferences/in-content/content.js
+#ifdef MOZ_SERVICES_SYNC
content/browser/preferences/in-content/sync.js
+#endif
* content/browser/preferences/in-content/security.js
content/browser/preferences/in-content/search.js
diff --git a/application/basilisk/components/preferences/in-content/main.js b/application/basilisk/components/preferences/in-content/main.js
index bac771bec..8f3dffa57 100644
--- a/application/basilisk/components/preferences/in-content/main.js
+++ b/application/basilisk/components/preferences/in-content/main.js
@@ -78,18 +78,6 @@ var gMainPane = {
setEventListener("chooseFolder", "command",
gMainPane.chooseFolder);
- if (AppConstants.MOZ_DEV_EDITION) {
- let uAppData = OS.Constants.Path.userApplicationDataDir;
- let ignoreSeparateProfile = OS.Path.join(uAppData, "ignore-dev-edition-profile");
-
- setEventListener("separateProfileMode", "command", gMainPane.separateProfileModeChange);
- let separateProfileModeCheckbox = document.getElementById("separateProfileMode");
- setEventListener("getStarted", "click", gMainPane.onGetStarted);
-
- OS.File.stat(ignoreSeparateProfile).then(() => separateProfileModeCheckbox.checked = false,
- () => separateProfileModeCheckbox.checked = true);
- }
-
// Notify observers that the UI is now ready
Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService)
@@ -101,71 +89,6 @@ var gMainPane = {
// **STUB**
},
- separateProfileModeChange: function ()
- {
- if (AppConstants.MOZ_DEV_EDITION) {
- function quitApp() {
- Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestartNotSameProfile);
- }
- function revertCheckbox(error) {
- separateProfileModeCheckbox.checked = !separateProfileModeCheckbox.checked;
- if (error) {
- Cu.reportError("Failed to toggle separate profile mode: " + error);
- }
- }
- function createOrRemoveSpecialDevEditionFile(onSuccess) {
- let uAppData = OS.Constants.Path.userApplicationDataDir;
- let ignoreSeparateProfile = OS.Path.join(uAppData, "ignore-dev-edition-profile");
-
- if (separateProfileModeCheckbox.checked) {
- OS.File.remove(ignoreSeparateProfile).then(onSuccess, revertCheckbox);
- } else {
- OS.File.writeAtomic(ignoreSeparateProfile, new Uint8Array()).then(onSuccess, revertCheckbox);
- }
- }
-
- let separateProfileModeCheckbox = document.getElementById("separateProfileMode");
- let button_index = confirmRestartPrompt(separateProfileModeCheckbox.checked,
- 0, false, true);
- switch (button_index) {
- case CONFIRM_RESTART_PROMPT_CANCEL:
- revertCheckbox();
- return;
- case CONFIRM_RESTART_PROMPT_RESTART_NOW:
- const Cc = Components.classes, Ci = Components.interfaces;
- let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
- .createInstance(Ci.nsISupportsPRBool);
- Services.obs.notifyObservers(cancelQuit, "quit-application-requested",
- "restart");
- if (!cancelQuit.data) {
- createOrRemoveSpecialDevEditionFile(quitApp);
- return;
- }
-
- // Revert the checkbox in case we didn't quit
- revertCheckbox();
- return;
- case CONFIRM_RESTART_PROMPT_RESTART_LATER:
- createOrRemoveSpecialDevEditionFile();
- return;
- }
- }
- },
-
- onGetStarted: function (aEvent) {
- if (AppConstants.MOZ_DEV_EDITION) {
- const Cc = Components.classes, Ci = Components.interfaces;
- let wm = Cc["@mozilla.org/appshell/window-mediator;1"]
- .getService(Ci.nsIWindowMediator);
- let win = wm.getMostRecentWindow("navigator:browser");
-
- if (win) {
- let accountsTab = win.gBrowser.addTab("about:accounts?action=signin&entrypoint=dev-edition-setup");
- win.gBrowser.selectedTab = accountsTab;
- }
- }
- },
-
// HOME PAGE
/*
diff --git a/application/basilisk/components/preferences/in-content/main.xul b/application/basilisk/components/preferences/in-content/main.xul
index 8eca11877..f695b308b 100644
--- a/application/basilisk/components/preferences/in-content/main.xul
+++ b/application/basilisk/components/preferences/in-content/main.xul
@@ -112,17 +112,6 @@
hidden="true">
<caption><label>&startup.label;</label></caption>
-#ifdef MOZ_DEV_EDITION
- <vbox id="separateProfileBox">
- <checkbox id="separateProfileMode"
- label="&separateProfileMode.label;"/>
- <hbox align="center" class="indent">
- <label id="useFirefoxSync">&useFirefoxSync.label;</label>
- <label id="getStarted" class="text-link">&getStarted.label;</label>
- </hbox>
- </vbox>
-#endif
-
#ifdef HAVE_SHELL_SERVICE
<vbox id="defaultBrowserBox">
<hbox align="center">
diff --git a/application/basilisk/components/preferences/in-content/preferences.js b/application/basilisk/components/preferences/in-content/preferences.js
index e18ab4b04..69cb180d5 100644
--- a/application/basilisk/components/preferences/in-content/preferences.js
+++ b/application/basilisk/components/preferences/in-content/preferences.js
@@ -61,11 +61,12 @@ function init_all() {
register_module("paneGeneral", gMainPane);
register_module("paneSearch", gSearchPane);
register_module("panePrivacy", gPrivacyPane);
- register_module("paneContainers", gContainersPane);
register_module("paneAdvanced", gAdvancedPane);
register_module("paneApplications", gApplicationsPane);
register_module("paneContent", gContentPane);
+#ifdef MOZ_SERVICES_SYNC
register_module("paneSync", gSyncPane);
+#endif
register_module("paneSecurity", gSecurityPane);
let categories = document.getElementById("categories");
diff --git a/application/basilisk/components/preferences/in-content/preferences.xul b/application/basilisk/components/preferences/in-content/preferences.xul
index 7ec7ef119..61639aa19 100644
--- a/application/basilisk/components/preferences/in-content/preferences.xul
+++ b/application/basilisk/components/preferences/in-content/preferences.xul
@@ -13,7 +13,6 @@
href="chrome://browser/content/preferences/handlers.css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/applications.css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/search.css"?>
-<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/containers.css"?>
<!DOCTYPE page [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
@@ -23,12 +22,12 @@
<!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd">
<!ENTITY % tabsDTD SYSTEM "chrome://browser/locale/preferences/tabs.dtd">
<!ENTITY % searchDTD SYSTEM "chrome://browser/locale/preferences/search.dtd">
+#ifdef MOZ_SERVICES_SYNC
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
<!ENTITY % syncDTD SYSTEM "chrome://browser/locale/preferences/sync.dtd">
+#endif
<!ENTITY % securityDTD SYSTEM
"chrome://browser/locale/preferences/security.dtd">
-<!ENTITY % containersDTD SYSTEM
- "chrome://browser/locale/preferences/containers.dtd">
<!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
<!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd">
<!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
@@ -43,10 +42,11 @@
%privacyDTD;
%tabsDTD;
%searchDTD;
+#ifdef MOZ_SERVICES_SYNC
%syncBrandDTD;
%syncDTD;
+#endif
%securityDTD;
-%containersDTD;
%sanitizeDTD;
%mainDTD;
%aboutHomeDTD;
@@ -134,12 +134,6 @@
<label class="category-name" flex="1">&panePrivacy.title;</label>
</richlistitem>
- <richlistitem id="category-containers"
- class="category"
- value="paneContainers"
- helpTopic="prefs-containers"
- hidden="true"/>
-
<richlistitem id="category-security"
class="category"
value="paneSecurity"
@@ -150,6 +144,7 @@
<label class="category-name" flex="1">&paneSecurity.title;</label>
</richlistitem>
+#ifdef MOZ_SERVICES_SYNC
<richlistitem id="category-sync"
class="category"
value="paneSync"
@@ -159,6 +154,7 @@
<image class="category-icon"/>
<label class="category-name" flex="1">&paneSync.title;</label>
</richlistitem>
+#endif
<richlistitem id="category-advanced"
class="category"
@@ -183,12 +179,13 @@
#include main.xul
#include search.xul
#include privacy.xul
-#include containers.xul
#include advanced.xul
#include applications.xul
#include content.xul
#include security.xul
+#ifdef MOZ_SERVICES_SYNC
#include sync.xul
+#endif
</prefpane>
</vbox>
diff --git a/application/basilisk/components/preferences/in-content/privacy.js b/application/basilisk/components/preferences/in-content/privacy.js
index eab606e36..a976fb4fa 100644
--- a/application/basilisk/components/preferences/in-content/privacy.js
+++ b/application/basilisk/components/preferences/in-content/privacy.js
@@ -5,8 +5,6 @@
Components.utils.import("resource://gre/modules/AppConstants.jsm");
Components.utils.import("resource://gre/modules/PluralForm.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
- "resource://gre/modules/ContextualIdentityService.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
"resource://gre/modules/PluralForm.jsm");
@@ -62,59 +60,6 @@ var gPrivacyPane = {
},
/**
- * Show the Containers UI depending on the privacy.userContext.ui.enabled pref.
- */
- _initBrowserContainers: function () {
- if (!Services.prefs.getBoolPref("privacy.userContext.ui.enabled")) {
- return;
- }
-
- let link = document.getElementById("browserContainersLearnMore");
- link.href = Services.urlFormatter.formatURLPref("app.support.baseURL") + "containers";
-
- document.getElementById("browserContainersbox").hidden = false;
-
- document.getElementById("browserContainersCheckbox").checked =
- Services.prefs.getBoolPref("privacy.userContext.enabled");
- },
-
- _checkBrowserContainers: function(event) {
- let checkbox = document.getElementById("browserContainersCheckbox");
- if (checkbox.checked) {
- Services.prefs.setBoolPref("privacy.userContext.enabled", true);
- return;
- }
-
- let count = ContextualIdentityService.countContainerTabs();
- if (count == 0) {
- Services.prefs.setBoolPref("privacy.userContext.enabled", false);
- return;
- }
-
- let bundlePreferences = document.getElementById("bundlePreferences");
-
- let title = bundlePreferences.getString("disableContainersAlertTitle");
- let message = PluralForm.get(count, bundlePreferences.getString("disableContainersMsg"))
- .replace("#S", count)
- let okButton = PluralForm.get(count, bundlePreferences.getString("disableContainersOkButton"))
- .replace("#S", count)
- let cancelButton = bundlePreferences.getString("disableContainersButton2");
-
- let buttonFlags = (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_0) +
- (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_1);
-
- let rv = Services.prompt.confirmEx(window, title, message, buttonFlags,
- okButton, cancelButton, null, null, {});
- if (rv == 0) {
- ContextualIdentityService.closeAllContainerTabs();
- Services.prefs.setBoolPref("privacy.userContext.enabled", false);
- return;
- }
-
- checkbox.checked = true;
- },
-
- /**
* Sets up the UI for the number of days of history to keep, and updates the
* label of the "Clear Now..." button.
*/
@@ -136,7 +81,6 @@ var gPrivacyPane = {
this._initTrackingProtectionPBM();
#endif
this._initAutocomplete();
- this._initBrowserContainers();
setEventListener("privacy.sanitize.sanitizeOnShutdown", "change",
gPrivacyPane._updateSanitizeSettingsButton);
@@ -184,10 +128,6 @@ var gPrivacyPane = {
setEventListener("changeBlockListPBM", "command",
gPrivacyPane.showBlockLists);
#endif
- setEventListener("browserContainersCheckbox", "command",
- gPrivacyPane._checkBrowserContainers);
- setEventListener("browserContainersSettings", "command",
- gPrivacyPane.showContainerSettings);
},
#ifdef MOZ_SAFE_BROWSING
@@ -489,13 +429,6 @@ var gPrivacyPane = {
},
#endif
- /**
- * Displays container panel for customising and adding containers.
- */
- showContainerSettings() {
- gotoPref("containers");
- },
-
#ifdef MOZ_SAFE_BROWSING
/**
* Displays the available block lists for tracking protection.
@@ -702,25 +635,4 @@ var gPrivacyPane = {
settingsButton.disabled = !sanitizeOnShutdownPref.value;
},
-
- // CONTAINERS
-
- /*
- * preferences:
- *
- * privacy.userContext.enabled
- * - true if containers is enabled
- */
-
- /**
- * Enables/disables the Settings button used to configure containers
- */
- readBrowserContainersCheckbox: function ()
- {
- var pref = document.getElementById("privacy.userContext.enabled");
- var settings = document.getElementById("browserContainersSettings");
-
- settings.disabled = !pref.value;
- }
-
};
diff --git a/application/basilisk/components/preferences/in-content/privacy.xul b/application/basilisk/components/preferences/in-content/privacy.xul
index e6cdc5dd2..691cd6bf9 100644
--- a/application/basilisk/components/preferences/in-content/privacy.xul
+++ b/application/basilisk/components/preferences/in-content/privacy.xul
@@ -302,28 +302,3 @@
&suggestionSettings.label;
</label>
</groupbox>
-
-<!-- Containers -->
-<groupbox id="browserContainersGroup" data-category="panePrivacy" hidden="true">
- <vbox id="browserContainersbox" hidden="true">
- <caption><label>&browserContainersHeader.label;
- <label id="browserContainersLearnMore" class="text-link"
- value="&browserContainersLearnMore.label;"/>
- </label></caption>
- <hbox align="start">
- <vbox>
- <checkbox id="browserContainersCheckbox"
- label="&browserContainersEnabled.label;"
- accesskey="&browserContainersEnabled.accesskey;"
- preference="privacy.userContext.enabled"
- onsyncfrompreference="return gPrivacyPane.readBrowserContainersCheckbox();"/>
- </vbox>
- <spacer flex="1"/>
- <vbox>
- <button id="browserContainersSettings"
- label="&browserContainersSettings.label;"
- accesskey="&browserContainersSettings.accesskey;"/>
- </vbox>
- </hbox>
- </vbox>
-</groupbox>
diff --git a/application/basilisk/components/preferences/in-content/sync.js b/application/basilisk/components/preferences/in-content/sync.js
index 27f7cd48c..917b5f123 100644
--- a/application/basilisk/components/preferences/in-content/sync.js
+++ b/application/basilisk/components/preferences/in-content/sync.js
@@ -1,32 +1,16 @@
/* 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/. */
+ * 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/. */
Components.utils.import("resource://services-sync/main.js");
Components.utils.import("resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function () {
- return Components.utils.import("resource://gre/modules/FxAccountsCommon.js", {});
-});
-
-XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
- "resource://gre/modules/FxAccounts.jsm");
-
const PAGE_NO_ACCOUNT = 0;
const PAGE_HAS_ACCOUNT = 1;
const PAGE_NEEDS_UPDATE = 2;
-const FXA_PAGE_LOGGED_OUT = 3;
-const FXA_PAGE_LOGGED_IN = 4;
-
-// Indexes into the "login status" deck.
-// We are in a successful verified state - everything should work!
-const FXA_LOGIN_VERIFIED = 0;
-// We have logged in to an unverified account.
-const FXA_LOGIN_UNVERIFIED = 1;
-// We are logged in locally, but the server rejected our credentials.
-const FXA_LOGIN_FAILED = 2;
var gSyncPane = {
+ _stringBundle: null,
prefArray: ["engine.bookmarks", "engine.passwords", "engine.prefs",
"engine.tabs", "engine.history"],
@@ -45,13 +29,11 @@ var gSyncPane = {
needsUpdate: function () {
this.page = PAGE_NEEDS_UPDATE;
let label = document.getElementById("loginError");
- label.textContent = Weave.Utils.getErrorString(Weave.Status.login);
+ label.value = Weave.Utils.getErrorString(Weave.Status.login);
label.className = "error";
},
init: function () {
- this._setupEventListeners();
-
// If the Service hasn't finished initializing, wait for it.
let xps = Components.classes["@mozilla.org/weave/service;1"]
.getService(Components.interfaces.nsISupports)
@@ -62,10 +44,6 @@ var gSyncPane = {
return;
}
- // it may take some time before we can determine what provider to use
- // and the state of that provider, so show the "please wait" page.
- this._showLoadPage(xps);
-
let onUnload = function () {
window.removeEventListener("unload", onUnload, false);
try {
@@ -85,352 +63,50 @@ var gSyncPane = {
xps.ensureLoaded();
},
- _showLoadPage: function (xps) {
- let username;
- try {
- username = Services.prefs.getCharPref("services.sync.username");
- } catch (e) {}
- if (!username) {
- this.page = FXA_PAGE_LOGGED_OUT;
- } else if (xps.fxAccountsEnabled) {
- // Use cached values while we wait for the up-to-date values
- let cachedComputerName;
- try {
- cachedComputerName = Services.prefs.getCharPref("services.sync.client.name");
- }
- catch (e) {
- cachedComputerName = "";
- }
- document.getElementById("fxaEmailAddress1").textContent = username;
- this._populateComputerName(cachedComputerName);
- this.page = FXA_PAGE_LOGGED_IN;
- } else { // Old Sync
- this.page = PAGE_HAS_ACCOUNT;
- }
- },
-
_init: function () {
let topics = ["weave:service:login:error",
"weave:service:login:finish",
- "weave:service:start-over:finish",
+ "weave:service:start-over",
"weave:service:setup-complete",
- "weave:service:logout:finish",
- FxAccountsCommon.ONVERIFIED_NOTIFICATION,
- FxAccountsCommon.ONLOGIN_NOTIFICATION,
- FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION,
- ];
+ "weave:service:logout:finish"];
+
// Add the observers now and remove them on unload
- // XXXzpao This should use Services.obs.* but Weave's Obs does nice handling
+ //XXXzpao This should use Services.obs.* but Weave's Obs does nice handling
// of `this`. Fix in a followup. (bug 583347)
topics.forEach(function (topic) {
Weave.Svc.Obs.add(topic, this.updateWeavePrefs, this);
}, this);
-
window.addEventListener("unload", function() {
topics.forEach(function (topic) {
Weave.Svc.Obs.remove(topic, this.updateWeavePrefs, this);
}, gSyncPane);
}, false);
- XPCOMUtils.defineLazyGetter(this, '_stringBundle', () => {
- return Services.strings.createBundle("chrome://browser/locale/preferences/preferences.properties");
- });
-
- XPCOMUtils.defineLazyGetter(this, '_accountsStringBundle', () => {
- return Services.strings.createBundle("chrome://browser/locale/accounts.properties");
- });
-
- let url = Services.prefs.getCharPref("identity.mobilepromo.android") + "sync-preferences";
- document.getElementById("fxaMobilePromo-android").setAttribute("href", url);
- document.getElementById("fxaMobilePromo-android-hasFxaAccount").setAttribute("href", url);
- url = Services.prefs.getCharPref("identity.mobilepromo.ios") + "sync-preferences";
- document.getElementById("fxaMobilePromo-ios").setAttribute("href", url);
- document.getElementById("fxaMobilePromo-ios-hasFxaAccount").setAttribute("href", url);
-
- document.getElementById("tosPP-small-ToS").setAttribute("href", gSyncUtils.tosURL);
- document.getElementById("tosPP-normal-ToS").setAttribute("href", gSyncUtils.tosURL);
- document.getElementById("tosPP-small-PP").setAttribute("href", gSyncUtils.privacyPolicyURL);
- document.getElementById("tosPP-normal-PP").setAttribute("href", gSyncUtils.privacyPolicyURL);
-
- fxAccounts.promiseAccountsManageURI(this._getEntryPoint()).then(url => {
- document.getElementById("verifiedManage").setAttribute("href", url);
- });
-
+ this._stringBundle =
+ Services.strings.createBundle("chrome://browser/locale/preferences/preferences.properties");
this.updateWeavePrefs();
-
- this._initProfileImageUI();
- },
-
- _toggleComputerNameControls: function(editMode) {
- let textbox = document.getElementById("fxaSyncComputerName");
- textbox.disabled = !editMode;
- document.getElementById("fxaChangeDeviceName").hidden = editMode;
- document.getElementById("fxaCancelChangeDeviceName").hidden = !editMode;
- document.getElementById("fxaSaveChangeDeviceName").hidden = !editMode;
- },
-
- _focusComputerNameTextbox: function() {
- let textbox = document.getElementById("fxaSyncComputerName");
- let valLength = textbox.value.length;
- textbox.focus();
- textbox.setSelectionRange(valLength, valLength);
- },
-
- _blurComputerNameTextbox: function() {
- document.getElementById("fxaSyncComputerName").blur();
- },
-
- _focusAfterComputerNameTextbox: function() {
- // Focus the most appropriate element that's *not* the "computer name" box.
- Services.focus.moveFocus(window,
- document.getElementById("fxaSyncComputerName"),
- Services.focus.MOVEFOCUS_FORWARD, 0);
- },
-
- _updateComputerNameValue: function(save) {
- if (save) {
- let textbox = document.getElementById("fxaSyncComputerName");
- Weave.Service.clientsEngine.localName = textbox.value;
- }
- this._populateComputerName(Weave.Service.clientsEngine.localName);
- },
-
- _setupEventListeners: function() {
- function setEventListener(aId, aEventType, aCallback)
- {
- document.getElementById(aId)
- .addEventListener(aEventType, aCallback.bind(gSyncPane));
- }
-
- setEventListener("noAccountSetup", "click", function (aEvent) {
- aEvent.stopPropagation();
- gSyncPane.openSetup(null);
- });
- setEventListener("noAccountPair", "click", function (aEvent) {
- aEvent.stopPropagation();
- gSyncPane.openSetup('pair');
- });
- setEventListener("syncChangePassword", "command",
- () => gSyncUtils.changePassword());
- setEventListener("syncResetPassphrase", "command",
- () => gSyncUtils.resetPassphrase());
- setEventListener("syncReset", "command", gSyncPane.resetSync);
- setEventListener("syncAddDeviceLabel", "click", function () {
- gSyncPane.openAddDevice();
- return false;
- });
- setEventListener("syncEnginesList", "select", function () {
- if (this.selectedCount)
- this.clearSelection();
- });
- setEventListener("syncComputerName", "change", function (e) {
- gSyncUtils.changeName(e.target);
- });
- setEventListener("fxaChangeDeviceName", "command", function () {
- this._toggleComputerNameControls(true);
- this._focusComputerNameTextbox();
- });
- setEventListener("fxaCancelChangeDeviceName", "command", function () {
- // We explicitly blur the textbox because of bug 75324, then after
- // changing the state of the buttons, force focus to whatever the focus
- // manager thinks should be next (which on the mac, depends on an OSX
- // keyboard access preference)
- this._blurComputerNameTextbox();
- this._toggleComputerNameControls(false);
- this._updateComputerNameValue(false);
- this._focusAfterComputerNameTextbox();
- });
- setEventListener("fxaSaveChangeDeviceName", "command", function () {
- // Work around bug 75324 - see above.
- this._blurComputerNameTextbox();
- this._toggleComputerNameControls(false);
- this._updateComputerNameValue(true);
- this._focusAfterComputerNameTextbox();
- });
- setEventListener("unlinkDevice", "click", function () {
- gSyncPane.startOver(true);
- return false;
- });
- setEventListener("loginErrorUpdatePass", "click", function () {
- gSyncPane.updatePass();
- return false;
- });
- setEventListener("loginErrorResetPass", "click", function () {
- gSyncPane.resetPass();
- return false;
- });
- setEventListener("loginErrorStartOver", "click", function () {
- gSyncPane.startOver(true);
- return false;
- });
- setEventListener("noFxaSignUp", "command", function () {
- gSyncPane.signUp();
- return false;
- });
- setEventListener("noFxaSignIn", "command", function () {
- gSyncPane.signIn();
- return false;
- });
- setEventListener("fxaUnlinkButton", "command", function () {
- gSyncPane.unlinkFirefoxAccount(true);
- });
- setEventListener("verifyFxaAccount", "command",
- gSyncPane.verifyFirefoxAccount);
- setEventListener("unverifiedUnlinkFxaAccount", "command", function () {
- /* no warning as account can't have previously synced */
- gSyncPane.unlinkFirefoxAccount(false);
- });
- setEventListener("rejectReSignIn", "command",
- gSyncPane.reSignIn);
- setEventListener("rejectUnlinkFxaAccount", "command", function () {
- gSyncPane.unlinkFirefoxAccount(true);
- });
- setEventListener("fxaSyncComputerName", "keypress", function (e) {
- if (e.keyCode == KeyEvent.DOM_VK_RETURN) {
- document.getElementById("fxaSaveChangeDeviceName").click();
- } else if (e.keyCode == KeyEvent.DOM_VK_ESCAPE) {
- document.getElementById("fxaCancelChangeDeviceName").click();
- }
- });
- },
-
- _initProfileImageUI: function () {
- try {
- if (Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled")) {
- document.getElementById("fxaProfileImage").hidden = false;
- }
- } catch (e) { }
+ document.getElementById("weavePrefsDeck").setAttribute("hidden", "");
},
updateWeavePrefs: function () {
- let service = Components.classes["@mozilla.org/weave/service;1"]
- .getService(Components.interfaces.nsISupports)
- .wrappedJSObject;
- // service.fxAccountsEnabled is false iff sync is already configured for
- // the legacy provider.
- if (service.fxAccountsEnabled) {
- let displayNameLabel = document.getElementById("fxaDisplayName");
- let fxaEmailAddress1Label = document.getElementById("fxaEmailAddress1");
- fxaEmailAddress1Label.hidden = false;
- displayNameLabel.hidden = true;
-
- let profileInfoEnabled;
- try {
- profileInfoEnabled = Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled");
- } catch (ex) {}
-
- // determine the fxa status...
- this._showLoadPage(service);
-
- fxAccounts.getSignedInUser().then(data => {
- if (!data) {
- this.page = FXA_PAGE_LOGGED_OUT;
- return false;
- }
- this.page = FXA_PAGE_LOGGED_IN;
- // We are logged in locally, but maybe we are in a state where the
- // server rejected our credentials (eg, password changed on the server)
- let fxaLoginStatus = document.getElementById("fxaLoginStatus");
- let syncReady;
- // Not Verfied implies login error state, so check that first.
- if (!data.verified) {
- fxaLoginStatus.selectedIndex = FXA_LOGIN_UNVERIFIED;
- syncReady = false;
- // So we think we are logged in, so login problems are next.
- // (Although if the Sync identity manager is still initializing, we
- // ignore login errors and assume all will eventually be good.)
- // LOGIN_FAILED_LOGIN_REJECTED explicitly means "you must log back in".
- // All other login failures are assumed to be transient and should go
- // away by themselves, so aren't reflected here.
- } else if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) {
- fxaLoginStatus.selectedIndex = FXA_LOGIN_FAILED;
- syncReady = false;
- // Else we must be golden (or in an error state we expect to magically
- // resolve itself)
- } else {
- fxaLoginStatus.selectedIndex = FXA_LOGIN_VERIFIED;
- syncReady = true;
- }
- fxaEmailAddress1Label.textContent = data.email;
- document.getElementById("fxaEmailAddress2").textContent = data.email;
- document.getElementById("fxaEmailAddress3").textContent = data.email;
- this._populateComputerName(Weave.Service.clientsEngine.localName);
- let engines = document.getElementById("fxaSyncEngines")
- for (let checkbox of engines.querySelectorAll("checkbox")) {
- checkbox.disabled = !syncReady;
- }
- document.getElementById("fxaChangeDeviceName").disabled = !syncReady;
-
- // Clear the profile image (if any) of the previously logged in account.
- document.getElementById("fxaProfileImage").style.removeProperty("list-style-image");
-
- // If the account is verified the next promise in the chain will
- // fetch profile data.
- return data.verified;
- }).then(isVerified => {
- if (isVerified) {
- return fxAccounts.getSignedInUserProfile();
- }
- return null;
- }).then(data => {
- let fxaLoginStatus = document.getElementById("fxaLoginStatus");
- if (data && profileInfoEnabled) {
- if (data.displayName) {
- fxaLoginStatus.setAttribute("hasName", true);
- displayNameLabel.hidden = false;
- displayNameLabel.textContent = data.displayName;
- } else {
- fxaLoginStatus.removeAttribute("hasName");
- }
- if (data.avatar) {
- let bgImage = "url(\"" + data.avatar + "\")";
- let profileImageElement = document.getElementById("fxaProfileImage");
- profileImageElement.style.listStyleImage = bgImage;
-
- let img = new Image();
- img.onerror = () => {
- // Clear the image if it has trouble loading. Since this callback is asynchronous
- // we check to make sure the image is still the same before we clear it.
- if (profileImageElement.style.listStyleImage === bgImage) {
- profileImageElement.style.removeProperty("list-style-image");
- }
- };
- img.src = data.avatar;
- }
- } else {
- fxaLoginStatus.removeAttribute("hasName");
- }
- }, err => {
- FxAccountsCommon.log.error(err);
- }).catch(err => {
- // If we get here something's really busted
- Cu.reportError(String(err));
- });
-
- // If fxAccountEnabled is false and we are in a "not configured" state,
- // then fxAccounts is probably fully disabled rather than just unconfigured,
- // so handle this case. This block can be removed once we remove support
- // for fxAccounts being disabled.
- } else if (Weave.Status.service == Weave.CLIENT_NOT_CONFIGURED ||
- Weave.Svc.Prefs.get("firstSync", "") == "notReady") {
+ if (Weave.Status.service == Weave.CLIENT_NOT_CONFIGURED ||
+ Weave.Svc.Prefs.get("firstSync", "") == "notReady") {
this.page = PAGE_NO_ACCOUNT;
- // else: sync was previously configured for the legacy provider, so we
- // make the "old" panels available.
} else if (Weave.Status.login == Weave.LOGIN_FAILED_INVALID_PASSPHRASE ||
Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) {
this.needsUpdate();
} else {
this.page = PAGE_HAS_ACCOUNT;
- document.getElementById("accountName").textContent = Weave.Service.identity.account;
+ document.getElementById("accountName").value = Weave.Service.identity.account;
document.getElementById("syncComputerName").value = Weave.Service.clientsEngine.localName;
- document.getElementById("tosPP-normal").hidden = this._usingCustomServer;
+ document.getElementById("tosPP").hidden = this._usingCustomServer;
}
},
startOver: function (showDialog) {
if (showDialog) {
let flags = Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING +
- Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL +
+ Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL +
Services.prompt.BUTTON_POS_1_DEFAULT;
let buttonChoice =
Services.prompt.confirmEx(window,
@@ -441,8 +117,9 @@ var gSyncPane = {
null, null, null, {});
// If the user selects cancel, just bail
- if (buttonChoice == 1)
+ if (buttonChoice == 1) {
return;
+ }
}
Weave.Service.startOver();
@@ -450,33 +127,19 @@ var gSyncPane = {
},
updatePass: function () {
- if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED)
+ if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) {
gSyncUtils.changePassword();
- else
+ } else {
gSyncUtils.updatePassphrase();
+ }
},
resetPass: function () {
- if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED)
+ if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) {
gSyncUtils.resetPassword();
- else
+ } else {
gSyncUtils.resetPassphrase();
- },
-
- _getEntryPoint: function () {
- let params = new URLSearchParams(document.URL.split("#")[0].split("?")[1] || "");
- return params.get("entrypoint") || "preferences";
- },
-
- _openAboutAccounts: function(action) {
- let entryPoint = this._getEntryPoint();
- let params = new URLSearchParams();
- if (action) {
- params.set("action", action);
}
- params.set("entrypoint", entryPoint);
-
- this.replaceTabWithUrl("about:accounts?" + params);
},
/**
@@ -489,185 +152,42 @@ var gSyncPane = {
* "reset" -- reset sync
*/
openSetup: function (wizardType) {
- let service = Components.classes["@mozilla.org/weave/service;1"]
- .getService(Components.interfaces.nsISupports)
- .wrappedJSObject;
-
- if (service.fxAccountsEnabled) {
- this._openAboutAccounts();
+ let win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
+ if (win) {
+ win.focus();
} else {
- let win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
- if (win)
- win.focus();
- else {
- window.openDialog("chrome://browser/content/sync/setup.xul",
- "weaveSetup", "centerscreen,chrome,resizable=no",
- wizardType);
- }
- }
- },
-
- openContentInBrowser: function(url, options) {
- let win = Services.wm.getMostRecentWindow("navigator:browser");
- if (!win) {
- // no window to use, so use _openLink to create a new one. We don't
- // always use that as it prefers to open a new window rather than use
- // an existing one.
- gSyncUtils._openLink(url);
- return;
+ window.openDialog("chrome://browser/content/sync/setup.xul",
+ "weaveSetup", "centerscreen,chrome,resizable=no",
+ wizardType);
}
- win.switchToTabHavingURI(url, true, options);
- },
-
- // Replace the current tab with the specified URL.
- replaceTabWithUrl(url) {
- // Get the <browser> element hosting us.
- let browser = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell)
- .chromeEventHandler;
- // And tell it to load our URL.
- browser.loadURI(url);
},
- signUp: function() {
- this._openAboutAccounts("signup");
- },
-
- signIn: function() {
- this._openAboutAccounts("signin");
- },
-
- reSignIn: function() {
- this._openAboutAccounts("reauth");
- },
-
-
- clickOrSpaceOrEnterPressed: function(event) {
- // Note: charCode is deprecated, but 'char' not yet implemented.
- // Replace charCode with char when implemented, see Bug 680830
- return ((event.type == "click" && event.button == 0) ||
- (event.type == "keypress" &&
- (event.charCode == KeyEvent.DOM_VK_SPACE || event.keyCode == KeyEvent.DOM_VK_RETURN)));
- },
-
- openChangeProfileImage: function(event) {
- if (this.clickOrSpaceOrEnterPressed(event)) {
- fxAccounts.promiseAccountsChangeProfileURI(this._getEntryPoint(), "avatar")
- .then(url => {
- this.openContentInBrowser(url, {
- replaceQueryString: true
- });
- });
- // Prevent page from scrolling on the space key.
- event.preventDefault();
- }
- },
-
- openManageFirefoxAccount: function(event) {
- if (this.clickOrSpaceOrEnterPressed(event)) {
- this.manageFirefoxAccount();
- // Prevent page from scrolling on the space key.
- event.preventDefault();
- }
- },
-
- manageFirefoxAccount: function() {
- fxAccounts.promiseAccountsManageURI(this._getEntryPoint())
- .then(url => {
- this.openContentInBrowser(url, {
- replaceQueryString: true
- });
- });
- },
-
- verifyFirefoxAccount: function() {
- let showVerifyNotification = (data) => {
- let isError = !data;
- let maybeNot = isError ? "Not" : "";
- let sb = this._accountsStringBundle;
- let title = sb.GetStringFromName("verification" + maybeNot + "SentTitle");
- let email = !isError && data ? data.email : "";
- let body = sb.formatStringFromName("verification" + maybeNot + "SentBody", [email], 1);
- new Notification(title, { body })
- }
-
- let onError = () => {
- showVerifyNotification();
- };
-
- let onSuccess = data => {
- if (data) {
- showVerifyNotification(data);
- } else {
- onError();
- }
- };
-
- fxAccounts.resendVerificationEmail()
- .then(fxAccounts.getSignedInUser, onError)
- .then(onSuccess, onError);
- },
-
- openOldSyncSupportPage: function() {
- let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "old-sync";
- this.openContentInBrowser(url);
- },
-
- unlinkFirefoxAccount: function(confirm) {
- if (confirm) {
- // We use a string bundle shared with aboutAccounts.
- let sb = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties");
- let disconnectLabel = sb.GetStringFromName("disconnect.label");
- let title = sb.GetStringFromName("disconnect.verify.title");
- let body = sb.GetStringFromName("disconnect.verify.bodyHeading") +
- "\n\n" +
- sb.GetStringFromName("disconnect.verify.bodyText");
- let ps = Services.prompt;
- let buttonFlags = (ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING) +
- (ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL) +
- ps.BUTTON_POS_1_DEFAULT;
-
- let factory = Cc["@mozilla.org/prompter;1"]
- .getService(Ci.nsIPromptFactory);
- let prompt = factory.getPrompt(window, Ci.nsIPrompt);
- let bag = prompt.QueryInterface(Ci.nsIWritablePropertyBag2);
- bag.setPropertyAsBool("allowTabModal", true);
-
- let pressed = prompt.confirmEx(title, body, buttonFlags,
- disconnectLabel, null, null, null, {});
-
- if (pressed != 0) { // 0 is the "continue" button
- return;
- }
+ openQuotaDialog: function () {
+ let win = Services.wm.getMostRecentWindow("Sync:ViewQuota");
+ if (win) {
+ win.focus();
+ } else {
+ window.openDialog("chrome://browser/content/sync/quota.xul", "",
+ "centerscreen,chrome,dialog,modal");
}
- fxAccounts.signOut().then(() => {
- this.updateWeavePrefs();
- });
},
openAddDevice: function () {
- if (!Weave.Utils.ensureMPUnlocked())
+ if (!Weave.Utils.ensureMPUnlocked()) {
return;
+ }
let win = Services.wm.getMostRecentWindow("Sync:AddDevice");
- if (win)
+ if (win) {
win.focus();
- else
+ } else {
window.openDialog("chrome://browser/content/sync/addDevice.xul",
"syncAddDevice", "centerscreen,chrome,resizable=no");
+ }
},
resetSync: function () {
this.openSetup("reset");
},
-
- _populateComputerName(value) {
- let textbox = document.getElementById("fxaSyncComputerName");
- if (!textbox.hasAttribute("placeholder")) {
- textbox.setAttribute("placeholder",
- Weave.Utils.getDefaultDeviceName());
- }
- textbox.value = value;
- },
};
+
diff --git a/application/basilisk/components/preferences/in-content/sync.xul b/application/basilisk/components/preferences/in-content/sync.xul
index f1aebf2aa..7ca075483 100644
--- a/application/basilisk/components/preferences/in-content/sync.xul
+++ b/application/basilisk/components/preferences/in-content/sync.xul
@@ -1,35 +1,22 @@
-# 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/.
-
-<!-- Sync panel -->
-
-<preferences id="syncEnginePrefs" hidden="true" data-category="paneSync">
- <preference id="engine.addons"
- name="services.sync.engine.addons"
- type="bool"/>
- <preference id="engine.bookmarks"
- name="services.sync.engine.bookmarks"
- type="bool"/>
- <preference id="engine.history"
- name="services.sync.engine.history"
- type="bool"/>
- <preference id="engine.tabs"
- name="services.sync.engine.tabs"
- type="bool"/>
- <preference id="engine.prefs"
- name="services.sync.engine.prefs"
- type="bool"/>
- <preference id="engine.passwords"
- name="services.sync.engine.passwords"
- type="bool"/>
-</preferences>
+<!-- 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/. -->
<script type="application/javascript"
src="chrome://browser/content/preferences/in-content/sync.js"/>
<script type="application/javascript"
src="chrome://browser/content/sync/utils.js"/>
+<preferences>
+<!-- <preference id="engine.addons" name="services.sync.engine.addons" type="bool"/> -->
+ <preference id="engine.bookmarks" name="services.sync.engine.bookmarks" type="bool"/>
+ <preference id="engine.history" name="services.sync.engine.history" type="bool"/>
+ <preference id="engine.tabs" name="services.sync.engine.tabs" type="bool"/>
+ <preference id="engine.prefs" name="services.sync.engine.prefs" type="bool"/>
+ <preference id="engine.passwords" name="services.sync.engine.passwords" type="bool"/>
+</preferences>
+
+
<hbox id="header-sync"
class="header"
hidden="true"
@@ -39,22 +26,19 @@
</hbox>
<deck id="weavePrefsDeck" data-category="paneSync" hidden="true">
- <!-- These panels are for the "legacy" sync provider -->
<vbox id="noAccount" align="center">
<spacer flex="1"/>
<description id="syncDesc">
&weaveDesc.label;
</description>
<separator/>
- <label id="noAccountSetup" class="text-link">
- &setupButton.label;
- </label>
- <vbox id="pairDevice">
- <separator/>
- <label id="noAccountPair" class="text-link">
- &pairDevice.label;
- </label>
- </vbox>
+ <label class="text-link"
+ onclick="event.stopPropagation(); gSyncPane.openSetup(null);"
+ value="&setupButton.label;"/>
+ <separator/>
+ <label class="text-link"
+ onclick="event.stopPropagation(); gSyncPane.openSetup('pair');"
+ value="&pairDevice.label;"/>
<spacer flex="3"/>
</vbox>
@@ -63,7 +47,7 @@
<!-- label is set to account name -->
<caption id="accountCaption" align="center">
<image id="accountCaptionImage"/>
- <label id="accountName"/>
+ <label id="accountName" value=""/>
</caption>
<hbox>
@@ -71,30 +55,39 @@
label="&manageAccount.label;"
accesskey="&manageAccount.accesskey;">
<menupopup>
- <menuitem id="syncChangePassword" label="&changePassword2.label;"/>
- <menuitem id="syncResetPassphrase" label="&myRecoveryKey.label;"/>
+ <menuitem label="&viewQuota.label;"
+ oncommand="gSyncPane.openQuotaDialog();"/>
+ <menuseparator/>
+ <menuitem label="&changePassword2.label;"
+ oncommand="gSyncUtils.changePassword();"/>
+ <menuitem label="&myRecoveryKey.label;"
+ oncommand="gSyncUtils.resetPassphrase();"/>
<menuseparator/>
- <menuitem id="syncReset" label="&resetSync2.label;"/>
+ <menuitem label="&resetSync2.label;"
+ oncommand="gSyncPane.resetSync();"/>
</menupopup>
</button>
</hbox>
<hbox>
<label id="syncAddDeviceLabel"
- class="text-link">
- &pairDevice.label;
- </label>
+ class="text-link"
+ onclick="gSyncPane.openAddDevice(); return false;"
+ value="&pairDevice.label;"/>
</hbox>
<vbox>
- <label>&syncMy.label;</label>
+ <label value="&syncMy.label;" />
<richlistbox id="syncEnginesList"
- orient="vertical">
+ orient="vertical"
+ onselect="if (this.selectedCount) this.clearSelection();">
+ <!--
<richlistitem>
<checkbox label="&engine.addons.label;"
accesskey="&engine.addons.accesskey;"
preference="engine.addons"/>
</richlistitem>
+ -->
<richlistitem>
<checkbox label="&engine.bookmarks.label;"
accesskey="&engine.bookmarks.accesskey;"
@@ -132,228 +125,42 @@
</columns>
<rows>
<row align="center">
- <label control="syncComputerName">
- &syncDeviceName.label;
- </label>
- <textbox id="syncComputerName"/>
+ <label value="&syncDeviceName.label;"
+ accesskey="&syncDeviceName.accesskey;"
+ control="syncComputerName"/>
+ <textbox id="syncComputerName"
+ onchange="gSyncUtils.changeName(this)"/>
</row>
</rows>
</grid>
<hbox>
- <label id="unlinkDevice" class="text-link">
- &unlinkDevice.label;
- </label>
+ <label class="text-link"
+ onclick="gSyncPane.startOver(true); return false;"
+ value="&unlinkDevice.label;"/>
</hbox>
</groupbox>
- <vbox id="tosPP-normal">
- <label id="tosPP-normal-ToS" class="text-link">
- &prefs.tosLink.label;
- </label>
- <label id="tosPP-normal-PP" class="text-link">
- &prefs.ppLink.label;
- </label>
- </vbox>
- </vbox>
-
- <vbox id="needsUpdate" align="center" pack="center">
- <hbox>
- <label id="loginError"/>
- <label id="loginErrorUpdatePass" class="text-link">
- &updatePass.label;
- </label>
- <label id="loginErrorResetPass" class="text-link">
- &resetPass.label;
- </label>
+ <hbox id="tosPP" pack="center">
+ <label class="text-link"
+ onclick="event.stopPropagation();gSyncUtils.openToS();"
+ value="&prefs.tosLink.label;"/>
+ <label class="text-link"
+ onclick="event.stopPropagation();gSyncUtils.openPrivacyPolicy();"
+ value="&prefs.ppLink.label;"/>
</hbox>
- <label id="loginErrorStartOver" class="text-link">
- &unlinkDevice.label;
- </label>
</vbox>
- <!-- These panels are for the Firefox Accounts identity provider -->
- <vbox id="noFxaAccount">
- <hbox>
- <vbox id="fxaContentWrapper">
- <groupbox id="noFxaGroup">
- <vbox>
- <label id="noFxaCaption">&signedOut.caption;</label>
- <description id="noFxaDescription" flex="1">&signedOut.description;</description>
- <hbox class="fxaAccountBox">
- <vbox>
- <image class="fxaFirefoxLogo"/>
- </vbox>
- <vbox flex="1">
- <label id="signedOutAccountBoxTitle">&signedOut.accountBox.title;</label>
- <hbox class="fxaAccountBoxButtons">
- <button id="noFxaSignUp" label="&signedOut.accountBox.create;" accesskey="&signedOut.accountBox.create.accesskey;"></button>
- <button id="noFxaSignIn" label="&signedOut.accountBox.signin;" accesskey="&signedOut.accountBox.signin.accesskey;"></button>
- </hbox>
- </vbox>
- </hbox>
- </vbox>
- </groupbox>
- </vbox>
- <vbox>
- <image class="fxaSyncIllustration"/>
- </vbox>
- </hbox>
- <label class="fxaMobilePromo">
- &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces
- --><label id="fxaMobilePromo-android"
- class="androidLink text-link"><!--
- -->&mobilePromo3.androidLink;</label><!--
- -->&mobilePromo3.iOSBefore;<!--
- --><label id="fxaMobilePromo-ios"
- class="iOSLink text-link"><!--
- -->&mobilePromo3.iOSLink;</label><!--
- -->&mobilePromo3.end;
- </label>
- </vbox>
-
- <vbox id="hasFxaAccount">
+ <vbox id="needsUpdate" align="center" pack="center">
<hbox>
- <vbox id="fxaContentWrapper">
- <groupbox id="fxaGroup">
- <caption><label>&syncBrand.fxAccount.label;</label></caption>
- <deck id="fxaLoginStatus">
-
- <!-- logged in and verified and all is good -->
- <hbox id="fxaLoginVerified" class="fxaAccountBox">
- <vbox align="center" pack="center">
- <image id="fxaProfileImage" class="actionable"
- role="button"
- onclick="gSyncPane.openChangeProfileImage(event);" hidden="true"
- onkeypress="gSyncPane.openChangeProfileImage(event);"
- tooltiptext="&profilePicture.tooltip;"/>
- </vbox>
- <vbox flex="1" pack="center">
- <label id="fxaDisplayName" hidden="true"/>
- <label id="fxaEmailAddress1"/>
- <hbox class="fxaAccountBoxButtons">
- <button id="fxaUnlinkButton" label="&disconnect.label;" accesskey="&disconnect.accesskey;"/>
- <html:a id="verifiedManage" target="_blank"
- accesskey="&verifiedManage.accesskey;"
- onkeypress="gSyncPane.openManageFirefoxAccount(event);"><!--
- -->&verifiedManage.label;</html:a>
- </hbox>
- </vbox>
- </hbox>
-
- <!-- logged in to an unverified account -->
- <hbox id="fxaLoginUnverified" class="fxaAccountBox">
- <vbox>
- <image id="fxaProfileImage"/>
- </vbox>
- <vbox flex="1">
- <hbox>
- <vbox><image id="fxaLoginRejectedWarning"/></vbox>
- <description flex="1">
- &signedInUnverified.beforename.label;
- <label id="fxaEmailAddress2"/>
- &signedInUnverified.aftername.label;
- </description>
- </hbox>
- <hbox class="fxaAccountBoxButtons">
- <button id="verifyFxaAccount" accesskey="&verify.accesskey;">&verify.label;</button>
- <button id="unverifiedUnlinkFxaAccount" accesskey="&forget.accesskey;">&forget.label;</button>
- </hbox>
- </vbox>
- </hbox>
-
- <!-- logged in locally but server rejected credentials -->
- <hbox id="fxaLoginRejected" class="fxaAccountBox">
- <vbox>
- <image id="fxaProfileImage"/>
- </vbox>
- <vbox flex="1">
- <hbox>
- <vbox><image id="fxaLoginRejectedWarning"/></vbox>
- <description flex="1">
- &signedInLoginFailure.beforename.label;
- <label id="fxaEmailAddress3"/>
- &signedInLoginFailure.aftername.label;
- </description>
- </hbox>
- <hbox class="fxaAccountBoxButtons">
- <button id="rejectReSignIn" accessky="&signIn.accesskey;">&signIn.label;</button>
- <button id="rejectUnlinkFxaAccount" accesskey="&forget.accesskey;">&forget.label;</button>
- </hbox>
- </vbox>
- </hbox>
- </deck>
- </groupbox>
- <groupbox id="syncOptions">
- <caption><label>&signedIn.engines.label;</label></caption>
- <hbox id="fxaSyncEngines">
- <vbox align="start" flex="1">
- <checkbox label="&engine.tabs.label;"
- accesskey="&engine.tabs.accesskey;"
- preference="engine.tabs"/>
- <checkbox label="&engine.bookmarks.label;"
- accesskey="&engine.bookmarks.accesskey;"
- preference="engine.bookmarks"/>
- <checkbox label="&engine.passwords.label;"
- accesskey="&engine.passwords.accesskey;"
- preference="engine.passwords"/>
- </vbox>
- <vbox align="start" flex="1">
- <checkbox label="&engine.history.label;"
- accesskey="&engine.history.accesskey;"
- preference="engine.history"/>
- <checkbox label="&engine.addons.label;"
- accesskey="&engine.addons.accesskey;"
- preference="engine.addons"/>
- <checkbox label="&engine.prefs.label;"
- accesskey="&engine.prefs.accesskey;"
- preference="engine.prefs"/>
- </vbox>
- <spacer/>
- </hbox>
- </groupbox>
- </vbox>
- <vbox>
- <image class="fxaSyncIllustration"/>
- </vbox>
+ <label id="loginError" value=""/>
+ <label class="text-link"
+ onclick="gSyncPane.updatePass(); return false;"
+ value="&updatePass.label;"/>
+ <label class="text-link"
+ onclick="gSyncPane.resetPass(); return false;"
+ value="&resetPass.label;"/>
</hbox>
- <groupbox>
- <caption>
- <label control="fxaSyncComputerName">
- &fxaSyncDeviceName.label;
- </label>
- </caption>
- <hbox id="fxaDeviceName">
- <textbox id="fxaSyncComputerName" disabled="true"/>
- <hbox>
- <button id="fxaChangeDeviceName"
- label="&changeSyncDeviceName.label;"
- accesskey="&changeSyncDeviceName.accesskey;"/>
- <button id="fxaCancelChangeDeviceName"
- label="&cancelChangeSyncDeviceName.label;"
- accesskey="&cancelChangeSyncDeviceName.accesskey;"
- hidden="true"/>
- <button id="fxaSaveChangeDeviceName"
- label="&saveChangeSyncDeviceName.label;"
- accesskey="&saveChangeSyncDeviceName.accesskey;"
- hidden="true"/>
- </hbox>
- </hbox>
- </groupbox>
- <label class="fxaMobilePromo">
- &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces
- --><label class="androidLink text-link" id="fxaMobilePromo-android-hasFxaAccount"><!--
- -->&mobilePromo3.androidLink;</label><!--
- -->&mobilePromo3.iOSBefore;<!--
- --><label class="iOSLink text-link" id="fxaMobilePromo-ios-hasFxaAccount"><!--
- -->&mobilePromo3.iOSLink;</label><!--
- -->&mobilePromo3.end;
- </label>
- <vbox id="tosPP-small" align="start">
- <label id="tosPP-small-ToS" class="text-link">
- &prefs.tosLink.label;
- </label>
- <label id="tosPP-small-PP" class="text-link">
- &fxaPrivacyNotice.link.label;
- </label>
- </vbox>
+ <label class="text-link"
+ onclick="gSyncPane.startOver(true); return false;"
+ value="&unlinkDevice.label;"/>
</vbox>
</deck>
diff --git a/application/basilisk/components/preferences/jar.mn b/application/basilisk/components/preferences/jar.mn
index d233c7865..f74be0820 100644
--- a/application/basilisk/components/preferences/jar.mn
+++ b/application/basilisk/components/preferences/jar.mn
@@ -24,12 +24,8 @@ browser.jar:
* content/browser/preferences/languages.xul
content/browser/preferences/languages.js
content/browser/preferences/permissions.xul
- content/browser/preferences/containers.xul
- content/browser/preferences/containers.js
content/browser/preferences/permissions.js
content/browser/preferences/sanitize.xul
content/browser/preferences/sanitize.js
content/browser/preferences/selectBookmark.xul
content/browser/preferences/selectBookmark.js
- content/browser/preferences/translation.xul
- content/browser/preferences/translation.js
diff --git a/application/basilisk/components/preferences/translation.js b/application/basilisk/components/preferences/translation.js
deleted file mode 100644
index cd570db0e..000000000
--- a/application/basilisk/components/preferences/translation.js
+++ /dev/null
@@ -1,255 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 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/. */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-XPCOMUtils.defineLazyGetter(this, "gLangBundle", () =>
- Services.strings.createBundle("chrome://global/locale/languageNames.properties"));
-
-const kPermissionType = "translate";
-const kLanguagesPref = "browser.translation.neverForLanguages";
-
-function Tree(aId, aData)
-{
- this._data = aData;
- this._tree = document.getElementById(aId);
- this._tree.view = this;
-}
-
-Tree.prototype = {
- get boxObject() {
- return this._tree.treeBoxObject;
- },
- get isEmpty() {
- return !this._data.length;
- },
- get hasSelection() {
- return this.selection.count > 0;
- },
- getSelectedItems: function() {
- let result = [];
-
- let rc = this.selection.getRangeCount();
- for (let i = 0; i < rc; ++i) {
- let min = {}, max = {};
- this.selection.getRangeAt(i, min, max);
- for (let j = min.value; j <= max.value; ++j)
- result.push(this._data[j]);
- }
-
- return result;
- },
-
- // nsITreeView implementation
- get rowCount() {
- return this._data.length;
- },
- getCellText: function (aRow, aColumn) {
- return this._data[aRow];
- },
- isSeparator: function(aIndex) {
- return false;
- },
- isSorted: function() {
- return false;
- },
- isContainer: function(aIndex) {
- return false;
- },
- setTree: function(aTree) {},
- getImageSrc: function(aRow, aColumn) {},
- getProgressMode: function(aRow, aColumn) {},
- getCellValue: function(aRow, aColumn) {},
- cycleHeader: function(column) {},
- getRowProperties: function(row) {
- return "";
- },
- getColumnProperties: function(column) {
- return "";
- },
- getCellProperties: function(row, column) {
- return "";
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView])
-};
-
-function Lang(aCode)
-{
- this.langCode = aCode;
- this._label = gLangBundle.GetStringFromName(aCode);
-}
-
-Lang.prototype = {
- toString: function() {
- return this._label;
- }
-}
-
-var gTranslationExceptions = {
- onLoad: function() {
- if (this._siteTree) {
- // Re-using an open dialog, clear the old observers.
- this.uninit();
- }
-
- // Load site permissions into an array.
- this._sites = [];
- let enumerator = Services.perms.enumerator;
- while (enumerator.hasMoreElements()) {
- let perm = enumerator.getNext().QueryInterface(Ci.nsIPermission);
-
- if (perm.type == kPermissionType &&
- perm.capability == Services.perms.DENY_ACTION) {
- this._sites.push(perm.principal.origin);
- }
- }
- Services.obs.addObserver(this, "perm-changed", false);
- this._sites.sort();
-
- this._siteTree = new Tree("sitesTree", this._sites);
- this.onSiteSelected();
-
- this._langs = this.getLanguageExceptions();
- Services.prefs.addObserver(kLanguagesPref, this, false);
- this._langTree = new Tree("languagesTree", this._langs);
- this.onLanguageSelected();
- },
-
- // Get the list of languages we don't translate as an array.
- getLanguageExceptions: function() {
- let langs = Services.prefs.getCharPref(kLanguagesPref);
- if (!langs)
- return [];
-
- let result = langs.split(",").map(code => new Lang(code));
- result.sort();
-
- return result;
- },
-
- observe: function(aSubject, aTopic, aData) {
- if (aTopic == "perm-changed") {
- if (aData == "cleared") {
- if (!this._sites.length)
- return;
- let removed = this._sites.splice(0, this._sites.length);
- this._siteTree.boxObject.rowCountChanged(0, - removed.length);
- }
- else {
- let perm = aSubject.QueryInterface(Ci.nsIPermission);
- if (perm.type != kPermissionType)
- return;
-
- if (aData == "added") {
- if (perm.capability != Services.perms.DENY_ACTION)
- return;
- this._sites.push(perm.principal.origin);
- this._sites.sort();
- let boxObject = this._siteTree.boxObject;
- boxObject.rowCountChanged(0, 1);
- boxObject.invalidate();
- }
- else if (aData == "deleted") {
- let index = this._sites.indexOf(perm.principal.origin);
- if (index == -1)
- return;
- this._sites.splice(index, 1);
- this._siteTree.boxObject.rowCountChanged(index, -1);
- this.onSiteSelected();
- return;
- }
- }
- this.onSiteSelected();
- }
- else if (aTopic == "nsPref:changed") {
- this._langs = this.getLanguageExceptions();
- let change = this._langs.length - this._langTree.rowCount;
- this._langTree._data = this._langs;
- let boxObject = this._langTree.boxObject;
- if (change)
- boxObject.rowCountChanged(0, change);
- boxObject.invalidate();
- this.onLanguageSelected();
- }
- },
-
- _handleButtonDisabling: function(aTree, aIdPart) {
- let empty = aTree.isEmpty;
- document.getElementById("removeAll" + aIdPart + "s").disabled = empty;
- document.getElementById("remove" + aIdPart).disabled =
- empty || !aTree.hasSelection;
- },
-
- onLanguageSelected: function() {
- this._handleButtonDisabling(this._langTree, "Language");
- },
-
- onSiteSelected: function() {
- this._handleButtonDisabling(this._siteTree, "Site");
- },
-
- onLanguageDeleted: function() {
- let langs = Services.prefs.getCharPref(kLanguagesPref);
- if (!langs)
- return;
-
- let removed = this._langTree.getSelectedItems().map(l => l.langCode);
-
- langs = langs.split(",").filter(l => removed.indexOf(l) == -1);
- Services.prefs.setCharPref(kLanguagesPref, langs.join(","));
- },
-
- onAllLanguagesDeleted: function() {
- Services.prefs.setCharPref(kLanguagesPref, "");
- },
-
- onSiteDeleted: function() {
- let removedSites = this._siteTree.getSelectedItems();
- for (let origin of removedSites) {
- let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(origin);
- Services.perms.removeFromPrincipal(principal, kPermissionType);
- }
- },
-
- onAllSitesDeleted: function() {
- if (this._siteTree.isEmpty)
- return;
-
- let removedSites = this._sites.splice(0, this._sites.length);
- this._siteTree.boxObject.rowCountChanged(0, -removedSites.length);
-
- for (let origin of removedSites) {
- let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(origin);
- Services.perms.removeFromPrincipal(principal, kPermissionType);
- }
-
- this.onSiteSelected();
- },
-
- onSiteKeyPress: function(aEvent) {
- if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE)
- this.onSiteDeleted();
- },
-
- onLanguageKeyPress: function(aEvent) {
- if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE)
- this.onLanguageDeleted();
- },
-
- onWindowKeyPress: function(aEvent) {
- if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
- window.close();
- },
-
- uninit: function() {
- Services.obs.removeObserver(this, "perm-changed");
- Services.prefs.removeObserver(kLanguagesPref, this);
- }
-};
diff --git a/application/basilisk/components/preferences/translation.xul b/application/basilisk/components/preferences/translation.xul
deleted file mode 100644
index b5dfd1b9b..000000000
--- a/application/basilisk/components/preferences/translation.xul
+++ /dev/null
@@ -1,88 +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://browser/skin/preferences/preferences.css" type="text/css"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://browser/locale/preferences/translation.dtd">
-
-<window id="TranslationDialog" class="windowDialog"
- windowtype="Browser:TranslationExceptions"
- title="&window.title;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- style="width: &window.width;;"
- onload="gTranslationExceptions.onLoad();"
- onunload="gTranslationExceptions.uninit();"
- persist="screenX screenY width height"
- onkeypress="gTranslationExceptions.onWindowKeyPress(event);">
-
- <script src="chrome://browser/content/preferences/translation.js"/>
-
- <stringbundle id="bundlePreferences"
- src="chrome://browser/locale/preferences/preferences.properties"/>
-
- <keyset>
- <key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
- </keyset>
-
- <vbox class="largeDialogContainer">
- <vbox class="contentPane" flex="1">
- <label id="languagesLabel" control="permissionsTree">&noTranslationForLanguages.label;</label>
- <separator class="thin"/>
- <tree id="languagesTree" flex="1" style="height: 12em;"
- hidecolumnpicker="true"
- onkeypress="gTranslationExceptions.onLanguageKeyPress(event)"
- onselect="gTranslationExceptions.onLanguageSelected();">
- <treecols>
- <treecol id="languageCol" label="&treehead.languageName.label;" flex="1"/>
- </treecols>
- <treechildren/>
- </tree>
- </vbox>
- <hbox align="end">
- <hbox class="actionButtons" flex="1">
- <button id="removeLanguage" disabled="true"
- accesskey="&removeLanguage.accesskey;"
- icon="remove" label="&removeLanguage.label;"
- oncommand="gTranslationExceptions.onLanguageDeleted();"/>
- <button id="removeAllLanguages"
- icon="clear" label="&removeAllLanguages.label;"
- accesskey="&removeAllLanguages.accesskey;"
- oncommand="gTranslationExceptions.onAllLanguagesDeleted();"/>
- <spacer flex="1"/>
- </hbox>
- </hbox>
- <separator/>
- <vbox class="contentPane" flex="1">
- <label id="languagesLabel" control="permissionsTree">&noTranslationForSites.label;</label>
- <separator class="thin"/>
- <tree id="sitesTree" flex="1" style="height: 12em;"
- hidecolumnpicker="true"
- onkeypress="gTranslationExceptions.onSiteKeyPress(event)"
- onselect="gTranslationExceptions.onSiteSelected();">
- <treecols>
- <treecol id="siteCol" label="&treehead.siteName.label;" flex="1"/>
- </treecols>
- <treechildren/>
- </tree>
- </vbox>
- </vbox>
- <hbox align="end">
- <hbox class="actionButtons" flex="1">
- <button id="removeSite" disabled="true"
- accesskey="&removeSite.accesskey;"
- icon="remove" label="&removeSite.label;"
- oncommand="gTranslationExceptions.onSiteDeleted();"/>
- <button id="removeAllSites"
- icon="clear" label="&removeAllSites.label;"
- accesskey="&removeAllSites.accesskey;"
- oncommand="gTranslationExceptions.onAllSitesDeleted();"/>
- <spacer flex="1"/>
- <button oncommand="close();" icon="close"
- label="&button.close.label;" accesskey="&button.close.accesskey;"/>
- </hbox>
- </hbox>
-</window>