-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathAZWindow.m
More file actions
46 lines (37 loc) · 1.1 KB
/
AZWindow.m
File metadata and controls
46 lines (37 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// AZWindow.m
// 115SpeedUp
//
// Created by Aladdin on 3/7/11.
// Copyright 2011 innovation-works. All rights reserved.
//
#import "AZWindow.h"
@implementation AZWindow
- (void) awakeFromNib
{
[self registerForDraggedTypes: [NSArray arrayWithObjects: NSFilenamesPboardType,NSURLPboardType, nil]];
}
- (NSDragOperation) draggingEntered: (id < NSDraggingInfo >) sender
{
NSLog(@"%s,%@",_cmd,sender);
NSPasteboard *pboard = [sender draggingPasteboard];
NSDragOperation opType = NSDragOperationNone;
if ([[pboard types] containsObject: NSFilenamesPboardType])
opType = NSDragOperationCopy;
return opType;
}
- (BOOL) performDragOperation: (id < NSDraggingInfo >) sender
{
NSLog(@"%s,%@",_cmd,sender);
NSPasteboard *pboard = [sender draggingPasteboard];
BOOL successful = NO;
if ([[pboard types] containsObject: NSFilenamesPboardType])
{
NSArray *files = [pboard propertyListForType: NSFilenamesPboardType];
// [controller startConversion: [files objectAtIndex: 0]];
NSLog(@"%@",files);
successful = YES;
}
return successful;
}
@end