Using new KeePassKit API, simple multi selection support

This commit is contained in:
michael starke
2016-02-25 18:41:50 +01:00
parent 06c5f4d740
commit eb6e6bcaa9
22 changed files with 213 additions and 247 deletions

View File

@@ -19,11 +19,12 @@
}
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
MPDocument *document = [[[tableView window] windowController] document];
NSTableCellView *view = [tableView makeViewWithIdentifier:@"WindowAssociationCell" owner:tableView];
KPKEntry *entry = document.selectedEntry;
KPKWindowAssociation *association = entry.autotype.associations[row];
[[view textField] bind:NSValueBinding toObject:association withKeyPath:@"windowTitle" options:nil];
NSString *windowTitleKeyPath = [NSString stringWithFormat:@"%@.%@",
NSStringFromSelector(@selector(objectValue)),
NSStringFromSelector(@selector(windowTitle))];
[view.textField bind:NSValueBinding toObject:view withKeyPath:windowTitleKeyPath options:nil];
return view;
}