49 Components.utils.import(
"resource://app/jsmodules/DOMUtils.jsm");
50 Components.utils.import(
"resource://app/jsmodules/WindowUtils.jsm");
67 this._widget = aWidget;
84 _domEventListenerSet:
null,
85 _wizardPageElem:
null,
98 initialize:
function firstRunConnectionSvc_initialize() {
100 this._wizardPageElem = this._widget.parentNode;
105 var func =
function(aEvent) {
return _this._doPageAdvanced(aEvent); };
106 this._domEventListenerSet.add(this._wizardPageElem,
117 finalize:
function firstRunConnectionSvc_finalize() {
119 if (this._domEventListenerSet) {
120 this._domEventListenerSet.removeAll();
122 this._domEventListenerSet =
null;
126 this._wizardPageElem =
null;
142 doCommand:
function firstRunConnectionSvc_doCommand(aEvent) {
144 var action = aEvent.target.getAttribute(
"action");
146 case "doConnectionSettings" :
147 this._doConnectionSettings();
162 _doPageAdvanced:
function firstRunConnectionSvc__doPageAdvanced(aEvent) {
167 firstRunWizard.wizardElem.rewind();
170 aEvent.preventDefault();
186 _doConnectionSettings:
187 function firstRunConnectionSvc__doConnectionSettings() {
189 var prefService =
Cc[
"@mozilla.org/preferences-service;1"]
190 .getService(
Ci.nsIPrefService);
191 prefService = prefService.QueryInterface(
Ci.nsIPrefBranch);
198 var prevInstantApply =
199 prefService.getBoolPref(
"browser.preferences.instantApply");
200 prefService.setBoolPref(
"browser.preferences.instantApply",
true);
203 var accepted = WindowUtils.openModalDialog
205 "chrome://browser/content/preferences/connection.xul",
207 "chrome,modal=yes,centerscreen",
212 prefService.setBoolPref(
"browser.preferences.instantApply",
216 prefService.savePrefFile(
null);
222 var
event = document.createEvent(
"Events");
223 event.initEvent(
"firstRunConnectionReset",
true,
true);
224 this._widget.dispatchEvent(
event);
227 firstRunWizard.wizardElem.advance();
function DOMEventListenerSet()
DataRemote prototype constructor
function firstRunConnectionSvc(aWidget)