Revision: 4446
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4446&view=rev
Author:   hofman
Date:     2008-08-25 18:04:26 +0000 (Mon, 25 Aug 2008)

Log Message:
-----------
Just remove all progress indicator from downloads table and reload when 
adding/removing a download.

Modified Paths:
--------------
    trunk/SKDownloadController.m

Modified: trunk/SKDownloadController.m
===================================================================
--- trunk/SKDownloadController.m        2008-08-25 16:56:40 UTC (rev 4445)
+++ trunk/SKDownloadController.m        2008-08-25 18:04:26 UTC (rev 4446)
@@ -104,16 +104,6 @@
     }
 }
 
-- (void)removeInvisibleProgressIndicators {
-    NSRect visibleRect = [tableView visibleRect];
-    int i = [self countOfDownloads];
-    while (i-- > 0) {
-        NSProgressIndicator *progressIndicator = [[self 
objectInDownloadsAtIndex:i] progressIndicator];
-        if ([progressIndicator superview] && NO == NSIntersectsRect([tableView 
rectOfRow:i], visibleRect))
-            [progressIndicator removeFromSuperview];
-    }
-}
-
 #pragma mark Accessors
 
 - (NSArray *)downloads {
@@ -130,7 +120,8 @@
 
 - (void)insertObject:(id)obj inDownloadsAtIndex:(unsigned)anIndex {
     [downloads insertObject:obj atIndex:anIndex];
-    [self removeInvisibleProgressIndicators];
+    [downloads 
makeObjectsPerformSelector:@selector(removeProgressIndicatorFromSuperview)];
+    [tableView reloadData];
 }
 
 - (void)removeObjectFromDownloadsAtIndex:(unsigned)anIndex {
@@ -138,7 +129,8 @@
     [download setDelegate:nil];
     [download cancelDownload];
     [downloads removeObjectAtIndex:anIndex];
-    [self removeInvisibleProgressIndicators];
+    [downloads 
makeObjectsPerformSelector:@selector(removeProgressIndicatorFromSuperview)];
+    [tableView reloadData];
 }
 
 #pragma mark Actions


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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to