Bug 849604 - Metro Settings charm is not populated if opened to early [r=bbondy]

This commit is contained in:
Matt Brubeck 2013-03-13 11:56:27 -07:00
parent 3dff83cb90
commit a020be32fb

View File

@ -105,6 +105,7 @@ var BrowserUI = {
}
FlyoutPanelsUI.init();
PageThumbs.init();
SettingsCharm.init();
// show the right toolbars, awesomescreen, etc for the os viewstate
BrowserUI._adjustDOMforViewState();
@ -155,11 +156,6 @@ var BrowserUI = {
Util.dumpLn("Exception in delay load module:", ex.message);
}
try {
SettingsCharm.init();
} catch (ex) {
}
try {
// XXX This is currently failing
CapturePickerUI.init();
@ -1734,8 +1730,13 @@ var SettingsCharm = {
* and an "onselected" property (function to be called when the user chooses this entry)
*/
addEntry: function addEntry(aEntry) {
let id = MetroUtils.addSettingsPanelEntry(aEntry.label);
this._entries.set(id, aEntry);
try {
let id = MetroUtils.addSettingsPanelEntry(aEntry.label);
this._entries.set(id, aEntry);
} catch (e) {
// addSettingsPanelEntry does not work on non-Metro platforms
Cu.reportError(e);
}
},
init: function SettingsCharm_init() {