Changeset 471
- Timestamp:
- 2007-07-05 16:04:30 (2 years ago)
- Files:
-
- trunk/chrome/content/privacy/overlaySanitizeUI.xul (modified) (2 diffs)
- trunk/chrome/locale/en-US/sanitize.properties (modified) (1 diff)
- trunk/components/privacycontrol.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/chrome/content/privacy/overlaySanitizeUI.xul
r453 r471 39 39 40 40 <overlay id="dta" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 41 <script type="application/javascript;version=1.7" src="chrome://dta/content/common/internalFunctions.js" />42 41 <script type="application/x-javascript"><![CDATA[ 43 44 var _str = Components.classes['@mozilla.org/intl/stringbundle;1'] 45 .getService(Components.interfaces.nsIStringBundleService) 46 .createBundle('chrome://dta/locale/sanitize.properties'); 42 function dtaInit() { 43 var msg = Components.classes['@mozilla.org/intl/stringbundle;1'] 44 .getService(Components.interfaces.nsIStringBundleService) 45 .createBundle('chrome://dta/locale/sanitize.properties') 46 .GetStringFromName('sanitizeitem'); 47 47 48 function getString(n) {49 try {50 return this._str.GetStringFromName(n);51 } catch (ex) {52 DTA_debug.dump("locale error: " + n, ex);53 return '<error>';54 }55 }56 57 function dtaInit() {58 48 // looks nasty. I know :p 59 49 // but the pref-window does not provide an id for preferences. … … 74 64 75 65 var check = document.createElement('checkbox'); 76 check.setAttribute('label', 'DownThemAll! ' + getString('history'));66 check.setAttribute('label', msg); 77 67 check.setAttribute('preference', 'privacy.item.extensions-dta'); 78 68 trunk/chrome/locale/en-US/sanitize.properties
r453 r471 1 history=history 1 sanitizeitem=DownThemAll! history & queue trunk/components/privacycontrol.js
r170 r471 128 128 .getService(Components.interfaces.nsIPrefService) 129 129 .getBranch('extensions.dta.'); 130 ['directory', 'filter', 'renaming'].forEach(function(e) { prefs.clearUserPref(e); }); 130 ['directory', 'filter', 'renaming'].forEach( 131 function(e) { 132 try { 133 prefs.clearUserPref(e); 134 } 135 catch (ex) {} 136 } 137 ); 131 138 132 139 try { … … 134 141 .getService(Components.interfaces.nsIProperties) 135 142 .get("ProfD", Components.interfaces.nsIFile); 136 ['dta_history.xml', 'dta_log.txt' ].forEach(137 function (e) {143 ['dta_history.xml', 'dta_log.txt', 'dta_queue.sqlite'].forEach( 144 function(e) { 138 145 try { 139 146 var file = prof.clone(); 140 147 file.append(e); 141 148 if (file.exists()) { 142 file.remove( );149 file.remove(false); 143 150 } 144 151 } catch (ex) { 145 152 this.log('cannot remove ' + e); 146 153 } 147 } 154 }, 155 this 148 156 ); 149 157 } 150 158 catch (oex) { 151 this.log('failed to clean files ');159 this.log('failed to clean files: ' + oex); 152 160 } 153 161 },
