Revision: 2709
http://skim-app.svn.sourceforge.net/skim-app/?rev=2709&view=rev
Author: hofman
Date: 2007-08-23 01:51:51 -0700 (Thu, 23 Aug 2007)
Log Message:
-----------
implement delete for downloads table.
Modified Paths:
--------------
trunk/SKDownloadController.m
Modified: trunk/SKDownloadController.m
===================================================================
--- trunk/SKDownloadController.m 2007-08-22 23:42:16 UTC (rev 2708)
+++ trunk/SKDownloadController.m 2007-08-23 08:51:51 UTC (rev 2709)
@@ -306,6 +306,24 @@
return toolTip;
}
+- (void)tableView:(NSTableView *)aTableView deleteRowsWithIndexes:(NSIndexSet
*)rowIndexes {
+ unsigned int row = [rowIndexes firstIndex];
+ SKDownload *download = [downloads objectAtIndex:row];
+
+ if ([download canCancel]) {
+ [download cancelDownload];
+ } else {
+ [download cleanupDownload];
+ [downloads removeObjectAtIndex:row];
+ [self reloadTableView];
+ [self updateButtons];
+ }
+}
+
+- (BOOL)tableView:(NSTableView *)aTableView
canDeleteRowsWithIndexes:(NSIndexSet *)rowIndexes {
+ return YES;
+}
+
#pragma mark SKTypeSelectHelper datasource protocol
- (NSArray *)typeSelectHelperSelectionItems:(SKTypeSelectHelper
*)typeSelectHelper {
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: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit