Changeset d1f668 for chrome/content/v_identity/vI_identityData.js
- Timestamp:
- Oct 2, 2009, 1:20:09 PM (13 years ago)
- Branches:
- lite_0.1, multiEdit, ng_0.6, ng_0.6_help, ng_0.8, ng_0.9
- Children:
- 77bb12
- Parents:
- bdfae4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chrome/content/v_identity/vI_identityData.js
rbdfae4 rd1f668 228 228 }; 229 229 230 const DEFAULT_SMTP_TAG = "vI_useDefaultSMTP" 231 const NO_SMTP_TAG = "vI_noStoredSMTP" 232 230 233 function smtpObj(key) { 231 234 this._key = key; … … 238 241 239 242 set key(key) { this._key = key; this._value = null; }, 240 get key() { if (this._value == null) var dummy = this.value; return this._key }, 243 get key() { 244 var dummy = this.value; // just to be sure key is adapted if SMTP is not available 245 return this._key 246 }, 247 get keyNice() { // the same as key but with "" for DEFAULT_SMTP_TAG 248 if (this.key == DEFAULT_SMTP_TAG) return ""; // this is the key used for default server 249 return this.key 250 }, 241 251 get value() { 242 252 if (this._value == null) { 243 253 this._value = ""; 244 // if key == null, it is not known / if it is "" it's the Default SMTP 245 if (this._key == "") this._value = this.DEFAULT_TAG; 254 if (this._key == null || this._key == "") this._key = DEFAULT_SMTP_TAG; 255 if (this._key == DEFAULT_SMTP_TAG) this._value = this.DEFAULT_TAG; 256 else if (!this._key) this._value = null; 246 257 else if (this._key) { 247 258 var servers = Components.classes["@mozilla.org/messengercompose/smtp;1"] … … 265 276 } 266 277 } 267 if (!this._value) this._key = null; // if non-existant SMTP handle like non available278 if (!this._value) this._key = NO_SMTP_TAG; // if non-existant SMTP handle like non available 268 279 } 269 280 } … … 273 284 if (this.key == null || compareSmtpObj.key == null) return true; 274 285 return (this.key == compareSmtpObj.key); 286 }, 287 hasNoDefinedSMTP : function() { 288 return (this.key == NO_SMTP_TAG); 275 289 } 276 290 }
Note: See TracChangeset
for help on using the changeset viewer.