mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-15 04:52:29 +00:00
Fixed #39 Overall search behavior ironed out.
Fixed #71 Added A simple entropy calculation for purely random generated passwords Added separate Views for Group and Entry Inspector Added "no Selection" view for Inpsector
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import "MPCustomFieldTableViewDelegate.h"
|
||||
#import "MPInspectorViewController.h"
|
||||
#import "MPDocument.h"
|
||||
#import "MPCustomFieldTableCellView.h"
|
||||
|
||||
#import "Kdb4Node.h"
|
||||
@@ -16,13 +16,14 @@
|
||||
@implementation MPCustomFieldTableViewDelegate
|
||||
|
||||
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
|
||||
if(![self.viewController.selectedEntry isKindOfClass:[Kdb4Entry class]]) {
|
||||
MPDocument *document = [[[tableView window] windowController] document];
|
||||
if(![document.selectedEntry isKindOfClass:[Kdb4Entry class]]) {
|
||||
return nil;
|
||||
}
|
||||
Kdb4Entry *entry = (Kdb4Entry *)self.viewController.selectedEntry;
|
||||
Kdb4Entry *entry = (Kdb4Entry *)document.selectedEntry;
|
||||
MPCustomFieldTableCellView *view = [tableView makeViewWithIdentifier:@"SelectedCell" owner:tableView];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_customFieldFrameChanged:) name:NSViewFrameDidChangeNotification object:view];
|
||||
if([self.viewController.selectedEntry isKindOfClass:[Kdb4Entry class]]) {
|
||||
if([document.selectedEntry isKindOfClass:[Kdb4Entry class]]) {
|
||||
StringField *stringField = entry.stringFields[row];
|
||||
NSDictionary *validateOptions = @{ NSValidatesImmediatelyBindingOption: @YES };
|
||||
[view.labelTextField bind:NSValueBinding toObject:stringField withKeyPath:MPStringFieldKeyUndoableKey options:validateOptions];
|
||||
|
||||
Reference in New Issue
Block a user