Revision: 24017
          http://sourceforge.net/p/bibdesk/svn/24017
Author:   hofman
Date:     2019-07-13 21:21:25 +0000 (Sat, 13 Jul 2019)
Log Message:
-----------
reset progress indicators rather than just remove them

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h      2019-07-13 
21:15:52 UTC (rev 24016)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h      2019-07-13 
21:21:25 UTC (rev 24017)
@@ -500,10 +500,10 @@
  @param anIndex The index for the icon.  */
 - (void)removeProgressIndicatorForURL:(NSURL *)aURL 
atIndex:(NSUInteger)anIndex;
 
-/** Removes all progress indicators.
+/** Resets all progress indicators for the inernal downloads.
  
- This can be used when the delegate handles downloads and the progress 
indicators need to be reset. */
-- (void)removeAllProgressIndicators;
+ When the delegate handles downloads, it is responsible for adding back its 
progress indicators. */
+- (void)resetProgressIndicators;
 
 @end
 

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2019-07-13 
21:15:52 UTC (rev 24016)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2019-07-13 
21:21:25 UTC (rev 24017)
@@ -4216,12 +4216,17 @@
         [self _setNeedsDisplayForIconInRow:r column:c];
 }
 
-- (void)removeAllProgressIndicators {
+- (void)resetProgressIndicators {
     if ([_progressIndicators count] > 0) {
         [_progressIndicators removeAllObjects];
         [self _invalidateProgressTimer];
         [self setNeedsDisplay:YES];
     }
+    NSEnumerator *dlEnum = [_downloads objectEnumerator];
+    FVDownload *download;
+    while ((download = [dlEnum nextObject])) {
+        [self updateProgressIndicator:[download currentProgress] 
forURL:[download downloadURL] atIndex:[download indexInView]];
+    }
 }
 
 #pragma mark Quick Look support

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to