mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 05:52:58 +00:00
Cleaned up old KdbEntry and KdbGroup categories
Fixed dealloc bug in MPDocumentWindowController Introduced undo category for entries and groups
This commit is contained in:
@@ -91,8 +91,6 @@
|
|||||||
4CA0B2F915BCAF6700654E32 /* MPGeneralSettingsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA0B2F815BCAF6700654E32 /* MPGeneralSettingsController.m */; };
|
4CA0B2F915BCAF6700654E32 /* MPGeneralSettingsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA0B2F815BCAF6700654E32 /* MPGeneralSettingsController.m */; };
|
||||||
4CA0B2FC15BCAF8600654E32 /* MPSettingsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA0B2FB15BCAF8600654E32 /* MPSettingsWindowController.m */; };
|
4CA0B2FC15BCAF8600654E32 /* MPSettingsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA0B2FB15BCAF8600654E32 /* MPSettingsWindowController.m */; };
|
||||||
4CAC6F7816D2B54800D79D5E /* MPMainWindowSplitViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAC6F7716D2B54800D79D5E /* MPMainWindowSplitViewDelegate.m */; };
|
4CAC6F7816D2B54800D79D5E /* MPMainWindowSplitViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAC6F7716D2B54800D79D5E /* MPMainWindowSplitViewDelegate.m */; };
|
||||||
4CACB72C16F7C9B600D47C9E /* KdbEntry+Copying.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CACB72B16F7C9B600D47C9E /* KdbEntry+Copying.m */; };
|
|
||||||
4CACB72F16F7CA5100D47C9E /* Kdb4Entry+Copying.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CACB72E16F7CA5100D47C9E /* Kdb4Entry+Copying.m */; };
|
|
||||||
4CAD747B15B887FD00104512 /* DDXMLElementAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD745715B887FD00104512 /* DDXMLElementAdditions.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
4CAD747B15B887FD00104512 /* DDXMLElementAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD745715B887FD00104512 /* DDXMLElementAdditions.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
||||||
4CAD747C15B887FD00104512 /* NSString+DDXML.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD745A15B887FD00104512 /* NSString+DDXML.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
4CAD747C15B887FD00104512 /* NSString+DDXML.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD745A15B887FD00104512 /* NSString+DDXML.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
||||||
4CAD747D15B887FD00104512 /* DDXMLDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD745D15B887FD00104512 /* DDXMLDocument.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
4CAD747D15B887FD00104512 /* DDXMLDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD745D15B887FD00104512 /* DDXMLDocument.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
|
||||||
@@ -105,6 +103,7 @@
|
|||||||
4CBFA240172B385D006090DF /* PasswordEditView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CBFA23F172B385D006090DF /* PasswordEditView.xib */; };
|
4CBFA240172B385D006090DF /* PasswordEditView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CBFA23F172B385D006090DF /* PasswordEditView.xib */; };
|
||||||
4CC1AEBE16D4467C006D2AAB /* KdbTree+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */; };
|
4CC1AEBE16D4467C006D2AAB /* KdbTree+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */; };
|
||||||
4CC6259115BA1C99002F5B11 /* MPOutlineViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.m */; };
|
4CC6259115BA1C99002F5B11 /* MPOutlineViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.m */; };
|
||||||
|
4CCF9754173EFBA500460BD2 /* KdbEntry+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCF9753173EFBA500460BD2 /* KdbEntry+Undo.m */; };
|
||||||
4CD78ABC16D155FF00768A1D /* 07_NotepadTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB716D155FF00768A1D /* 07_NotepadTemplate.pdf */; };
|
4CD78ABC16D155FF00768A1D /* 07_NotepadTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB716D155FF00768A1D /* 07_NotepadTemplate.pdf */; };
|
||||||
4CD78ABD16D155FF00768A1D /* 08_SocketTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB816D155FF00768A1D /* 08_SocketTemplate.pdf */; };
|
4CD78ABD16D155FF00768A1D /* 08_SocketTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB816D155FF00768A1D /* 08_SocketTemplate.pdf */; };
|
||||||
4CD78ABE16D155FF00768A1D /* 09_IdentityTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB916D155FF00768A1D /* 09_IdentityTemplate.pdf */; };
|
4CD78ABE16D155FF00768A1D /* 09_IdentityTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB916D155FF00768A1D /* 09_IdentityTemplate.pdf */; };
|
||||||
@@ -277,10 +276,6 @@
|
|||||||
4CA0B30D15BCB6FD00654E32 /* MPSettingsTab.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPSettingsTab.h; sourceTree = "<group>"; };
|
4CA0B30D15BCB6FD00654E32 /* MPSettingsTab.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPSettingsTab.h; sourceTree = "<group>"; };
|
||||||
4CAC6F7616D2B54800D79D5E /* MPMainWindowSplitViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMainWindowSplitViewDelegate.h; sourceTree = "<group>"; };
|
4CAC6F7616D2B54800D79D5E /* MPMainWindowSplitViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMainWindowSplitViewDelegate.h; sourceTree = "<group>"; };
|
||||||
4CAC6F7716D2B54800D79D5E /* MPMainWindowSplitViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMainWindowSplitViewDelegate.m; sourceTree = "<group>"; };
|
4CAC6F7716D2B54800D79D5E /* MPMainWindowSplitViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMainWindowSplitViewDelegate.m; sourceTree = "<group>"; };
|
||||||
4CACB72A16F7C9B600D47C9E /* KdbEntry+Copying.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbEntry+Copying.h"; sourceTree = "<group>"; };
|
|
||||||
4CACB72B16F7C9B600D47C9E /* KdbEntry+Copying.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbEntry+Copying.m"; sourceTree = "<group>"; };
|
|
||||||
4CACB72D16F7CA5100D47C9E /* Kdb4Entry+Copying.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Kdb4Entry+Copying.h"; sourceTree = "<group>"; };
|
|
||||||
4CACB72E16F7CA5100D47C9E /* Kdb4Entry+Copying.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Kdb4Entry+Copying.m"; sourceTree = "<group>"; };
|
|
||||||
4CAD745615B887FD00104512 /* DDXMLElementAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDXMLElementAdditions.h; sourceTree = "<group>"; };
|
4CAD745615B887FD00104512 /* DDXMLElementAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDXMLElementAdditions.h; sourceTree = "<group>"; };
|
||||||
4CAD745715B887FD00104512 /* DDXMLElementAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDXMLElementAdditions.m; sourceTree = "<group>"; };
|
4CAD745715B887FD00104512 /* DDXMLElementAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDXMLElementAdditions.m; sourceTree = "<group>"; };
|
||||||
4CAD745915B887FD00104512 /* NSString+DDXML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+DDXML.h"; sourceTree = "<group>"; };
|
4CAD745915B887FD00104512 /* NSString+DDXML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+DDXML.h"; sourceTree = "<group>"; };
|
||||||
@@ -303,6 +298,8 @@
|
|||||||
4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbTree+MPAdditions.m"; sourceTree = "<group>"; };
|
4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbTree+MPAdditions.m"; sourceTree = "<group>"; };
|
||||||
4CC6258F15BA1C99002F5B11 /* MPOutlineViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineViewDelegate.h; sourceTree = "<group>"; };
|
4CC6258F15BA1C99002F5B11 /* MPOutlineViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineViewDelegate.h; sourceTree = "<group>"; };
|
||||||
4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineViewDelegate.m; sourceTree = "<group>"; };
|
4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineViewDelegate.m; sourceTree = "<group>"; };
|
||||||
|
4CCF9752173EFBA500460BD2 /* KdbEntry+Undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbEntry+Undo.h"; sourceTree = "<group>"; };
|
||||||
|
4CCF9753173EFBA500460BD2 /* KdbEntry+Undo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbEntry+Undo.m"; sourceTree = "<group>"; };
|
||||||
4CD78AB716D155FF00768A1D /* 07_NotepadTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 07_NotepadTemplate.pdf; sourceTree = "<group>"; };
|
4CD78AB716D155FF00768A1D /* 07_NotepadTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 07_NotepadTemplate.pdf; sourceTree = "<group>"; };
|
||||||
4CD78AB816D155FF00768A1D /* 08_SocketTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 08_SocketTemplate.pdf; sourceTree = "<group>"; };
|
4CD78AB816D155FF00768A1D /* 08_SocketTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 08_SocketTemplate.pdf; sourceTree = "<group>"; };
|
||||||
4CD78AB916D155FF00768A1D /* 09_IdentityTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 09_IdentityTemplate.pdf; sourceTree = "<group>"; };
|
4CD78AB916D155FF00768A1D /* 09_IdentityTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 09_IdentityTemplate.pdf; sourceTree = "<group>"; };
|
||||||
@@ -376,10 +373,8 @@
|
|||||||
4C2C4C2B16D3BE3700D49295 /* KdbGroup+MPAdditions.m */,
|
4C2C4C2B16D3BE3700D49295 /* KdbGroup+MPAdditions.m */,
|
||||||
4CC1AEBC16D4467C006D2AAB /* KdbTree+MPAdditions.h */,
|
4CC1AEBC16D4467C006D2AAB /* KdbTree+MPAdditions.h */,
|
||||||
4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */,
|
4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */,
|
||||||
4CACB72A16F7C9B600D47C9E /* KdbEntry+Copying.h */,
|
4CCF9752173EFBA500460BD2 /* KdbEntry+Undo.h */,
|
||||||
4CACB72B16F7C9B600D47C9E /* KdbEntry+Copying.m */,
|
4CCF9753173EFBA500460BD2 /* KdbEntry+Undo.m */,
|
||||||
4CACB72D16F7CA5100D47C9E /* Kdb4Entry+Copying.h */,
|
|
||||||
4CACB72E16F7CA5100D47C9E /* Kdb4Entry+Copying.m */,
|
|
||||||
);
|
);
|
||||||
name = KeePassLibAdditions;
|
name = KeePassLibAdditions;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -947,8 +942,6 @@
|
|||||||
4C811C8316ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m in Sources */,
|
4C811C8316ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m in Sources */,
|
||||||
4CE39ABF16ECE34A000FE29D /* MPIconSelectViewController.m in Sources */,
|
4CE39ABF16ECE34A000FE29D /* MPIconSelectViewController.m in Sources */,
|
||||||
4CE39AC416ECE4F7000FE29D /* MPPopupImageView.m in Sources */,
|
4CE39AC416ECE4F7000FE29D /* MPPopupImageView.m in Sources */,
|
||||||
4CACB72C16F7C9B600D47C9E /* KdbEntry+Copying.m in Sources */,
|
|
||||||
4CACB72F16F7CA5100D47C9E /* Kdb4Entry+Copying.m in Sources */,
|
|
||||||
4C46B88517063A070046109A /* NSString+MPPasswordCreation.m in Sources */,
|
4C46B88517063A070046109A /* NSString+MPPasswordCreation.m in Sources */,
|
||||||
4C46B88817063A170046109A /* NSString+MPPasswordAnalysis.m in Sources */,
|
4C46B88817063A170046109A /* NSString+MPPasswordAnalysis.m in Sources */,
|
||||||
4C46B88B1706D16E0046109A /* NSData+MPRandomBytes.m in Sources */,
|
4C46B88B1706D16E0046109A /* NSData+MPRandomBytes.m in Sources */,
|
||||||
@@ -956,6 +949,7 @@
|
|||||||
4C5A11FE1708DE8700223D8A /* MPPasswordCreatorViewController.m in Sources */,
|
4C5A11FE1708DE8700223D8A /* MPPasswordCreatorViewController.m in Sources */,
|
||||||
4C7E832A172DE2F2002493D8 /* MPPasswordEditViewController.m in Sources */,
|
4C7E832A172DE2F2002493D8 /* MPPasswordEditViewController.m in Sources */,
|
||||||
4CE5B54B173AFBA700207B39 /* MPDocument.m in Sources */,
|
4CE5B54B173AFBA700207B39 /* MPDocument.m in Sources */,
|
||||||
|
4CCF9754173EFBA500460BD2 /* KdbEntry+Undo.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
//
|
|
||||||
// Kdb4Entry+Copying.h
|
|
||||||
// MacPass
|
|
||||||
//
|
|
||||||
// Created by Michael Starke on 18.03.13.
|
|
||||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "KdbLib.h"
|
|
||||||
#import "Kdb4Node.h"
|
|
||||||
|
|
||||||
@interface Kdb4Entry (Copying)
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
//
|
|
||||||
// Kdb4Entry+Copying.m
|
|
||||||
// MacPass
|
|
||||||
//
|
|
||||||
// Created by Michael Starke on 18.03.13.
|
|
||||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "Kdb4Entry+Copying.h"
|
|
||||||
#import "KdbEntry+Copying.h"
|
|
||||||
|
|
||||||
@implementation Kdb4Entry (Copying)
|
|
||||||
|
|
||||||
- (id)copyWithZone:(NSZone *)zone {
|
|
||||||
Kdb4Entry *entry = [[Kdb4Entry allocWithZone:zone] init];
|
|
||||||
entry.uuid = [[self.uuid copy] autorelease];
|
|
||||||
entry.titleStringField = [[self.titleStringField copy] autorelease];
|
|
||||||
entry.usernameStringField = [[self.usernameStringField copy] autorelease];
|
|
||||||
entry.passwordStringField = [[self.passwordStringField copy] autorelease];
|
|
||||||
entry.urlStringField = [[self.urlStringField copy] autorelease];
|
|
||||||
entry.notesStringField = [[self.notesStringField copy] autorelease];
|
|
||||||
entry.customIconUuid = self.customIconUuid;
|
|
||||||
entry.foregroundColor = self.foregroundColor;
|
|
||||||
entry.backgroundColor = self.backgroundColor;
|
|
||||||
entry.overrideUrl = self.overrideUrl;
|
|
||||||
entry.tags = self.tags;
|
|
||||||
entry.locationChanged = self.locationChanged;
|
|
||||||
//entry.stringFields = self.stringFields;
|
|
||||||
//entry.binaries = self.binaries;
|
|
||||||
entry.autoType = self.autoType;
|
|
||||||
//entry.history = self.history;
|
|
||||||
return entry;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
//
|
|
||||||
// KdbEntry+Copying.h
|
|
||||||
// MacPass
|
|
||||||
//
|
|
||||||
// Created by Michael Starke on 18.03.13.
|
|
||||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "Kdb.h"
|
|
||||||
|
|
||||||
@interface KdbEntry (Copying) <NSCopying>
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
//
|
|
||||||
// KdbEntry+Copying.m
|
|
||||||
// MacPass
|
|
||||||
//
|
|
||||||
// Created by Michael Starke on 18.03.13.
|
|
||||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "KdbEntry+Copying.h"
|
|
||||||
|
|
||||||
@implementation KdbEntry (Copying)
|
|
||||||
|
|
||||||
- (id)copyWithZone:(NSZone *)zone {
|
|
||||||
[self doesNotRecognizeSelector:_cmd];
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
|
||||||
25
MacPass/KdbEntry+Undo.h
Normal file
25
MacPass/KdbEntry+Undo.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// KdbEntry+Undo.h
|
||||||
|
// MacPass
|
||||||
|
//
|
||||||
|
// Created by Michael Starke on 12.05.13.
|
||||||
|
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "Kdb.h"
|
||||||
|
|
||||||
|
@interface KdbEntry (Undo)
|
||||||
|
|
||||||
|
- (NSString *)titleUndoable;
|
||||||
|
- (NSString *)usernameUndoable;
|
||||||
|
- (NSString *)passwordUndoable;
|
||||||
|
- (NSString *)urlUndoable;
|
||||||
|
- (NSString *)notesUndoable;
|
||||||
|
|
||||||
|
- (void)setTitleUndoable:(NSString *)title;
|
||||||
|
- (void)setUsernameUndoable:(NSString *)username;
|
||||||
|
- (void)setPasswordUndoable:(NSString *)password;
|
||||||
|
- (void)setUrlUndoable:(NSString *)url;
|
||||||
|
- (void)setNotesUndoable:(NSString *)notes;
|
||||||
|
|
||||||
|
@end
|
||||||
68
MacPass/KdbEntry+Undo.m
Normal file
68
MacPass/KdbEntry+Undo.m
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
//
|
||||||
|
// KdbEntry+Undo.m
|
||||||
|
// MacPass
|
||||||
|
//
|
||||||
|
// Created by Michael Starke on 12.05.13.
|
||||||
|
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "KdbEntry+Undo.h"
|
||||||
|
|
||||||
|
@implementation KdbEntry (Undo)
|
||||||
|
|
||||||
|
- (NSString *)titleUndoable {
|
||||||
|
return [self title];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)usernameUndoable {
|
||||||
|
return [self username];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)passwordUndoable {
|
||||||
|
return [self password];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)urlUndoable {
|
||||||
|
return [self url];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)notesUndoable {
|
||||||
|
return [self notes];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)setTitleUndoable:(NSString *)title {
|
||||||
|
NSDocument *document = [[NSDocumentController sharedDocumentController] currentDocument];
|
||||||
|
[[document undoManager] registerUndoWithTarget:self selector:@selector(setTitleUndoable:) object:self.title];
|
||||||
|
[[document undoManager] setActionName:NSLocalizedString(@"UNDO_SET_TITLE", "Undo set title")];
|
||||||
|
[self setTitle:title];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setUsernameUndoable:(NSString *)username {
|
||||||
|
NSDocument *document = [[NSDocumentController sharedDocumentController] currentDocument];
|
||||||
|
[[document undoManager] registerUndoWithTarget:self selector:@selector(setUsernameUndoable:) object:self.username];
|
||||||
|
[[document undoManager] setActionName:NSLocalizedString(@"UNDO_SET_USERNAME", "Undo set username")];
|
||||||
|
[self setUsername:username];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setPasswordUndoable:(NSString *)password {
|
||||||
|
NSDocument *document = [[NSDocumentController sharedDocumentController] currentDocument];
|
||||||
|
[[document undoManager] registerUndoWithTarget:self selector:@selector(setTitleUndoable:) object:self.password];
|
||||||
|
[[document undoManager] setActionName:NSLocalizedString(@"UNDO_SET_PASSWORT", "Undo set password")];
|
||||||
|
[self setPassword:password];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setUrlUndoable:(NSString *)url {
|
||||||
|
NSDocument *document = [[NSDocumentController sharedDocumentController] currentDocument];
|
||||||
|
[[document undoManager] registerUndoWithTarget:self selector:@selector(setTitleUndoable:) object:self.url];
|
||||||
|
[[document undoManager] setActionName:NSLocalizedString(@"UNDO_SET_URL", "Undo set URL")];
|
||||||
|
[self setUrl:url];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setNotesUndoable:(NSString *)notes {
|
||||||
|
NSDocument *document = [[NSDocumentController sharedDocumentController] currentDocument];
|
||||||
|
[[document undoManager] registerUndoWithTarget:self selector:@selector(setTitleUndoable:) object:self.notes];
|
||||||
|
[[document undoManager] setActionName:NSLocalizedString(@"UNDO_SET_NOTES", "Undo set notes")];
|
||||||
|
[self setNotes:notes];
|
||||||
|
}
|
||||||
|
@end
|
||||||
@@ -33,8 +33,6 @@ APPKIT_EXTERN NSString *const MPDocumentGroupKey;
|
|||||||
- (id)initWithVersion:(MPDatabaseVersion)version;
|
- (id)initWithVersion:(MPDatabaseVersion)version;
|
||||||
- (BOOL)decryptWithPassword:(NSString *)password keyFileURL:(NSURL *)keyFileURL;
|
- (BOOL)decryptWithPassword:(NSString *)password keyFileURL:(NSURL *)keyFileURL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- (KdbGroup *)createGroup:(KdbGroup *)parent;
|
- (KdbGroup *)createGroup:(KdbGroup *)parent;
|
||||||
- (KdbEntry *)createEntry:(KdbGroup *)parent;
|
- (KdbEntry *)createEntry:(KdbGroup *)parent;
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
|||||||
newGroup.name = NSLocalizedString(@"DEFAULT_GROUP_NAME", @"Title for a newly created group");
|
newGroup.name = NSLocalizedString(@"DEFAULT_GROUP_NAME", @"Title for a newly created group");
|
||||||
|
|
||||||
[[self undoManager] registerUndoWithTarget:self selector:@selector(deleteGroup:) object:newGroup];
|
[[self undoManager] registerUndoWithTarget:self selector:@selector(deleteGroup:) object:newGroup];
|
||||||
[[self undoManager] setActionName:NSLocalizedString(@"ADD_GROUP_UNDO", @"Create Group Undo")];
|
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_ADD_GROUP", @"Create Group Undo")];
|
||||||
[parent addGroup:newGroup];
|
[parent addGroup:newGroup];
|
||||||
NSDictionary *userInfo = @{ MPDocumentGroupKey:newGroup };
|
NSDictionary *userInfo = @{ MPDocumentGroupKey:newGroup };
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddGroupNotification object:self userInfo:userInfo];
|
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddGroupNotification object:self userInfo:userInfo];
|
||||||
@@ -176,7 +176,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
|||||||
- (void)deleteGroup:(KdbGroup *)group {
|
- (void)deleteGroup:(KdbGroup *)group {
|
||||||
if(group.parent) {
|
if(group.parent) {
|
||||||
[[self undoManager] registerUndoWithTarget:self selector:@selector(addGroup:) object:@[group.parent, group]];
|
[[self undoManager] registerUndoWithTarget:self selector:@selector(addGroup:) object:@[group.parent, group]];
|
||||||
[[self undoManager] setActionName:NSLocalizedString(@"DELETE_GROUP_UNDO", @"Create Group Undo")];
|
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_DELETE_GROUP", @"Create Group Undo")];
|
||||||
[group.parent removeGroup:group];
|
[group.parent removeGroup:group];
|
||||||
NSDictionary *userInfo = @{ MPDocumentEntryKey:group };
|
NSDictionary *userInfo = @{ MPDocumentEntryKey:group };
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidDelteGroupNotification object:self userInfo:userInfo];
|
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidDelteGroupNotification object:self userInfo:userInfo];
|
||||||
@@ -185,4 +185,5 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -69,7 +69,6 @@
|
|||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
[_welcomeView release];
|
[_welcomeView release];
|
||||||
[_welcomeText release];
|
|
||||||
[_toolbar release];
|
[_toolbar release];
|
||||||
|
|
||||||
[_passwordInputController release];
|
[_passwordInputController release];
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#import "MPPopupImageView.h"
|
#import "MPPopupImageView.h"
|
||||||
#import "MPIconSelectViewController.h"
|
#import "MPIconSelectViewController.h"
|
||||||
#import "KdbLib.h"
|
#import "KdbLib.h"
|
||||||
|
#import "KdbEntry+Undo.h"
|
||||||
|
|
||||||
@interface MPInspectorTabViewController ()
|
@interface MPInspectorTabViewController ()
|
||||||
|
|
||||||
@@ -52,8 +53,6 @@
|
|||||||
|
|
||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
[_selectedGroup release];
|
|
||||||
[_selectedEntry release];
|
|
||||||
[_iconPopup release];
|
[_iconPopup release];
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
@@ -99,7 +98,8 @@
|
|||||||
[self.itemNameTextfield setStringValue:self.selectedEntry.title];
|
[self.itemNameTextfield setStringValue:self.selectedEntry.title];
|
||||||
[self.itemImageView setImage:[MPIconHelper icon:(MPIconType)self.selectedEntry.image ]];
|
[self.itemImageView setImage:[MPIconHelper icon:(MPIconType)self.selectedEntry.image ]];
|
||||||
[self.passwordTextField setStringValue:self.selectedEntry.password];
|
[self.passwordTextField setStringValue:self.selectedEntry.password];
|
||||||
[self.usernameTextField setStringValue:self.selectedEntry.username];
|
[self.usernameTextField bind:NSValueBinding toObject:self.selectedEntry withKeyPath:@"usernameUndoable" options:nil];
|
||||||
|
//[self.usernameTextField setStringValue:self.selectedEntry.username];
|
||||||
[self.titleOrNameLabel setStringValue:NSLocalizedString(@"TITLE",@"")];
|
[self.titleOrNameLabel setStringValue:NSLocalizedString(@"TITLE",@"")];
|
||||||
[self.titleTextField setStringValue:self.selectedEntry.title];
|
[self.titleTextField setStringValue:self.selectedEntry.title];
|
||||||
[self.URLTextField setStringValue:self.selectedEntry.url];
|
[self.URLTextField setStringValue:self.selectedEntry.url];
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>69B</string>
|
<string>6AA</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user