Fixed #64 Attachment count is now displayable as a column in the entry view

This commit is contained in:
michael starke
2013-10-15 23:20:46 +02:00
parent 8a7b2f8085
commit 5d90b23569
3 changed files with 305 additions and 1875 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -149,6 +149,9 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
NSTableColumn *attachmentsColumn = [[NSTableColumn alloc] initWithIdentifier:MPEntryTableAttachmentColumnIdentifier];
NSTableColumn *notesColumn = [[NSTableColumn alloc] initWithIdentifier:MPEntryTableNotesColumnIdentifier];
NSTableColumn *modifiedColumn = [[NSTableColumn alloc] initWithIdentifier:MPEntryTableModfiedColumnIdentifier];
[notesColumn setMinWidth:40.0];
[attachmentsColumn setMinWidth:40.0];
[modifiedColumn setMinWidth:40.0];
[self.entryTable addTableColumn:notesColumn];
[self.entryTable addTableColumn:attachmentsColumn];
[self.entryTable addTableColumn:modifiedColumn];
@@ -250,8 +253,7 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"notes" options:options];
}
else if(isAttachmentColumn) {
[[view textField] setStringValue:@""];
//[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"countOfBinaries" options:nil];
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"binaries.@count" options:nil];
}
else if(isModifedColumn) {
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];