mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-15 04:52:29 +00:00
Fixed possible crash issue with deallocated delegate
Fixed codestyle
This commit is contained in:
@@ -66,21 +66,25 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
|
[self.outlineView setDelegate:nil];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)didLoadView {
|
- (void)didLoadView {
|
||||||
[_outlineView setDelegate:self];
|
[self.outlineView setDelegate:self];
|
||||||
[_outlineView setMenu:[self _contextMenu]];
|
[self.outlineView setMenu:[self _contextMenu]];
|
||||||
[_outlineView setAllowsEmptySelection:YES];
|
[self.outlineView setAllowsEmptySelection:YES];
|
||||||
[_outlineView setFloatsGroupRows:NO];
|
[self.outlineView setFloatsGroupRows:NO];
|
||||||
[_outlineView registerForDraggedTypes:@[ KPKGroupUTI, KPKEntryUTI ]];
|
[self.outlineView registerForDraggedTypes:@[ KPKGroupUTI, KPKEntryUTI ]];
|
||||||
[_outlineView setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES];
|
[self.outlineView setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES];
|
||||||
[_bottomBar setBorderType:HNHBorderTop|HNHBorderHighlight];
|
[self.bottomBar setBorderType:HNHBorderTop|HNHBorderHighlight];
|
||||||
[_addGroupButton setAction:[MPActionHelper actionOfType:MPActionAddGroup]];
|
[self.addGroupButton setAction:[MPActionHelper actionOfType:MPActionAddGroup]];
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
selector:@selector(_didBecomeFirstResponder:)
|
selector:@selector(_didBecomeFirstResponder:)
|
||||||
name:MPDidActivateViewNotification
|
name:MPDidActivateViewNotification
|
||||||
object:_outlineView];
|
object:self.outlineView];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user