Created accounts are saved. Saved accounts are loaded automatically at startup. It is possible to delete an account. The accounts are stored in the preferences, under a messenger.account. branch. The list of accounts is in the preference messenger.accounts

This commit is contained in:
Florian Quèze 2007-08-13 00:47:06 +02:00
Родитель 4407789cc2
Коммит eba2be2651
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -4,3 +4,5 @@ pref("accessibility.browsewithcaret", true);
pref("javascript.options.showInConsole", true);
pref("javascript.options.strict", true);
pref("messenger.accounts", "");

Просмотреть файл

@ -82,11 +82,13 @@ var account = {
getValue: function account_getValue(aId) {
var elt = document.getElementById(aId);
if ("checked" in elt)
return elt.checked;
return elt.value;
},
create: function account_create() {
var acc = this.pcs.createAccount(this.getValue("name"), this.proto);
var acc = this.pcs.createAccount(this.getValue("name"), this.proto.id);
acc.password = this.getValue("password");
var opts = this.proto.getOptions();
@ -112,7 +114,7 @@ var account = {
throw "unknown preference type " + opt.type;
}
}
acc.save();
acc.connect();
}
};