The Trunk: Monticello-kb.545.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Monticello-kb.545.mcz

commits-2
Balázs Kósi uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-kb.545.mcz

==================== Summary ====================

Name: Monticello-kb.545
Author: kb
Time: 24 May 2013, 8:33:43.455 pm
UUID: 81e08811-7e69-44b9-841d-280d241aa01d
Ancestors: Monticello-fbs.544

MCHttpRepository displays a progress bar, when downloading files from the internet. Before this change the progressbar only appeard after the response started to arrive. Setting the progressbar value to 0 before executing the workBlock displays it immediately, providing better feedback to the user.

=============== Diff against Monticello-fbs.544 ===============

Item was changed:
  ----- Method: MCHttpRepository>>displayProgress:during: (in category 'required') -----
  displayProgress: label during: workBlock
  | nextUpdateTime |
  nextUpdateTime := 0.
  ^label displayProgressFrom: 0.0 to: 1.0 during:[:bar|
+ bar value: 0.0.
+ workBlock on: HTTPProgress do:[:ex|
+ (ex total == nil or:[ex amount == nil]) ifFalse:[
+ (nextUpdateTime < Time millisecondClockValue
+ or:[ex total = ex amount]) ifTrue:[
+ bar value: ex amount asFloat / ex total asFloat.
+ nextUpdateTime := Time millisecondClockValue + 100.
- workBlock on: HTTPProgress do:[:ex|
- (ex total == nil or:[ex amount == nil]) ifFalse:[
- (nextUpdateTime < Time millisecondClockValue
- or:[ex total = ex amount]) ifTrue:[
- bar value: ex amount asFloat / ex total asFloat.
- nextUpdateTime := Time millisecondClockValue + 100.
- ].
  ].
+ ].
+ ex resume.
+ ]
+ ].
- ex resume.
- ]
- ].
  !