Changeset 871
- Timestamp:
- 2008-03-12 00:00:30 (10 months ago)
- Files:
-
- trunk/chrome/content/common/internalFunctions.js (modified) (1 diff)
- trunk/chrome/content/common/overlayFunctions.js (modified) (1 diff)
- trunk/chrome/content/dta/manager/sessionmanager.js (modified) (1 diff)
- trunk/chrome/content/preferences/prefs.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/chrome/content/common/internalFunctions.js
r853 r871 59 59 60 60 61 const SYSTEMSLASH = (DTA_ profileFile.get('dummy').path.indexOf('/') != -1) ? '/' : '\\';61 const SYSTEMSLASH = (DTA_getProfileFile('dummy').path.indexOf('/') != -1) ? '/' : '\\'; 62 62 63 63 // shared state defines trunk/chrome/content/common/overlayFunctions.js
r860 r871 165 165 .QueryInterface(Components.interfaces.nsIPrefBranch2) 166 166 .addObserver(branch, obj, true); 167 } 168 }; 169 170 var DTA_profileFile = { 171 _ds : Components.classes["@mozilla.org/file/directory_service;1"] 172 .getService(Components.interfaces.nsIProperties), 173 174 get: function PF_get(fileName) { 175 var file = this._ds.get("ProfD", Components.interfaces.nsIFile) 167 }, 168 removeObserver: function DP_removeObserver(branch, obj) { 169 this._pref 170 .QueryInterface(Components.interfaces.nsIPrefBranch2) 171 .removeObserver(branch, obj); 172 } 173 }; 174 175 function DTA_getProfileFile(fileName) { 176 var _profile = Components.classes["@mozilla.org/file/directory_service;1"] 177 .getService(Components.interfaces.nsIProperties) 178 .get("ProfD", Components.interfaces.nsIFile); 179 DTA_getProfileFile = function(fileName) { 180 var file = _profile.clone(); 176 181 file.append(fileName); 177 182 return file; 178 } 179 }; 183 }; 184 return DTA_getProfileFile(fileName); 185 } 186 180 187 var DTA_debug = Components.classes['@downthemall.net/debug-service;1'] 181 188 .getService(Components.interfaces.dtaIDebugService); trunk/chrome/content/dta/manager/sessionmanager.js
r867 r871 45 45 init: function() { 46 46 this._con = Serv('@mozilla.org/storage/service;1', 'mozIStorageService') 47 .openDatabase(DTA_ profileFile.get(DB_FILE));47 .openDatabase(DTA_getProfileFile(DB_FILE)); 48 48 try { 49 49 if (('schemaVersion' in this._con) && this._con.schemaVersion != DB_VERSION) { trunk/chrome/content/preferences/prefs.js
r829 r871 56 56 load: function PP_load() { 57 57 try { 58 var log = !DTA_ profileFile.get('dta_log.txt').exists();58 var log = !DTA_getProfileFile('dta_log.txt').exists(); 59 59 $("butShowLog", 'butDelLog', 'butRevealLog') 60 60 .forEach(function(e) { e.disabled = log; });
