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

Log Message:
-----------
simplify method names for download management

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

Modified: trunk/SKDownload.h
===================================================================
--- trunk/SKDownload.h  2008-08-25 18:04:26 UTC (rev 4446)
+++ trunk/SKDownload.h  2008-08-25 18:35:10 UTC (rev 4447)
@@ -84,10 +84,10 @@
 
 - (NSDictionary *)info;
 
-- (void)startDownload;
-- (void)cancelDownload;
-- (void)resumeDownload;
-- (void)cleanupDownload;
+- (void)start;
+- (void)cancel;
+- (void)resume;
+- (void)cleanup;
 
 - (BOOL)canCancel;
 - (BOOL)canResume;

Modified: trunk/SKDownload.m
===================================================================
--- trunk/SKDownload.m  2008-08-25 18:04:26 UTC (rev 4446)
+++ trunk/SKDownload.m  2008-08-25 18:35:10 UTC (rev 4447)
@@ -93,7 +93,7 @@
 
 - (void)dealloc {
     [[NSNotificationCenter defaultCenter] removeObserver:self];
-    [self cancelDownload];
+    [self cancel];
     [URL release];
     [URLDownload release];
     [filePath release];
@@ -103,7 +103,7 @@
 }
 
 - (void)handleApplicationWillTerminateNotification:(NSNotification 
*)notification {
-    [self cancelDownload];
+    [self cancel];
 }
 
 #pragma mark Accessors
@@ -230,7 +230,7 @@
 
 #pragma mark Actions
 
-- (void)startDownload {
+- (void)start {
     if (URLDownload || URL == nil) {
         NSBeep();
         return;
@@ -245,7 +245,7 @@
         [delegate downloadDidUpdate:self];
 }
 
-- (void)cancelDownload {
+- (void)cancel {
     if ([self canCancel]) {
         
         [URLDownload cancel];
@@ -255,7 +255,7 @@
     }
 }
 
-- (void)resumeDownload {
+- (void)resume {
     if ([self canResume]) {
         
         NSData *resumeData = nil;
@@ -273,18 +273,18 @@
             
         } else {
             
-            [self cleanupDownload];
+            [self cleanup];
             [self setFilePath:nil];
             [URLDownload release];
             URLDownload = nil;
-            [self startDownload];
+            [self start];
             
         }
     }
 }
 
-- (void)cleanupDownload {
-    [self cancelDownload];
+- (void)cleanup {
+    [self cancel];
     if (filePath)
         [[NSFileManager defaultManager] removeFileAtPath:[filePath 
stringByDeletingLastPathComponent] handler:nil];
 }

Modified: trunk/SKDownloadController.m
===================================================================
--- trunk/SKDownloadController.m        2008-08-25 18:04:26 UTC (rev 4446)
+++ trunk/SKDownloadController.m        2008-08-25 18:35:10 UTC (rev 4447)
@@ -98,7 +98,7 @@
         SKDownload *download = [[[SKDownload alloc] initWithURL:aURL 
delegate:self] autorelease];
         int row = [self countOfDownloads];
         [[self mutableArrayValueForKey:@"downloads"] addObject:download];
-        [download startDownload];
+        [download start];
         [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] 
byExtendingSelection:NO];
         [tableView scrollRowToVisible:row];
     }
@@ -127,7 +127,7 @@
 - (void)removeObjectFromDownloadsAtIndex:(unsigned)anIndex {
     SKDownload *download = [downloads objectAtIndex:anIndex];
     [download setDelegate:nil];
-    [download cancelDownload];
+    [download cancel];
     [downloads removeObjectAtIndex:anIndex];
     [downloads 
makeObjectsPerformSelector:@selector(removeProgressIndicatorFromSuperview)];
     [tableView reloadData];
@@ -154,7 +154,7 @@
             download = [self objectInDownloadsAtIndex:row];
     }
     if (download && [download status] == SKDownloadStatusDownloading)
-        [download cancelDownload];
+        [download cancel];
 }
 
 - (IBAction)resumeDownload:(id)sender {
@@ -166,7 +166,7 @@
             download = [self objectInDownloadsAtIndex:row];
     }
     if (download && [download status] == SKDownloadStatusCanceled)
-        [download resumeDownload];
+        [download resume];
 }
 
 - (IBAction)removeDownload:(id)sender {
@@ -355,7 +355,7 @@
     SKDownload *download = [self objectInDownloadsAtIndex:row];
     
     if ([download canCancel])
-        [download cancelDownload];
+        [download cancel];
     else
         [self removeObjectFromDownloadsAtIndex:row];
 }


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