-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy pathBetaBuilderWindow.m
33 lines (25 loc) · 916 Bytes
/
BetaBuilderWindow.m
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
//
// BetaBuilderWindow.m
// BetaBuilder
//
// Created by Hunter Hillegas on 5/25/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "BetaBuilderWindow.h"
#import "BetaBuilderAppDelegate.h"
#import "BuilderController.h"
@implementation BetaBuilderWindow
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender {
return NSDragOperationGeneric;
}
- (BOOL)performDragOperation:(id < NSDraggingInfo >)sender {
NSArray *draggedFilenames = [[sender draggingPasteboard] propertyListForType:NSFilenamesPboardType];
if ([[[draggedFilenames objectAtIndex:0] pathExtension] isEqual:@"ipa"]) {
BetaBuilderAppDelegate *appDelegate = (BetaBuilderAppDelegate *)[[NSApplication sharedApplication] delegate];
[appDelegate.builderController setupFromIPAFile:[draggedFilenames objectAtIndex:0]];
return YES;
} else {
return NO;
}
}
@end