Changeset 971
- Timestamp:
- 2008-06-05 02:31:46 (2 years ago)
- Files:
-
- trunk/chrome/content/dta/manager.js (modified) (7 diffs)
- trunk/chrome/locale/en-US/manager.properties (modified) (1 diff)
- trunk/chrome/skin/manager/style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/chrome/content/dta/manager.js
r969 r971 90 90 ], 91 91 _initialized: false, 92 _offline: false, 93 get offline() { 94 return this._offline; 95 }, 96 set offline(nv) { 97 this._offline = !!nv; 98 let de = $('downloads'); 99 100 if (this._offline) { 101 de.setAttribute('offline', true); 102 } 103 else if (de.hasAttribute('offline')) { 104 de.removeAttribute('offline'); 105 } 106 Tree.invalidate(); 107 }, 92 108 _wasRunning: false, 93 109 _lastTime: Utils.getTimestamp(), … … 98 114 init: function D_init() { 99 115 Tree.init($("downloads")); 116 SessionManager.init(); 117 118 try { 119 let ios2 = Serv('@mozilla.org/network/io-service;1', 'nsIIOService2'); 120 this.offline = ios2.offline; 121 } 122 catch (ex) { 123 Debug.log("Cannot get offline status", ex); 124 } 125 100 126 makeObserver(this); 101 102 127 this._observes.forEach( 103 128 function(topic) { … … 106 131 this 107 132 ); 108 133 109 134 document.getElementById("dtaHelp").hidden = !("openHelp" in window); 110 135 111 SessionManager.init();112 136 113 137 if ("arguments" in window) { … … 143 167 } 144 168 else if (topic == 'network:offline-status-changed') { 145 169 this.offline = data == "offline"; 146 170 } 147 171 }, … … 256 280 this.refresh(); 257 281 258 if (Prefs.autoClearComplete && this._autoClears.length) {259 Tree.remove(this._autoClears);260 this._autoClears = [];261 }262 263 if (Prefs.autoRetryInterval) {264 for (let d in Tree.all) {265 d.autoRetry();266 }267 }268 269 282 this._running.forEach( 270 283 function(i) { … … 284 297 } 285 298 ) 286 this.startNext(); 299 300 if (Prefs.autoClearComplete && this._autoClears.length) { 301 Tree.remove(this._autoClears); 302 this._autoClears = []; 303 } 304 305 if (!this._offline) { 306 if (Prefs.autoRetryInterval) { 307 for (let d in Tree.all) { 308 d.autoRetry(); 309 } 310 } 311 this.startNext(); 312 } 287 313 } 288 314 catch(ex) { … … 1123 1149 _status : '', 1124 1150 get status() { 1151 if (Dialog.offline && this.is(QUEUED, PAUSED)) { 1152 return _('offline'); 1153 } 1125 1154 return this._status + (this._autoRetryTime ? ' *' : ''); 1126 1155 }, trunk/chrome/locale/en-US/manager.properties
r892 r971 12 12 paused=Paused 13 13 inqueue=Waiting 14 offline=Offline 14 15 decompress=Decompressing... 15 16 prettyhash=%S [%S] trunk/chrome/skin/manager/style.css
r969 r971 144 144 } 145 145 146 #downloads[offline] { 147 color: gray !important; 148 } 149 146 150 treechildren::-moz-tree-progressmeter(completed) { 147 151 color: #008F00 !important;
