MessageManager.loadBrands Member

Syntax

object.loadBrands();

Returns

Remarks

See Also

Source Code

function mm_loadbrands()
{
var entities = this.entities;
var app = getService("@mozilla.org/xre/app-info;1", "nsIXULAppInfo");
if (app)
{
// Use App info if possible
entities.brandShortName = app.name;
entities.brandFullName = app.name + " " + app.version;
entities.brandVendorName = app.vendor;
return;
}
var brandBundle;
var path = "chrome://branding/locale/brand.properties";
try
{
brandBundle = this.addBundle(path);
}
catch (exception)
{
// May be an older mozilla version, try another location.
path = "chrome://global/locale/brand.properties";
brandBundle = this.addBundle(path);
}
entities.brandShortName = brandBundle.GetStringFromName("brandShortName");
entities.brandVendorName = brandBundle.GetStringFromName("vendorShortName");
// Not all versions of Suite / Fx have this defined; Cope:
try
{
entities.brandFullName = brandBundle.GetStringFromName("brandFullName");
}
catch(exception)
{
entities.brandFullName = entities.brandShortName;
}
// Remove all of this junk, or it will be the default bundle for getMsg...
this.bundleList.pop();
}