mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 16:22:21 +00:00
Fixed #64 Attachment count is now displayable as a column in the entry view
This commit is contained in:
Submodule KeePassKit updated: a232bbd601...76975731c3
File diff suppressed because it is too large
Load Diff
@@ -149,6 +149,9 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
|||||||
NSTableColumn *attachmentsColumn = [[NSTableColumn alloc] initWithIdentifier:MPEntryTableAttachmentColumnIdentifier];
|
NSTableColumn *attachmentsColumn = [[NSTableColumn alloc] initWithIdentifier:MPEntryTableAttachmentColumnIdentifier];
|
||||||
NSTableColumn *notesColumn = [[NSTableColumn alloc] initWithIdentifier:MPEntryTableNotesColumnIdentifier];
|
NSTableColumn *notesColumn = [[NSTableColumn alloc] initWithIdentifier:MPEntryTableNotesColumnIdentifier];
|
||||||
NSTableColumn *modifiedColumn = [[NSTableColumn alloc] initWithIdentifier:MPEntryTableModfiedColumnIdentifier];
|
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:notesColumn];
|
||||||
[self.entryTable addTableColumn:attachmentsColumn];
|
[self.entryTable addTableColumn:attachmentsColumn];
|
||||||
[self.entryTable addTableColumn:modifiedColumn];
|
[self.entryTable addTableColumn:modifiedColumn];
|
||||||
@@ -232,7 +235,7 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
|||||||
[[view imageView] setImage:entry.iconImage];
|
[[view imageView] setImage:entry.iconImage];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( isPasswordColum ) {
|
else if(isPasswordColum) {
|
||||||
view = [tableView makeViewWithIdentifier:_MPTAbleSecurCellView owner:self];
|
view = [tableView makeViewWithIdentifier:_MPTAbleSecurCellView owner:self];
|
||||||
NSDictionary *options = @{ NSValueTransformerBindingOption : [NSValueTransformer valueTransformerForName:MPStringLengthValueTransformerName] };
|
NSDictionary *options = @{ NSValueTransformerBindingOption : [NSValueTransformer valueTransformerForName:MPStringLengthValueTransformerName] };
|
||||||
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"password" options:options];
|
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"password" options:options];
|
||||||
@@ -242,18 +245,17 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
|||||||
if(isURLColumn) {
|
if(isURLColumn) {
|
||||||
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"url" options:nil];
|
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"url" options:nil];
|
||||||
}
|
}
|
||||||
else if( isUsernameColumn) {
|
else if(isUsernameColumn) {
|
||||||
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"username" options:nil];
|
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"username" options:nil];
|
||||||
}
|
}
|
||||||
else if( isNotesColumn ) {
|
else if(isNotesColumn) {
|
||||||
NSDictionary *options = @{ NSValueTransformerNameBindingOption : MPStripLineBreaksTransformerName };
|
NSDictionary *options = @{ NSValueTransformerNameBindingOption : MPStripLineBreaksTransformerName };
|
||||||
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"notes" options:options];
|
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"notes" options:options];
|
||||||
}
|
}
|
||||||
else if( isAttachmentColumn ) {
|
else if(isAttachmentColumn) {
|
||||||
[[view textField] setStringValue:@""];
|
[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"binaries.@count" options:nil];
|
||||||
//[[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"countOfBinaries" options:nil];
|
|
||||||
}
|
}
|
||||||
else if( isModifedColumn ) {
|
else if(isModifedColumn) {
|
||||||
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||||
[formatter setDateStyle:NSDateFormatterMediumStyle];
|
[formatter setDateStyle:NSDateFormatterMediumStyle];
|
||||||
[formatter setTimeStyle:NSDateFormatterMediumStyle];
|
[formatter setTimeStyle:NSDateFormatterMediumStyle];
|
||||||
|
|||||||
Reference in New Issue
Block a user