Bug 395862: About dialog broken. r=gavin.sharp, a=beltzner

This commit is contained in:
dtownsend@oxymoronical.com 2007-09-12 07:16:32 -07:00
parent f744e3e947
commit 1cfc5a9146

View File

@ -42,22 +42,26 @@ function init(aEvent)
if (aEvent.target != document)
return;
var prefSvc = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefService);
var prefs = prefSvc.getBranch(null);
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var distroId = prefs.getCharPref("distribution.id");
if (distroId) {
var distroVersion = prefs.getCharPref("distribution.version");
var distroAbout = prefs.getComplexValue("distribution.about", Ci.nsISupportsString);
try {
var distroId = prefs.getCharPref("distribution.id");
if (distroId) {
var distroVersion = prefs.getCharPref("distribution.version");
var distroAbout = prefs.getComplexValue("distribution.about", Ci.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";
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";
}
}
catch (e) {
// Pref is unset
}
var userAgentField = document.getElementById("userAgent");