mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 05:29:26 +00:00
Simple Display of relevant Data now working
This commit is contained in:
@@ -10,9 +10,17 @@
|
||||
#import "MPIconHelper.h"
|
||||
#import "KdbLib.h"
|
||||
|
||||
NSString *const MPOutlineViewDidChangeGroupSelection = @"MPOutlineViewDidChangeGroupSelection";
|
||||
|
||||
NSString *const _MPOutlineViewDataViewIdentifier = @"DataCell";
|
||||
NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
||||
|
||||
@interface MPOutlineViewDelegate ()
|
||||
|
||||
@property (assign) KdbGroup *selectedGroup;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPOutlineViewDelegate
|
||||
|
||||
- (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item {
|
||||
@@ -47,4 +55,12 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
||||
return (nil != [group parent]);
|
||||
}
|
||||
|
||||
- (void)outlineViewSelectionDidChange:(NSNotification *)notification {
|
||||
NSOutlineView *outlineView = [notification object];
|
||||
KdbGroup *selectedGroup = [outlineView itemAtRow:[outlineView selectedRow]];
|
||||
self.selectedGroup = selectedGroup;
|
||||
NSLog(@"Selected: %@", self.selectedGroup);
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPOutlineViewDidChangeGroupSelection object:self userInfo:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user