blob: 75afd8917f8199da1ddff8b898df8f099e54edf1 (
plain)
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
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "me2me_preference_pane_confirm_pin.h"
@implementation Me2MePreferencePaneConfirmPin
@synthesize delegate = delegate_;
- (id)init {
self = [super initWithNibName:@"me2me_preference_pane_confirm_pin"
bundle:[NSBundle bundleForClass:[self class]]];
return self;
}
- (void)dealloc {
[delegate_ release];
[super dealloc];
}
- (void)setEmail:(NSString*)email {
[email_ setStringValue:email];
}
- (void)setButtonText:(NSString*)text {
[apply_button_ setTitle:text];
}
- (void)setEnabled:(BOOL)enabled {
[apply_button_ setEnabled:enabled];
[pin_ setEnabled:enabled];
[[[self view] window] makeFirstResponder:pin_];
[apply_button_ setKeyEquivalent:@"\r"];
}
- (void)resetPin {
[pin_ setStringValue:@""];
}
- (void)onApply:(id)sender {
[delegate_ applyConfiguration:self
pin:[pin_ stringValue]];
}
@end
|