Lino Website

code changes


Monday, 14. March 2005 18:29.

BaseJob has now a refresh() method. Job.status() and Job.increment() call this automatically. But a Task must call it if it wants to refresh the display without calling increment().

Example is Synchronizer who calls this now when deleting files on the target. If there are many files being deleted, then the status bar didn't show the increasing number of files. Now it does. Here is a screenshot:

Lösche Datei c:\temp\2\ANA.MSK
Lösche Datei c:\temp\2\ANA.QRY
Lösche Datei c:\temp\2\ANA1.NTX
Lösche Datei c:\temp\2\ANA2.NTX
Lösche Datei c:\temp\2\ANACTA.MSK
Lösche Datei c:\temp\2\ANAMVA.MSK
Lösche Datei c:\temp\2\ANAPICK.QRY
[/] 0 belassen, 0+0 kopieren, 79 löschen 0 Warnungen. 0 Fehler.

Note: Why cann't Synchonizer simply call increment() for each deleted file? Because the target files to be deleted don't count for the job's progress value. If sync is called with --progress and there are many files on the target to be deleted, then the percent indicator remains on [ 0%] as long as files are being deleted. To have it increase already there, sync would have to scan the target tree, too, before starting to work. No, that's too much, and anyway I'm hoping for inspiration about the showProgress option for sync (14.03.05)

Copyright 2001-2007 Luc Saffre.
Generated 2007-06-07 16:22:23