Revision: 23958
          http://sourceforge.net/p/bibdesk/svn/23958
Author:   hofman
Date:     2019-07-07 13:20:10 +0000 (Sun, 07 Jul 2019)
Log Message:
-----------
implement download method in document

Modified Paths:
--------------
    trunk/bibdesk/BibDocument_DataSource.m

Modified: trunk/bibdesk/BibDocument_DataSource.m
===================================================================
--- trunk/bibdesk/BibDocument_DataSource.m      2019-07-07 06:30:20 UTC (rev 
23957)
+++ trunk/bibdesk/BibDocument_DataSource.m      2019-07-07 13:20:10 UTC (rev 
23958)
@@ -1725,4 +1725,12 @@
     return dragOp;
 }
 
+- (BOOL)fileView:(FVFileView *)aFileView shouldDownloadURL:(NSURL *)aURL 
atIndex:(NSUInteger)anIndex replace:(BOOL)replace {
+    // there should only be a single item selected when we get this
+    BibItem *item = [[self selectedPublications] firstObject];
+    BDSKLinkedFile *linkedFile = [item objectInFilesAtIndex:anIndex];
+    [item downloadLinkedFile:linkedFile replace:replace];
+    return NO;
+}
+
 @end

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