mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 07:02:39 +00:00
fixed nil usage warnings
Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
@@ -165,7 +165,8 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
|||||||
|
|
||||||
- (void)clearSelection {
|
- (void)clearSelection {
|
||||||
[_outlineView deselectAll:nil];
|
[_outlineView deselectAll:nil];
|
||||||
[self outlineViewSelectionDidChange:nil];
|
NSNotification *notification = [NSNotification notificationWithName:NSOutlineViewSelectionDidChangeNotification object:_outlineView];
|
||||||
|
[self outlineViewSelectionDidChange:notification];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_didBecomeFirstResponder:(NSNotification *)notification {
|
- (void)_didBecomeFirstResponder:(NSNotification *)notification {
|
||||||
@@ -219,7 +220,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
|||||||
NSString *titleKeyPath = [NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(title))];
|
NSString *titleKeyPath = [NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(title))];
|
||||||
[[view imageView] bind:NSValueBinding toObject:item withKeyPath:iconImageKeyPath options:nil];
|
[[view imageView] bind:NSValueBinding toObject:item withKeyPath:iconImageKeyPath options:nil];
|
||||||
[[view textField] bind:NSValueBinding toObject:item withKeyPath:titleKeyPath options:nil];
|
[[view textField] bind:NSValueBinding toObject:item withKeyPath:titleKeyPath options:nil];
|
||||||
|
|
||||||
|
|
||||||
NSString *entriesCountKeyPath = [[NSString alloc] initWithFormat:@"%@.%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(entries)), @"@count"];
|
NSString *entriesCountKeyPath = [[NSString alloc] initWithFormat:@"%@.%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(entries)), @"@count"];
|
||||||
[[view textField] bind:NSStringFromSelector(@selector(count)) toObject:item withKeyPath:entriesCountKeyPath options:nil];
|
[[view textField] bind:NSStringFromSelector(@selector(count)) toObject:item withKeyPath:entriesCountKeyPath options:nil];
|
||||||
@@ -269,7 +270,8 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
|||||||
- (void)outlineView:(NSOutlineView *)outlineView didRemoveRowView:(NSTableRowView *)rowView forRow:(NSInteger)row {
|
- (void)outlineView:(NSOutlineView *)outlineView didRemoveRowView:(NSTableRowView *)rowView forRow:(NSInteger)row {
|
||||||
/* Deletion of an item */
|
/* Deletion of an item */
|
||||||
if(row == -1) {
|
if(row == -1) {
|
||||||
[self outlineViewSelectionDidChange:nil];
|
NSNotification *notification = [NSNotification notificationWithName:NSOutlineViewSelectionDidChangeNotification object:outlineView];
|
||||||
|
[self outlineViewSelectionDidChange:notification];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,7 +281,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
|||||||
if(![document validateUserInterfaceItem:menuItem]) {
|
if(![document validateUserInterfaceItem:menuItem]) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
KPKGroup *group = [[self currentTargetNode] asGroup];
|
KPKGroup *group = [self currentTargetNode].asGroup;
|
||||||
return group.isTrash && group.isTrashed;
|
return group.isTrash && group.isTrashed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user