Back out 08a1e103ec0d and efeaf7b68f58 (bug 716643, bug 741738) because of test failures

This commit is contained in:
Matt Brubeck 2012-07-24 12:09:06 -07:00
Родитель 67460fb16d
Коммит 6d50a3115d
2 изменённых файлов: 8 добавлений и 52 удалений

Просмотреть файл

@ -1353,34 +1353,16 @@
<field name="_brandBundle" readonly="true">
Services.strings.createBundle("chrome://branding/locale/brand.properties");
</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">
<getter><![CDATA[
return this._viewsLeftMap[this._notificationType] || 5;
try {
return Services.prefs.getIntPref("browser.syncPromoViewsLeft");
} catch(ex) {}
return 5;
]]></getter>
<setter><![CDATA[
let map = this._viewsLeftMap;
map[this._notificationType] = val;
Services.prefs.setCharPref("browser.syncPromoViewsLeftMap",
JSON.stringify(map));
Services.prefs.setIntPref("browser.syncPromoViewsLeft", val);
return val;
]]></setter>
</property>
<property name="_notificationType">
@ -1393,12 +1375,6 @@
return "passwords";
if (type == "editBookmarkPanel")
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;
]]></getter>
</property>
@ -1410,14 +1386,6 @@
);
]]></getter>
</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">
<body><![CDATA[
this._viewsLeft = 0;
@ -1448,8 +1416,7 @@
let viewsLeft = this._viewsLeft;
if (viewsLeft) {
if (Services.prefs.prefHasUserValue("services.sync.username") &&
this._notificationType != "addons-sync-disabled") {
if (Services.prefs.prefHasUserValue("services.sync.username")) {
// If the user has already setup Sync, don't show the notification.
this._viewsLeft = 0;
// Be sure to hide the panel, in case it was visible and the user
@ -1462,7 +1429,7 @@
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.hidden = false;

Просмотреть файл

@ -340,17 +340,6 @@ syncPromoNotification.bookmarks.description=You can access your bookmarks on all
# 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.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
# LOCALIZATION NOTE (telemetryOptInPrompt): %1$S will be replaced by