зеркало из https://github.com/mozilla/gecko-dev.git
Backing out 107165:7bb5f1ebb833 and 107164:ee6470d54349 s/computers/devices
This commit is contained in:
Родитель
6c90dcdaa8
Коммит
4809c9f843
|
@ -1593,42 +1593,15 @@
|
||||||
<field name="_brandBundle" readonly="true">
|
<field name="_brandBundle" readonly="true">
|
||||||
Services.strings.createBundle("chrome://branding/locale/brand.properties");
|
Services.strings.createBundle("chrome://branding/locale/brand.properties");
|
||||||
</field>
|
</field>
|
||||||
<property name="_viewsLeftMap">
|
|
||||||
<getter><![CDATA[
|
|
||||||
let viewsLeftMap = {};
|
|
||||||
try {
|
|
||||||
viewsLeftMap = JSON.parse(Services.prefs.getCharPref("browser.syncPromoViewsLeftMap"));
|
|
||||||
} catch (ex) {
|
|
||||||
// If the old preference exists, migrate it to the new one.
|
|
||||||
try {
|
|
||||||
let oldPref = Services.prefs.getIntPref("browser.syncPromoViewsLeft");
|
|
||||||
Services.prefs.clearUserPref("browser.syncPromoViewsLeft");
|
|
||||||
viewsLeftMap.bookmarks = oldPref;
|
|
||||||
viewsLeftMap.passwords = oldPref;
|
|
||||||
Services.prefs.setCharPref("browser.syncPromoViewsLeftMap",
|
|
||||||
JSON.stringify(viewsLeftMap));
|
|
||||||
} catch (ex2) {}
|
|
||||||
}
|
|
||||||
return viewsLeftMap;
|
|
||||||
]]></getter>
|
|
||||||
</property>
|
|
||||||
<property name="_viewsLeft">
|
<property name="_viewsLeft">
|
||||||
<getter><![CDATA[
|
<getter><![CDATA[
|
||||||
let views = 5;
|
try {
|
||||||
if (this._viewsLeftMap[this._notificationType] !== undefined) {
|
return Services.prefs.getIntPref("browser.syncPromoViewsLeft");
|
||||||
views = this._viewsLeftMap[this._notificationType];
|
} catch(ex) {}
|
||||||
}
|
return 5;
|
||||||
return views;
|
|
||||||
]]></getter>
|
]]></getter>
|
||||||
<setter><![CDATA[
|
<setter><![CDATA[
|
||||||
if (this._viewsLeftMap !== undefined) {
|
Services.prefs.setIntPref("browser.syncPromoViewsLeft", val);
|
||||||
let map = this._viewsLeftMap;
|
|
||||||
} else {
|
|
||||||
let map = {};
|
|
||||||
}
|
|
||||||
map[this._notificationType] = val;
|
|
||||||
Services.prefs.setCharPref("browser.syncPromoViewsLeftMap",
|
|
||||||
JSON.stringify(map));
|
|
||||||
return val;
|
return val;
|
||||||
]]></setter>
|
]]></setter>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1642,12 +1615,6 @@
|
||||||
return "passwords";
|
return "passwords";
|
||||||
if (type == "editBookmarkPanel")
|
if (type == "editBookmarkPanel")
|
||||||
return "bookmarks";
|
return "bookmarks";
|
||||||
if (type == "addon-install-complete") {
|
|
||||||
if (!Services.prefs.prefHasUserValue("services.sync.username"))
|
|
||||||
return "addons";
|
|
||||||
if (!Services.prefs.getBoolPref("services.sync.engine.addons"))
|
|
||||||
return "addons-sync-disabled";
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
]]></getter>
|
]]></getter>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1659,14 +1626,6 @@
|
||||||
);
|
);
|
||||||
]]></getter>
|
]]></getter>
|
||||||
</property>
|
</property>
|
||||||
<property name="_notificationLink">
|
|
||||||
<getter><![CDATA[
|
|
||||||
if (this._notificationType == "addons-sync-disabled") {
|
|
||||||
return "https://support.mozilla.org/kb/how-do-i-enable-add-sync";
|
|
||||||
}
|
|
||||||
return "https://services.mozilla.com/sync/";
|
|
||||||
]]></getter>
|
|
||||||
</property>
|
|
||||||
<method name="onCloseButtonCommand">
|
<method name="onCloseButtonCommand">
|
||||||
<body><![CDATA[
|
<body><![CDATA[
|
||||||
this._viewsLeft = 0;
|
this._viewsLeft = 0;
|
||||||
|
@ -1697,8 +1656,7 @@
|
||||||
|
|
||||||
let viewsLeft = this._viewsLeft;
|
let viewsLeft = this._viewsLeft;
|
||||||
if (viewsLeft) {
|
if (viewsLeft) {
|
||||||
if (Services.prefs.prefHasUserValue("services.sync.username") &&
|
if (Services.prefs.prefHasUserValue("services.sync.username")) {
|
||||||
this._notificationType != "addons-sync-disabled") {
|
|
||||||
// If the user has already setup Sync, don't show the notification.
|
// If the user has already setup Sync, don't show the notification.
|
||||||
this._viewsLeft = 0;
|
this._viewsLeft = 0;
|
||||||
// Be sure to hide the panel, in case it was visible and the user
|
// Be sure to hide the panel, in case it was visible and the user
|
||||||
|
@ -1711,7 +1669,7 @@
|
||||||
this._viewsLeft = viewsLeft - 1;
|
this._viewsLeft = viewsLeft - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._promolink.setAttribute("href", this._notificationLink);
|
this._promolink.setAttribute("href", "https://services.mozilla.com/sync/");
|
||||||
this._promolink.value = gNavigatorBundle.getString("syncPromoNotification.learnMoreLinkText");
|
this._promolink.value = gNavigatorBundle.getString("syncPromoNotification.learnMoreLinkText");
|
||||||
|
|
||||||
this.hidden = false;
|
this.hidden = false;
|
||||||
|
|
|
@ -340,16 +340,6 @@ syncPromoNotification.bookmarks.description=You can access your bookmarks on all
|
||||||
# The final space separates this text from the Learn More link.
|
# The final space separates this text from the Learn More link.
|
||||||
syncPromoNotification.passwords.description=You can access your passwords on all your devices with %S.\u0020
|
syncPromoNotification.passwords.description=You can access your passwords on all your devices with %S.\u0020
|
||||||
syncPromoNotification.learnMoreLinkText=Learn More
|
syncPromoNotification.learnMoreLinkText=Learn More
|
||||||
# LOCALIZATION NOTE (syncPromoNotification.addons.label): This appears in
|
|
||||||
# the add-on install complete panel when Sync isn't set.
|
|
||||||
# %S will be replaced by syncBrandShortName.
|
|
||||||
# The final space separates this text from the Learn More link.
|
|
||||||
syncPromoNotification.addons.description=You can access your add-ons on all your devices with %S.\u0020
|
|
||||||
# LOCALIZATION NOTE (syncPromoNotification.addons-sync-disabled.label):
|
|
||||||
# This appears in the add-on install complete panel when Sync is set
|
|
||||||
# but addons sync is not. %S will be replaced by syncBrandShortName.
|
|
||||||
# The final space separates this text from the Learn More link.
|
|
||||||
syncPromoNotification.addons-sync-disabled.description=You can use your %S account to synchronize add-ons across multiple computers.\u0020
|
|
||||||
|
|
||||||
# Telemetry prompt
|
# Telemetry prompt
|
||||||
# LOCALIZATION NOTE (telemetryOptInPrompt): %1$S will be replaced by
|
# LOCALIZATION NOTE (telemetryOptInPrompt): %1$S will be replaced by
|
||||||
|
|
Загрузка…
Ссылка в новой задаче