From 0c3c99d5b773389d040f0bc994f0924390f8f7ca Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Sat, 29 Jun 2013 12:35:47 +0200 Subject: [PATCH] Updated MiniKeePassLib --- MacPass/Kdb4Tree+Undo.h | 58 ------------------ MacPass/Kdb4Tree+Undo.m | 127 ---------------------------------------- MiniKeePassLib | 2 +- 3 files changed, 1 insertion(+), 186 deletions(-) delete mode 100644 MacPass/Kdb4Tree+Undo.h delete mode 100644 MacPass/Kdb4Tree+Undo.m diff --git a/MacPass/Kdb4Tree+Undo.h b/MacPass/Kdb4Tree+Undo.h deleted file mode 100644 index 8489c532..00000000 --- a/MacPass/Kdb4Tree+Undo.h +++ /dev/null @@ -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 diff --git a/MacPass/Kdb4Tree+Undo.m b/MacPass/Kdb4Tree+Undo.m deleted file mode 100644 index 1173921f..00000000 --- a/MacPass/Kdb4Tree+Undo.m +++ /dev/null @@ -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 diff --git a/MiniKeePassLib b/MiniKeePassLib index bc93503c..80eeef93 160000 --- a/MiniKeePassLib +++ b/MiniKeePassLib @@ -1 +1 @@ -Subproject commit bc93503c43d5d7a6afc9e183fe8784350119dd45 +Subproject commit 80eeef93466765cf75b7851231206f25bce97ee3