mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-19 02:39:21 +00:00
Refactoring
This commit is contained in:
41
MacPass/MPPasswordInputController.m
Normal file
41
MacPass/MPPasswordInputController.m
Normal file
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// MPPasswordInputController.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 17.02.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPPasswordInputController.h"
|
||||
#import "MPDatabaseController.h"
|
||||
|
||||
@interface MPPasswordInputController ()
|
||||
|
||||
@property (assign) IBOutlet NSSecureTextField *passwordTextField;
|
||||
|
||||
- (IBAction)selectKeyFile:(id)sender;
|
||||
- (IBAction)open:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPPasswordInputController
|
||||
|
||||
- (id)init {
|
||||
return [[MPPasswordInputController alloc] initWithNibName:@"PasswordView" bundle:nil];
|
||||
}
|
||||
|
||||
- (NSResponder *)reconmendetFirstResponder {
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)selectKeyFile:(id)sender {
|
||||
|
||||
}
|
||||
|
||||
- (IBAction)open:(id)sender {
|
||||
NSString *password = [self.passwordTextField stringValue];
|
||||
[[MPDatabaseController defaultController] openDatabase:self.openFile password:password keyfile:nil];
|
||||
}
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user