Extracted context bar for trash, history and filter browsing. Some regressions in focus handling were introduced. History tab will go away as this will be incorporated in the entry comparable to searching. Code cleanup. Moved copying to KeePassKit

This commit is contained in:
michael starke
2013-12-18 02:29:25 +01:00
parent 21355101ed
commit 92d963a9ef
27 changed files with 800 additions and 577 deletions

View File

@@ -27,9 +27,6 @@
#import "KPKGroup.h"
#import "KPKEntry.h"
#import "KPKUTIs.h"
#import "KPKEntry+TemplateCopy.h"
#import "KPKGroup+TemplateCopy.h"
#import "NSUUID+KeePassKit.h"
@@ -146,11 +143,7 @@
KPKGroup *targetGroup = (KPKGroup *)targetItem;
if(draggedGroup) {
if(copyItem || (nil == self.localDraggedGroup) ) {
/* Add Copy to title */
NSString *copyTemplate = NSLocalizedString(@"%@_COPY", "");
/* If we copy, we need to update the uuid */
draggedGroup.name = [NSString stringWithFormat:copyTemplate, draggedGroup.name];
draggedGroup.uuid = [NSUUID UUID];
draggedGroup = [draggedGroup copyWithName:nil options:0];
[targetGroup addGroup:draggedGroup atIndex:index];
[targetGroup.undoManager setActionName:NSLocalizedString(@"COPY_GROUP", "")];
return YES;
@@ -166,10 +159,7 @@
}
else if(draggedEntry) {
if(copyItem || (nil == self.localDraggedEntry)) {
/* if we copy, we need to update the uuid */
NSString *copyTemplate = NSLocalizedString(@"%@_COPY", "");
draggedEntry.title = [NSString stringWithFormat:copyTemplate, draggedEntry.title];
draggedEntry.uuid = [NSUUID UUID];
draggedEntry = [draggedEntry copyWithTitle:nil options:0];
[targetGroup addEntry:draggedEntry atIndex:index];
[targetGroup.undoManager setActionName:NSLocalizedString(@"COPY_ENTRY", "")];
return YES;