modern Objective-C

This commit is contained in:
michael starke
2016-02-25 19:49:28 +01:00
parent eb6e6bcaa9
commit c4eb499cf6

View File

@@ -393,25 +393,25 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
} }
- (void)focusGroups:(id)sender { - (void)focusGroups:(id)sender {
[[self window] makeFirstResponder:[self.outlineViewController reconmendedFirstResponder]]; [self.window makeFirstResponder:[self.outlineViewController reconmendedFirstResponder]];
} }
- (void)focusInspector:(id)sender { - (void)focusInspector:(id)sender {
[[self window] makeFirstResponder:[self.inspectorViewController reconmendedFirstResponder]]; [self.window makeFirstResponder:[self.inspectorViewController reconmendedFirstResponder]];
} }
- (void)showEntries { - (void)showEntries {
NSView *contentView = [[self window] contentView]; NSView *contentView = self.window.contentView;
if(self.splitView == contentView) { if(self.splitView == contentView) {
return; // We are displaying the entries already return; // We are displaying the entries already
} }
if([[contentView subviews] count] == 1) { if(contentView.subviews.count == 1) {
[[contentView subviews][0] removeFromSuperviewWithoutNeedingDisplay]; [contentView.subviews[0] removeFromSuperviewWithoutNeedingDisplay];
} }
[contentView addSubview:self.splitView]; [contentView addSubview:self.splitView];
NSView *outlineView = [self.outlineViewController view]; NSView *outlineView = self.outlineViewController.view;
NSView *inspectorView = [self.inspectorViewController view]; NSView *inspectorView = self.inspectorViewController.view;
NSView *entryView = [self.entryViewController view]; NSView *entryView = self.entryViewController.view;
/* /*
The current easy way to prevent layout hiccups is to add the inspect The current easy way to prevent layout hiccups is to add the inspect