| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "me2me_preference_pane_confirm_pin.h" | 5 #import "me2me_preference_pane_confirm_pin.h" |
| 6 | 6 |
| 7 @implementation Me2MePreferencePaneConfirmPin | 7 @implementation Me2MePreferencePaneConfirmPin |
| 8 | 8 |
| 9 @synthesize delegate = delegate_; | 9 @synthesize delegate = delegate_; |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 [email_ setStringValue:email]; | 23 [email_ setStringValue:email]; |
| 24 } | 24 } |
| 25 | 25 |
| 26 - (void)setButtonText:(NSString*)text { | 26 - (void)setButtonText:(NSString*)text { |
| 27 [apply_button_ setTitle:text]; | 27 [apply_button_ setTitle:text]; |
| 28 } | 28 } |
| 29 | 29 |
| 30 - (void)setEnabled:(BOOL)enabled { | 30 - (void)setEnabled:(BOOL)enabled { |
| 31 [apply_button_ setEnabled:enabled]; | 31 [apply_button_ setEnabled:enabled]; |
| 32 [pin_ setEnabled:enabled]; | 32 [pin_ setEnabled:enabled]; |
| 33 [[[self view] window] makeFirstResponder:pin_]; |
| 34 [apply_button_ setKeyEquivalent:@"\r"]; |
| 33 } | 35 } |
| 34 | 36 |
| 35 - (void)resetPin { | 37 - (void)resetPin { |
| 36 [pin_ setStringValue:@""]; | 38 [pin_ setStringValue:@""]; |
| 37 } | 39 } |
| 38 | 40 |
| 39 - (void)onApply:(id)sender { | 41 - (void)onApply:(id)sender { |
| 40 [delegate_ applyConfiguration:self | 42 [delegate_ applyConfiguration:self |
| 41 pin:[pin_ stringValue]]; | 43 pin:[pin_ stringValue]]; |
| 42 } | 44 } |
| 43 | 45 |
| 44 @end | 46 @end |
| OLD | NEW |