Revision: 7263
http://skim-app.svn.sourceforge.net/skim-app/?rev=7263&view=rev
Author: hofman
Date: 2011-06-08 10:15:41 +0000 (Wed, 08 Jun 2011)
Log Message:
-----------
trash downloaded file when option-clicking remove button in table
Modified Paths:
--------------
trunk/SKDownloadController.m
Modified: trunk/SKDownloadController.m
===================================================================
--- trunk/SKDownloadController.m 2011-06-07 18:17:43 UTC (rev 7262)
+++ trunk/SKDownloadController.m 2011-06-08 10:15:41 UTC (rev 7263)
@@ -49,6 +49,7 @@
#import "NSWindowController_SKExtensions.h"
#import "SKDownloadPreferenceController.h"
#import "NSError_SKExtensions.h"
+#import "NSEvent_SKExtensions.h"
#define PROGRESS_COLUMN 1
#define RESUME_COLUMN 2
@@ -277,8 +278,17 @@
if (download == nil) {
NSInteger row = [tableView clickedRow];
- if (row != -1)
+ if (row != -1) {
download = [self objectInDownloadsAtIndex:row];
+ if ([NSEvent standardModifierFlags] & NSAlternateKeyMask) {
+ NSString *filePath = [download filePath];
+ NSString *folderPath = [filePath
stringByDeletingLastPathComponent];
+ NSString *fileName = [filePath lastPathComponent];
+ NSInteger tag = 0;
+
+ [[NSWorkspace sharedWorkspace]
performFileOperation:NSWorkspaceRecycleOperation source:folderPath
destination:nil files:[NSArray arrayWithObjects:fileName, nil] tag:&tag];
+ }
+ }
}
if (download)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit