Hi, I have a bit of code to implement opening dragged URLs to Skim's  
dock icon, but I wanted some feedback on how to finish it up.

It works for local file urls and for remote URLs, which was what I  
wanted - to skip the step of downloading a PDF then opening it in Skim…

The way you handle drag requests from the Dock is via system services  
(!), so I added an "Open URL in Skim" service.
The first service that handles the dragged type, as determined by the  
order in the NSServices array in Info.plist, is invoked to handle the  
drag.
I implemented a service that accepts NSStringPboardType and  
NSURLPboardType, but it occurs to me that another service to open a  
new doc using PDF Data (NSPDFPboardType) might be handy too…

Currently it just handles the request in the application controller  
using NSURLDownload, and NSLog's the status updates (I stole the  
NSURLDownload delegate code from BibDesk, thanks!)

I wasn't sure how to handle user feedback and concurrent downloads,  
so I haven't checked anything in yet.

I thought of two options:
1. Keep it in the app controller, implement a download queue (maybe  
use OmniFrameworks?) and show progress in a downloads window like  
browsers use, with a little tableview.

2. Move the downloading code to SKDocument, and show progress per- 
document in a separate window.

#1 seems more work than a short hack session, but might be nicer. We  
could also imagine a combination of the two, where the documents  
download themselves, but send updates to a global downloads window…

What do you think?

-mike
-------------------------------------------------------------------------
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-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-develop

Reply via email to