Changed CogUrlsPbboardType to CogUrlsPboardType throughout project
parent
037874d654
commit
3c712e2e45
|
@ -74,8 +74,8 @@
|
|||
[urls addObject:[p url]];
|
||||
}
|
||||
NSLog(@"URLS: %@", urls);
|
||||
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPbboardType,nil] owner:nil]; //add it to pboard
|
||||
[pboard setData:[NSArchiver archivedDataWithRootObject:urls] forType:CogUrlsPbboardType];
|
||||
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPboardType,nil] owner:nil]; //add it to pboard
|
||||
[pboard setData:[NSArchiver archivedDataWithRootObject:urls] forType:CogUrlsPboardType];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
extern NSString *MovedRowsType;
|
||||
extern NSString *CogUrlsPbboardType;
|
||||
extern NSString *CogUrlsPboardType;
|
||||
extern NSString *iTunesDropType;
|
||||
|
||||
@interface DNDArrayController : NSArrayController
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
@implementation DNDArrayController
|
||||
|
||||
NSString *MovedRowsType = @"MOVED_ROWS_TYPE";
|
||||
NSString *CogUrlsPbboardType = @"COG_URLS_TYPE";
|
||||
NSString *CogUrlsPboardType = @"COG_URLS_TYPE";
|
||||
|
||||
// @"CorePasteboardFlavorType 0x6974756E" is the "itun" type representing an iTunes plist
|
||||
NSString *iTunesDropType = @"CorePasteboardFlavorType 0x6974756E";
|
||||
|
@ -12,7 +12,7 @@ NSString *iTunesDropType = @"CorePasteboardFlavorType 0x6974756E";
|
|||
- (void)awakeFromNib
|
||||
{
|
||||
// register for drag and drop
|
||||
[tableView registerForDraggedTypes:[NSArray arrayWithObjects:MovedRowsType, CogUrlsPbboardType, NSFilenamesPboardType, iTunesDropType, nil]];
|
||||
[tableView registerForDraggedTypes:[NSArray arrayWithObjects:MovedRowsType, CogUrlsPboardType, NSFilenamesPboardType, iTunesDropType, nil]];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -84,13 +84,13 @@
|
|||
row = 0;
|
||||
|
||||
// Determine the type of object that was dropped
|
||||
NSArray *supportedtypes = [NSArray arrayWithObjects:CogUrlsPbboardType, NSFilenamesPboardType, iTunesDropType, nil];
|
||||
NSArray *supportedtypes = [NSArray arrayWithObjects:CogUrlsPboardType, NSFilenamesPboardType, iTunesDropType, nil];
|
||||
NSPasteboard *pboard = [info draggingPasteboard];
|
||||
NSString *bestType = [pboard availableTypeFromArray:supportedtypes];
|
||||
|
||||
// Get files from an file drawer drop
|
||||
if ([bestType isEqualToString:CogUrlsPbboardType]) {
|
||||
NSArray *urls = [NSUnarchiver unarchiveObjectWithData:[[info draggingPasteboard] dataForType:CogUrlsPbboardType]];
|
||||
if ([bestType isEqualToString:CogUrlsPboardType]) {
|
||||
NSArray *urls = [NSUnarchiver unarchiveObjectWithData:[[info draggingPasteboard] dataForType:CogUrlsPboardType]];
|
||||
NSLog(@"URLS: %@", urls);
|
||||
[playlistLoader insertURLs: urls atIndex:row sort:YES];
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
[spotlightSearchController.query disableUpdates];
|
||||
|
||||
NSArray *urls = [[self selectedObjects]valueForKey:@"url"];
|
||||
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPbboardType,nil] owner:nil]; //add it to pboard
|
||||
[pboard setData:[NSArchiver archivedDataWithRootObject:urls] forType:CogUrlsPbboardType];
|
||||
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPboardType,nil] owner:nil]; //add it to pboard
|
||||
[pboard setData:[NSArchiver archivedDataWithRootObject:urls] forType:CogUrlsPboardType];
|
||||
|
||||
[spotlightSearchController.query enableUpdates];
|
||||
|
||||
|
|
Loading…
Reference in New Issue