Checking for public.url pasteboard type first, so dragging a .webloc file from the Finder opens the URL and not the .webloc file itself.

svn path=/trunk/netsurf/; revision=11901
This commit is contained in:
Sven Weidauer 2011-03-04 10:38:07 +00:00
parent f2bc0163c0
commit 45c30cd3d1

View File

@ -612,7 +612,7 @@ static browser_mouse_state cocoa_mouse_flags_for_event( NSEvent *evt )
{
NSPasteboard *pb = [sender draggingPasteboard];
NSString *type = [pb availableTypeFromArray:[NSArray arrayWithObjects: NSURLPboardType, @"public.url", nil]];
NSString *type = [pb availableTypeFromArray:[NSArray arrayWithObjects: @"public.url", NSURLPboardType, nil]];
NSString *url = nil;
if ([type isEqualToString: NSURLPboardType]) url = [[NSURL URLFromPasteboard: pb] absoluteString];