Revision: 26287 http://sourceforge.net/p/bibdesk/svn/26287 Author: hofman Date: 2021-06-23 15:03:21 +0000 (Wed, 23 Jun 2021) Log Message: ----------- Use BDSKURL dummy class for dragged items, so we get remote URLs before file URLs
Modified Paths: -------------- trunk/bibdesk/BDSKBookmarkController.m trunk/bibdesk/NSPasteboard_BDSKExtensions.h trunk/bibdesk/NSPasteboard_BDSKExtensions.m Modified: trunk/bibdesk/BDSKBookmarkController.m =================================================================== --- trunk/bibdesk/BDSKBookmarkController.m 2021-06-23 14:47:59 UTC (rev 26286) +++ trunk/bibdesk/BDSKBookmarkController.m 2021-06-23 15:03:21 UTC (rev 26287) @@ -486,7 +486,7 @@ - (void)outlineView:(NSOutlineView *)ov updateDraggingItemsForDrag:(id<NSDraggingInfo>)draggingInfo { if ([draggingInfo draggingSource] != ov) { - NSArray *classes = [NSArray arrayWithObjects:[NSURL class], nil]; + NSArray *classes = [NSArray arrayWithObjects:[BDSKURL class], nil]; NSDictionary *searchOptions = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], NSPasteboardURLReadingFileURLsOnlyKey, nil]; NSTableColumn *tableColumn = [ov outlineTableColumn]; NSTableCellView *view = [ov makeViewWithIdentifier:[tableColumn identifier] owner:self]; Modified: trunk/bibdesk/NSPasteboard_BDSKExtensions.h =================================================================== --- trunk/bibdesk/NSPasteboard_BDSKExtensions.h 2021-06-23 14:47:59 UTC (rev 26286) +++ trunk/bibdesk/NSPasteboard_BDSKExtensions.h 2021-06-23 15:03:21 UTC (rev 26287) @@ -38,6 +38,11 @@ #import <Cocoa/Cocoa.h> +// Dummy subclass for reading from pasteboard +// Reads public.url before public.file-url, unlike NSURL, so it gets the target URL for webloc/fileloc files rather than its file location +// Don't use for anything else +@interface BDSKURL : NSURL +@end @interface NSPasteboard (BDSKExtensions) Modified: trunk/bibdesk/NSPasteboard_BDSKExtensions.m =================================================================== --- trunk/bibdesk/NSPasteboard_BDSKExtensions.m 2021-06-23 14:47:59 UTC (rev 26286) +++ trunk/bibdesk/NSPasteboard_BDSKExtensions.m 2021-06-23 15:03:21 UTC (rev 26287) @@ -45,12 +45,6 @@ #define WebURLsWithTitlesPboardType @"WebURLsWithTitlesPboardType" #define BDSKPasteboardTypeURLName @"public.url-name" -// Dummy subclass for reading from pasteboard -// Reads public.url before public.file-url, unlike NSURL, so it gets the target URL for webloc/fileloc files rather than its file location -// Don't use for anything else -@interface BDSKURL : NSURL -@end - @implementation BDSKURL + (id)allocWithZone:(NSZone *)zone { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit