diff --git a/KeePassKit b/KeePassKit index 1e2dead0..04a7747b 160000 --- a/KeePassKit +++ b/KeePassKit @@ -1 +1 @@ -Subproject commit 1e2dead025183eabc492c84b79dad3167728b9d9 +Subproject commit 04a7747bd991704a1c18ec2d20798c6347a3803f diff --git a/MacPass/KPKNode+IconImage.m b/MacPass/KPKNode+IconImage.m index 63184865..a20988ea 100644 --- a/MacPass/KPKNode+IconImage.m +++ b/MacPass/KPKNode+IconImage.m @@ -15,13 +15,13 @@ @implementation KPKNode (IconImage) + (NSSet *)keyPathsForValuesAffectingIconImage { - return [NSSet setWithArray:@[@"customIcon", @"icon"]]; + return [NSSet setWithArray:@[@"customIcon", @"iconId"]]; } - (NSImage *)iconImage { if(self.customIcon) { return self.customIcon.image; } - return [MPIconHelper icon:(MPIconType)self.icon]; + return [MPIconHelper icon:(MPIconType)self.iconId]; } @end diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index 97f8da7a..9dafe88f 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -455,7 +455,7 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { } KPKGroup *newGroup = [self.tree createGroup:parent]; newGroup.name = NSLocalizedString(@"DEFAULT_GROUP_NAME", @"Title for a newly created group"); - newGroup.icon = MPIconFolder; + newGroup.iconId = MPIconFolder; [parent addGroup:newGroup]; NSDictionary *userInfo = @{ MPDocumentGroupKey : newGroup }; [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddGroupNotification object:self userInfo:userInfo]; @@ -607,7 +607,7 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { BOOL wasEnabled = [self.undoManager isUndoRegistrationEnabled]; [self.undoManager disableUndoRegistration]; trash.name = NSLocalizedString(@"TRASH", @"Name for the trash group"); - trash.icon = MPIconTrash; + trash.iconId = MPIconTrash; [self.tree.root addGroup:trash]; if(wasEnabled) { [self.undoManager enableUndoRegistration]; diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index e2ef0ca1..86a87c37 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -237,12 +237,12 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell"; view = [tableView makeViewWithIdentifier:_MPTableImageCellView owner:self]; if( isTitleColumn ) { [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"title" options:nil]; - [[view imageView] setImage:entry.iconImage]; + [[view imageView] bind:NSValueBinding toObject:entry withKeyPath:@"iconImage" options:nil]; } else { assert(entry.parent); [[view textField] bind:NSValueBinding toObject:entry.parent withKeyPath:@"name" options:nil]; - [[view imageView] setImage:entry.iconImage]; + [[view imageView] bind:NSValueBinding toObject:entry.parent withKeyPath:@"iconImage" options:nil]; } } else if(isPasswordColum) { diff --git a/MacPass/MPInspectorViewController.m b/MacPass/MPInspectorViewController.m index a943e54b..abcd1df6 100644 --- a/MacPass/MPInspectorViewController.m +++ b/MacPass/MPInspectorViewController.m @@ -179,11 +179,11 @@ typedef NS_ENUM(NSUInteger, MPContentTab) { BOOL useDefault = (viewController.selectedIcon == -1); switch (self.activeTab) { case MPGroupTab: - document.selectedGroup.icon = useDefault ? MPIconFolder : viewController.selectedIcon; + document.selectedGroup.iconId = useDefault ? [KPKGroup defaultIcon] : viewController.selectedIcon; break; case MPEntryTab: - document.selectedEntry.icon = useDefault ? MPIconPassword : viewController.selectedIcon; + document.selectedEntry.iconId = useDefault ? [KPKEntry defaultIcon]: viewController.selectedIcon; break; default: diff --git a/MacPass/MPOutlineViewController.m b/MacPass/MPOutlineViewController.m index 0e9985ac..1b8d06e8 100644 --- a/MacPass/MPOutlineViewController.m +++ b/MacPass/MPOutlineViewController.m @@ -196,9 +196,9 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; KPKGroup *group = [item representedObject]; view = [outlineView makeViewWithIdentifier:_MPOutlineViewDataViewIdentifier owner:self]; - [view.imageView setImage:group.iconImage]; - [view.textField bind:NSValueBinding toObject:group withKeyPath:@"name" options:nil]; - [view.textField bind:@"count" toObject:group withKeyPath:@"entries.@count" options:nil]; + [[view imageView] bind:NSValueBinding toObject:group withKeyPath:@"iconImage" options:nil]; + [[view textField] bind:NSValueBinding toObject:group withKeyPath:@"name" options:nil]; + [[view textField] bind:@"count" toObject:group withKeyPath:@"entries.@count" options:nil]; } return view;