From c0dc27bfb033fbd94013f593f3cf242a5777a252 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Thu, 21 Feb 2013 21:36:35 +0000 Subject: Fix build. --- Source/SPFavoritesOutlineView.h | 2 ++ Source/SPFavoritesOutlineView.m | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'Source') diff --git a/Source/SPFavoritesOutlineView.h b/Source/SPFavoritesOutlineView.h index d2fa0846..b2c718b6 100644 --- a/Source/SPFavoritesOutlineView.h +++ b/Source/SPFavoritesOutlineView.h @@ -33,6 +33,8 @@ @interface SPFavoritesOutlineView : NSOutlineView { SInt32 systemVersion; + + BOOL justGainedFocus; } @property (assign) BOOL justGainedFocus; diff --git a/Source/SPFavoritesOutlineView.m b/Source/SPFavoritesOutlineView.m index 6972309b..4622f310 100644 --- a/Source/SPFavoritesOutlineView.m +++ b/Source/SPFavoritesOutlineView.m @@ -39,7 +39,7 @@ static NSUInteger SPFavoritesOutlineViewUnindent = 6; @synthesize justGainedFocus; -- (void) awakeFromNib +- (void)awakeFromNib { systemVersion = 0; Gestalt(gestaltSystemVersion, &systemVersion); @@ -57,6 +57,7 @@ static NSUInteger SPFavoritesOutlineViewUnindent = 6; - (BOOL)resignFirstResponder { [self setJustGainedFocus:NO]; + return [super resignFirstResponder];; } @@ -93,9 +94,11 @@ static NSUInteger SPFavoritesOutlineViewUnindent = 6; } else if ([[event characters] length] && [[event characters] characterAtIndex:0] == NSTabCharacter) { if (([event modifierFlags] & NSShiftKeyMask) != NSShiftKeyMask) { [[self window] selectKeyViewFollowingView:self]; - } else { + } + else { [[self window] selectKeyViewPrecedingView:self]; } + return; } @@ -172,11 +175,10 @@ static NSUInteger SPFavoritesOutlineViewUnindent = 6; */ - (void)highlightSelectionInClipRect:(NSRect)clipRect { - // Only proceed if a the delegate is a SPConnectionControllerDelegate and a favoruite being edited - if ([[self delegate] isKindOfClass:[SPConnectionController class]] - && [(SPConnectionController *)[self delegate] isEditingConnection] - && [(SPConnectionController *)[self delegate] selectedFavorite]) + if ([[self delegate] isKindOfClass:[SPConnectionController class]] && + [(SPConnectionController *)[self delegate] isEditingConnection] && + [(SPConnectionController *)[self delegate] selectedFavorite]) { // Draw an editing dot instead of highlighting the whole row @@ -193,6 +195,7 @@ static NSUInteger SPFavoritesOutlineViewUnindent = 6; [dotGradient drawInRect:dotRect angle:90.f]; [NSGraphicsContext restoreGraphicsState]; + return; } -- cgit v1.2.3