-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSVNAuthorise.mm
53 lines (41 loc) · 859 Bytes
/
SVNAuthorise.mm
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
47
48
49
50
51
52
53
#import "SVNAuthorise.h"
@implementation SVNAuthorise
-(id)init {
if (self = [super initWithWindowNibName:@"SVNAuthorise"]) {
lock = [[NSConditionLock alloc] initWithCondition:0];
}
return self;
}
-(void)runWithRealm:(NSString*)_realm username:(NSString*)_username {
username = [_username retain];
password = [NSString new];
realm = [_realm retain];
[lock lock];
[self window];
}
- (void)windowDidLoad {
[super windowDidLoad];
}
-(void)dealloc {
[username release];
[password release];
[realm release];
[lock unlock];
[lock release];
[super dealloc];
}
-(void)windowWillClose:(NSNotification*)notification {
[lock unlockWithCondition:1];
// [self release];
}
- (IBAction)cancel:(id)sender {
[self close];
}
- (IBAction)ok:(id)sender {
ok = true;
[self close];
}
-(void)waitUntilDone {
[lock lockWhenCondition:1];
}
@end