Changeset 471

Show
Ignore:
Timestamp:
2007-07-05 16:04:30 (2 years ago)
Author:
MaierMan
Message:

overlay should not include internalFunctions.js
fixing privacycontrol
rewording

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/chrome/content/privacy/overlaySanitizeUI.xul

    r453 r471  
    3939   
    4040<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" /> 
    4241        <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'); 
    4747 
    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() { 
    5848                        // looks nasty. I know :p 
    5949                        // but the pref-window does not provide an id for preferences. 
     
    7464                                 
    7565                                var check = document.createElement('checkbox'); 
    76                                 check.setAttribute('label', 'DownThemAll! ' + getString('history')); 
     66                                check.setAttribute('label', msg); 
    7767                                check.setAttribute('preference', 'privacy.item.extensions-dta'); 
    7868                                 
  • trunk/chrome/locale/en-US/sanitize.properties

    r453 r471  
    1 history=history 
     1sanitizeitem=DownThemAll! history & queue 
  • trunk/components/privacycontrol.js

    r170 r471  
    128128      .getService(Components.interfaces.nsIPrefService) 
    129129      .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                ); 
    131138 
    132139                try { 
     
    134141                                .getService(Components.interfaces.nsIProperties) 
    135142                                .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) { 
    138145                                        try { 
    139146                                                var file = prof.clone(); 
    140147                                                file.append(e); 
    141148                                                if (file.exists()) { 
    142                                                         file.remove(); 
     149                                                        file.remove(false); 
    143150                                                } 
    144151                                        } catch (ex) { 
    145152                                                this.log('cannot remove ' + e); 
    146153                                        } 
    147                                 } 
     154                                }, 
     155                                this 
    148156                        ); 
    149157                } 
    150158                catch (oex) { 
    151                         this.log('failed to clean files'); 
     159                        this.log('failed to clean files: ' + oex); 
    152160                } 
    153161  },