mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 11:42:30 +00:00
Introduced KVO compliance for group and entry manipulation
Converted outline view to use NSTreeController
This commit is contained in:
@@ -141,6 +141,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
|
||||
[self.entryTable setDelegate:self];
|
||||
[self.entryTable setDoubleAction:@selector(_columnDoubleClick:)];
|
||||
[self.entryTable setTarget:self];
|
||||
[self.entryTable setFloatsGroupRows:NO];
|
||||
[self _setupEntryMenu];
|
||||
|
||||
NSTableColumn *parentColumn = [self.entryTable tableColumns][0];
|
||||
@@ -216,6 +217,9 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
|
||||
|
||||
return view;
|
||||
}
|
||||
- (void)tableView:(NSTableView *)tableView didAddRowView:(NSTableRowView *)rowView forRow:(NSInteger)row {
|
||||
NSLog(@"didAddRowViewForRow: %ld color:%@ isFloating:%i", (long)row, rowView.backgroundColor, rowView.isFloating);
|
||||
}
|
||||
|
||||
- (void)tableViewSelectionDidChange:(NSNotification *)notification {
|
||||
if([self.entryTable selectedRow] < 0) {
|
||||
@@ -469,12 +473,14 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
|
||||
if(!_activeGroup) {
|
||||
return; // Entries are not allowed in root group
|
||||
}
|
||||
|
||||
MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument];
|
||||
[document createEntry:_activeGroup];
|
||||
}
|
||||
|
||||
- (void)deleteEntry:(id)sender {
|
||||
// TODO:
|
||||
KdbEntry *entry =[self _clickedOrSelectedEntry];
|
||||
[entry.parent removeEntryUndoable:entry];
|
||||
}
|
||||
|
||||
- (void)_toggleFilterSpace:(id)sender {
|
||||
|
||||
Reference in New Issue
Block a user