mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 03:32:40 +00:00
Updated MiniKeePassLib
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
//
|
||||
// Kdb4Tree+Undo.h
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 27.06.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Kdb4Node.h"
|
||||
|
||||
APPKIT_EXTERN NSString *const MPTree4DatabaseNameUndoableKey;
|
||||
APPKIT_EXTERN NSString *const MPTree4DatabaseDescriptionUndoableKey;
|
||||
APPKIT_EXTERN NSString *const MPTree4DatabaseDefaultUsernameUndoableKey;
|
||||
|
||||
APPKIT_EXTERN NSString *const MPTree4ProtectNotesUndoableKey;
|
||||
APPKIT_EXTERN NSString *const MPTree4ProtectPasswordUndoableKey;
|
||||
APPKIT_EXTERN NSString *const MPTree4ProtectTitleUndoableKey;
|
||||
APPKIT_EXTERN NSString *const MPTree4ProtectUrlUndoableKey;
|
||||
APPKIT_EXTERN NSString *const MPTree4ProtectUsernameUndoableKey;
|
||||
|
||||
@interface Kdb4Tree (Undo)
|
||||
|
||||
- (NSString *)databaseNameUndoable;
|
||||
- (NSString *)databaseDescriptionUndoable;
|
||||
- (NSString *)defaultUserNameUndoable;
|
||||
|
||||
- (void)setDatabaseDescriptionUndoable:(NSString *)databaseDescription;
|
||||
- (void)setDatabaseNameUndoable:(NSString *)databaseName;
|
||||
- (void)setDefaultUserNameUndoable:(NSString *)defaultUserName;
|
||||
|
||||
- (BOOL)protectNotesUndoable;
|
||||
- (BOOL)protectPasswordUndoable;
|
||||
- (BOOL)protectTitleUndoable;
|
||||
- (BOOL)protectUrlUndoable;
|
||||
- (BOOL)protectUserNameUndoable;
|
||||
|
||||
- (void)setProtectNotesUndoable:(BOOL)protectNotes;
|
||||
- (void)setProtectPasswordUndoable:(BOOL)protectPassword;
|
||||
- (void)setProtectTitleUndoable:(BOOL)protectTitle;
|
||||
- (void)setProtectUrlUndoable:(BOOL)protectUrl;
|
||||
- (void)setProtectUserNameUndoable:(BOOL)protectUserName;
|
||||
|
||||
|
||||
//@property(nonatomic, assign) NSInteger maintenanceHistoryDays;
|
||||
//
|
||||
//@property(nonatomic, retain) NSDate *masterKeyChanged;
|
||||
//@property(nonatomic, assign) NSInteger masterKeyChangeRec;
|
||||
//@property(nonatomic, assign) NSInteger masterKeyChangeForce;
|
||||
//
|
||||
//@property(nonatomic, assign) BOOL recycleBinEnabled;
|
||||
//@property(nonatomic, retain) NSDate *recycleBinChanged;
|
||||
//
|
||||
//@property(nonatomic, assign) NSInteger historyMaxItems;
|
||||
//@property(nonatomic, assign) NSInteger historyMaxSize;
|
||||
//
|
||||
//@property(nonatomic, readonly) NSMutableArray *binaries;
|
||||
|
||||
@end
|
||||
@@ -1,127 +0,0 @@
|
||||
//
|
||||
// Kdb4Tree+Undo.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 27.06.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Kdb4Tree+Undo.h"
|
||||
|
||||
NSString *const MPTree4DatabaseNameUndoableKey = @"databaseNameUndoable";
|
||||
NSString *const MPTree4DatabaseDescriptionUndoableKey = @"databaseDescriptionUndoable";
|
||||
NSString *const MPTree4DatabaseDefaultUsernameUndoableKey = @"defaultUserNameUndoable";
|
||||
|
||||
NSString *const MPTree4ProtectNotesUndoableKey = @"protectNotesUndoable";
|
||||
NSString *const MPTree4ProtectPasswordUndoableKey = @"protectPasswordUndoable";
|
||||
NSString *const MPTree4ProtectTitleUndoableKey = @"protectTitleUndoable";
|
||||
NSString *const MPTree4ProtectUrlUndoableKey = @"protectUrlUndoable";
|
||||
NSString *const MPTree4ProtectUsernameUndoableKey = @"protectUserNameUndoable";
|
||||
|
||||
@implementation Kdb4Tree (Undo)
|
||||
|
||||
- (NSUndoManager *)undoManager {
|
||||
return [[[NSDocumentController sharedDocumentController] currentDocument] undoManager];
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)databaseDescriptionUndoable {
|
||||
return self.databaseDescription;
|
||||
}
|
||||
|
||||
- (NSString *)databaseNameUndoable {
|
||||
return self.databaseName;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)defaultUserNameUndoable {
|
||||
return self.defaultUserName;
|
||||
}
|
||||
|
||||
- (void)setDatabaseDescriptionUndoable:(NSString *)databaseDescription {
|
||||
if(![self.databaseDescription isEqualToString:databaseDescription]) {
|
||||
[[self undoManager] registerUndoWithTarget:self selector:@selector(setDatabaseDescriptionUndoable:) object:self.databaseDescription];
|
||||
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_SET_DATABASE_DESCRIPTION", @"Undo edit databse description")];
|
||||
self.databaseDescriptionChanged = [NSDate date];
|
||||
self.databaseDescription = databaseDescription;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setDatabaseNameUndoable:(NSString *)databaseName {
|
||||
if(![self.databaseName isEqualToString:databaseName]) {
|
||||
[[self undoManager] registerUndoWithTarget:self selector:@selector(setDatabaseNameUndoable:) object:self.databaseName];
|
||||
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_SET_DATABASE_NAME", @"Undo edit database name")];
|
||||
self.databaseName = databaseName;
|
||||
self.databaseNameChanged = [NSDate date];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setDefaultUserNameUndoable:(NSString *)defaultUserName {
|
||||
if(![self.defaultUserName isEqualToString:defaultUserName]) {
|
||||
[[self undoManager] registerUndoWithTarget:self selector:@selector(setDefaultUserNameUndoable:) object:self.defaultUserName];
|
||||
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_SET_DEFAULT_USERNAME", @"Undo edit default username")];
|
||||
self.defaultUserName = defaultUserName;
|
||||
self.defaultUserNameChanged = [NSDate date];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)protectNotesUndoable {
|
||||
return self.protectNotes;
|
||||
}
|
||||
|
||||
- (BOOL)protectPasswordUndoable {
|
||||
return self.protectPassword;
|
||||
}
|
||||
|
||||
- (BOOL)protectTitleUndoable {
|
||||
return self.protectTitle;
|
||||
}
|
||||
|
||||
- (BOOL)protectUrlUndoable {
|
||||
return self.protectUrl;
|
||||
}
|
||||
|
||||
- (BOOL)protectUserNameUndoable {
|
||||
return self.protectUserName;
|
||||
}
|
||||
|
||||
- (void)setProtectNotesUndoable:(BOOL)protectNotes {
|
||||
if(self.protectNotes != protectNotes) {
|
||||
[[[self undoManager] prepareWithInvocationTarget:self] setProtectNotesUndoable:self.protectNotes];
|
||||
[[self undoManager] setActionName:NSLocalizedString(@"UNOD_SET_PROTECT_NOTES", @"")];
|
||||
self.protectNotes = protectNotes;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setProtectPasswordUndoable:(BOOL)protectPassword {
|
||||
if(self.protectPassword != protectPassword) {
|
||||
[[[self undoManager] prepareWithInvocationTarget:self] setProtectPasswordUndoable:self.protectPassword];
|
||||
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_SET_PROTECT_PASSWORD", @"")];
|
||||
self.protectPassword = protectPassword;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setProtectTitleUndoable:(BOOL)protectTitle {
|
||||
if(self.protectTitle != protectTitle) {
|
||||
[[[self undoManager] prepareWithInvocationTarget:self] setProtectTitleUndoable:self.protectPassword];
|
||||
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_SET_PROTECT_TITLE", @"")];
|
||||
self.protectTitle = protectTitle;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setProtectUrlUndoable:(BOOL)protectUrl {
|
||||
if(self.protectUrl != protectUrl) {
|
||||
[[[self undoManager] prepareWithInvocationTarget:self] setProtectUrlUndoable:self.protectUrl];
|
||||
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_SET_PROTECT_URL", @"")];
|
||||
self.protectUrl = protectUrl;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setProtectUserNameUndoable:(BOOL)protectUserName {
|
||||
if(self.protectUserName != protectUserName) {
|
||||
[[[self undoManager] prepareWithInvocationTarget:self] setProtectUserNameUndoable:self.protectUserName];
|
||||
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_SET_PROTECT_USERNAME", @"")];
|
||||
self.protectUserName = protectUserName;
|
||||
}
|
||||
}
|
||||
@end
|
||||
Submodule MiniKeePassLib updated: bc93503c43...80eeef9346
Reference in New Issue
Block a user