mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-24 07:39:54 +00:00
Fixed memory leaks
Introduced Sorting
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
@property (retain) NSMenu *menu;
|
||||
|
||||
|
||||
- (void)_didUpdateData:(NSNotification *)notification;
|
||||
- (NSMenu *)_contextMenu;
|
||||
- (KdbGroup *)_clickedOrSelectedGroup;
|
||||
|
||||
@@ -38,6 +39,18 @@
|
||||
if (self) {
|
||||
self.outlineDelegate = [[[MPOutlineViewDelegate alloc] init] autorelease];
|
||||
self.datasource = [[[MPOutlineDataSource alloc] init] autorelease];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(_didUpdateData:)
|
||||
name:MPDocumentDidAddGroupNotification
|
||||
object:[[self windowController] document]];
|
||||
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(_didUpdateData:)
|
||||
name:MPDocumentDidDelteGroupNotification
|
||||
object:[[self windowController] document]];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -116,5 +129,9 @@
|
||||
return [self.outlineView itemAtRow:row];
|
||||
}
|
||||
|
||||
- (void)_didUpdateData:(NSNotification *)notification {
|
||||
[self.outlineView reloadData];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user