Wallpaper fix - Bug 895473 - [Mac and Linux] Custom distribution settings for yahoo de and es distributions are not being set. r=mconnor

This commit is contained in:
Robert Strong 2013-07-19 13:17:29 -07:00
parent bfc4a56912
commit bf86f18bbe
2 changed files with 19 additions and 12 deletions

View File

@ -16,20 +16,22 @@ function init(aEvent)
var distroId = Services.prefs.getCharPref("distribution.id");
if (distroId) {
var distroVersion = Services.prefs.getCharPref("distribution.version");
var distroAbout = Services.prefs.getComplexValue("distribution.about",
Components.interfaces.nsISupportsString);
var distroField = document.getElementById("distribution");
distroField.value = distroAbout;
distroField.style.display = "block";
var distroIdField = document.getElementById("distributionId");
distroIdField.value = distroId + " - " + distroVersion;
distroIdField.style.display = "block";
// This must be set last because it might not exist due to bug 895473.
var distroAbout = Services.prefs.getComplexValue("distribution.about",
Components.interfaces.nsISupportsString);
var distroField = document.getElementById("distribution");
distroField.value = distroAbout;
distroField.style.display = "block";
}
}
catch (e) {
// Pref is unset
Components.utils.reportError(e);
}
// Include the build ID and display warning if this is an "a#" (nightly or aurora) build

View File

@ -273,13 +273,18 @@ DistributionCustomizer.prototype = {
let partnerAbout = Cc["@mozilla.org/supports-string;1"].
createInstance(Ci.nsISupportsString);
if (globalPrefs["about." + this._locale]) {
partnerAbout.data = this._ini.getString("Global", "about." + this._locale);
} else {
partnerAbout.data = this._ini.getString("Global", "about");
try {
if (globalPrefs["about." + this._locale]) {
partnerAbout.data = this._ini.getString("Global", "about." + this._locale);
} else {
partnerAbout.data = this._ini.getString("Global", "about");
}
defaults.setComplexValue("distribution.about",
Ci.nsISupportsString, partnerAbout);
} catch (e) {
/* ignore bad prefs due to bug 895473 and move on */
Cu.reportError(e);
}
defaults.setComplexValue("distribution.about",
Ci.nsISupportsString, partnerAbout);
if (sections["Preferences"]) {
for (let key in enumerate(this._ini.getKeys("Preferences"))) {