aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2013-02-21 21:36:35 +0000
committerstuconnolly <stuart02@gmail.com>2013-02-21 21:36:35 +0000
commitc0dc27bfb033fbd94013f593f3cf242a5777a252 (patch)
treece56b7eafaff205291839b7397c675d85d6d6a4a
parent77b2f3d777bc743b7b96a9f2267d1a89d704510d (diff)
downloadsequelpro-c0dc27bfb033fbd94013f593f3cf242a5777a252.tar.gz
sequelpro-c0dc27bfb033fbd94013f593f3cf242a5777a252.tar.bz2
sequelpro-c0dc27bfb033fbd94013f593f3cf242a5777a252.zip
Fix build.
-rw-r--r--Source/SPFavoritesOutlineView.h2
-rw-r--r--Source/SPFavoritesOutlineView.m15
2 files changed, 11 insertions, 6 deletions
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;
}