track local client data changes so we can upload it as necessary

This commit is contained in:
Dan Mills 2009-02-26 15:06:57 -08:00
parent 50621a1889
commit 7cdfbeed20

View File

@ -69,6 +69,7 @@ ClientEngine.prototype = {
_ClientEngine_init: function ClientEngine__init() {
this._init();
Utils.prefs.addObserver("", this, false);
},
// get and set info for clients
@ -113,7 +114,20 @@ ClientEngine.prototype = {
set clientName(value) { Svc.Prefs.set("client.name", value); },
get clientType() { return Svc.Prefs.get("client.type", "desktop"); },
set clientType(value) { Svc.Prefs.set("client.type", value); }
set clientType(value) { Svc.Prefs.set("client.type", value); },
observe: function ClientEngine_observe() {
switch (topic) {
case "nsPref:changed":
switch (data) {
case "client.name":
case "client.type":
this._tracker.addChangedID(this.clientID);
break;
}
break;
}
}
};
function ClientStore() {