Files
MacPass/MacPass/MPPasswordEditWindowController.h
michael starke 4a8b1207c5 Re-enabled password request before saving a database that has no password and key
Stripped logging code
Fixed issue with save panel not being updated correctly when panel is just reshown
2013-09-04 02:15:22 +02:00

49 lines
1.4 KiB
Objective-C

//
// MPPasswordEditWindowController.h
// MacPass
//
// Created by Michael Starke on 10.08.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "MPSheetWindowController.h"
@class MPDocument;
@class HNHRoundedSecureTextField;
@protocol MPPasswordEditWindowDelegate <NSObject>
@optional
/**
* Get's called on dismissing the password editor.
* @param changedPasswordOrKey YES if the password and/or key was saved (not necessairly changed!);
*/
- (void)didFinishPasswordEditing:(BOOL)changedPasswordOrKey;
@end
@interface MPPasswordEditWindowController : MPSheetWindowController <NSTextFieldDelegate>
@property (weak) IBOutlet HNHRoundedSecureTextField *passwordTextField;
@property (weak) IBOutlet HNHRoundedSecureTextField *passwordRepeatTextField;
@property (weak) IBOutlet NSPathControl *keyfilePathControl;
@property (weak) IBOutlet NSButton *togglePasswordButton;
@property (weak) IBOutlet NSTextField *errorTextField;
@property (weak) IBOutlet NSButton *changePasswordButton;
@property (nonatomic,assign) BOOL allowsEmptyPasswordOrKey;
@property (weak) id<MPPasswordEditWindowDelegate> delegate;
/**
* Dedicated initializer for the Windowcontroller
* @param document The Database document that is currently active
* @return initalized windowcontroller
*/
- (id)initWithDocument:(MPDocument *)document;
- (IBAction)clearKey:(id)sender;
- (IBAction)generateKey:(id)sender;
@end