mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 12:52:21 +00:00
More use of properties. Fixed wrongfull controller bindings
This commit is contained in:
@@ -368,8 +368,8 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
|
||||
if(!document.selectedGroup && !document.hasSearch) {
|
||||
/* no group selection out of search is wrong */
|
||||
[self.entryArrayController unbind:NSContentArrayBinding];
|
||||
[self.entryArrayController setContent:nil];
|
||||
//[self.entryArrayController unbind:NSContentArrayBinding];
|
||||
self.entryArrayController.content = nil;
|
||||
return;
|
||||
}
|
||||
/*
|
||||
@@ -387,7 +387,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
return; // we are showing the correct object right now.
|
||||
}
|
||||
}
|
||||
[self.entryArrayController bind:NSContentArrayBinding toObject:document.selectedGroup withKeyPath:NSStringFromSelector(@selector(entries)) options:nil];
|
||||
self.entryArrayController.content = document.selectedGroup.entries;
|
||||
}
|
||||
[self _updateContextBar];
|
||||
}
|
||||
@@ -422,8 +422,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
NSArray *result = [notification userInfo][kMPDocumentSearchResultsKey];
|
||||
NSAssert(result != nil, @"Resutls should never be nil");
|
||||
self.filteredEntries = result;
|
||||
[self.entryArrayController unbind:NSContentArrayBinding];
|
||||
[self.entryArrayController setContent:self.filteredEntries];
|
||||
self.entryArrayController.content = self.filteredEntries;
|
||||
[[self.entryTable tableColumnWithIdentifier:MPEntryTableParentColumnIdentifier] setHidden:NO];
|
||||
}
|
||||
|
||||
@@ -433,8 +432,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
MPDocument *document = [[self windowController] document];
|
||||
document.selectedItem = document.selectedGroup;
|
||||
if( nil == document.selectedItem && nil == document.selectedGroup ) {
|
||||
[self.entryArrayController unbind:NSContentArrayBinding];
|
||||
[self.entryArrayController setContent:nil];
|
||||
self.entryArrayController.content = nil;
|
||||
}
|
||||
[self _updateContextBar];
|
||||
}
|
||||
@@ -456,7 +454,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
[self _showContextBar];
|
||||
/* TODO: Show modification date column if not present? */
|
||||
MPDocument *document = [[self windowController] document];
|
||||
[self.entryArrayController bind:NSContentArrayBinding toObject:document.selectedEntry withKeyPath:NSStringFromSelector(@selector(history)) options:nil];
|
||||
self.entryArrayController.content = document.selectedEntry.history;
|
||||
}
|
||||
|
||||
- (void)_didExitHistory:(NSNotification *)notification {
|
||||
|
||||
Reference in New Issue
Block a user