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

@@ -9,18 +9,23 @@
#import "KPKNode+IconImage.h"
#import "KPKIcon.h"
#import "KPKTree.h"
#import "KPKMetaData.h"
#import "MPIconHelper.h"
@implementation KPKNode (IconImage)
+ (NSSet *)keyPathsForValuesAffectingIconImage {
return [NSSet setWithArray:@[@"customIcon", @"iconId"]];
return [NSSet setWithArray:@[@"iconUUID", @"iconId"]];
}
- (NSImage *)iconImage {
if(self.customIcon) {
return self.customIcon.image;
if(self.iconUUID) {
KPKIcon *icon = [self.tree.metaData findIcon:self.iconUUID];
if(icon && icon.image) {
return icon.image;
}
}
return [MPIconHelper icon:(MPIconType)self.iconId];
}