Skip to content

Commit

Permalink
Added progress bar while loading thumbnails.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Luc Paour committed Aug 18, 2002
1 parent 58dc898 commit 58c336b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion com/gallery/GalleryRemote/ThumbnailCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,23 @@ public ThumbnailCache( MainFrame mf ) {
* Main processing method for the ThumbnailLoader object
*/
public void run() {
int loaded = 0;
mf.startProgress(0, toLoad.size(), "Loading thumbnails");
//Log.log(Log.TRACE, MODULE, "Starting " + iFilename);
while ( !toLoad.isEmpty() ) {
String filename = (String) toLoad.pop();

if ( thumbnails.get( filename ) == null ) {
loadThumbnail( filename );


loaded++;
mf.updateProgressValue(loaded, loaded + toLoad.size());
mf.thumbnailLoadedNotify();
}
}
stillRunning = false;

mf.stopProgress("Thumbnails loaded");

//Log.log(Log.TRACE, MODULE, "Ending");
}
Expand Down

0 comments on commit 58c336b

Please sign in to comment.