From c18178416b00e635937037ddf6f9eaa13c9aba6e Mon Sep 17 00:00:00 2001 From: David Keegan Date: Thu, 21 Jul 2011 20:09:41 -0700 Subject: [PATCH] Fixing compiler warnings and formatting --- Source/DBPrefsWindowController.h | 1 + Source/DBPrefsWindowController.m | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Source/DBPrefsWindowController.h b/Source/DBPrefsWindowController.h index cc208de..88dabf1 100644 --- a/Source/DBPrefsWindowController.h +++ b/Source/DBPrefsWindowController.h @@ -67,6 +67,7 @@ - (BOOL)shiftSlowsAnimation; - (void)setShiftSlowsAnimation:(BOOL)slows; +- (void)toggleActivePreferenceView:(NSToolbarItem *)toolbarItem; - (void)displayViewForIdentifier:(NSString *)identifier animate:(BOOL)animate; - (void)crossFadeView:(NSView *)oldView withView:(NSView *)newView; - (NSRect)frameForView:(NSView *)view; diff --git a/Source/DBPrefsWindowController.m b/Source/DBPrefsWindowController.m index 9e43c6f..c67c415 100644 --- a/Source/DBPrefsWindowController.m +++ b/Source/DBPrefsWindowController.m @@ -56,7 +56,7 @@ - (id)initWithWindow:(NSWindow *)window viewAnimation = [[NSViewAnimation alloc] init]; [viewAnimation setAnimationBlockingMode:NSAnimationNonblocking]; [viewAnimation setAnimationCurve:NSAnimationEaseInOut]; - [viewAnimation setDelegate:self]; + [viewAnimation setDelegate:(id)self]; [self setCrossFade:YES]; [self setShiftSlowsAnimation:YES]; @@ -206,7 +206,7 @@ - (IBAction)showWindow:(id)sender [toolbar setAutosavesConfiguration:NO]; [toolbar setSizeMode:NSToolbarSizeModeDefault]; [toolbar setDisplayMode:NSToolbarDisplayModeIconAndLabel]; - [toolbar setDelegate:self]; + [toolbar setDelegate:(id)self]; [[self window] setToolbar:toolbar]; [toolbar release]; } @@ -365,16 +365,16 @@ - (void)animationDidEnd:(NSAnimation *)animation { NSView *subview; - // Get a list of all of the views in the window. Hopefully - // at this point there are two. One is visible and one is hidden. + // Get a list of all of the views in the window. Hopefully + // at this point there are two. One is visible and one is hidden. NSEnumerator *subviewsEnum = [[contentSubview subviews] reverseObjectEnumerator]; - // This is our visible view. Just get past it. - subview = [subviewsEnum nextObject]; + // This is our visible view. Just get past it. + [subviewsEnum nextObject]; - // Remove everything else. There should be just one, but - // if the user does a lot of fast clicking, we might have - // more than one to remove. + // Remove everything else. There should be just one, but + // if the user does a lot of fast clicking, we might have + // more than one to remove. while ((subview = [subviewsEnum nextObject]) != nil) { [subview removeFromSuperviewWithoutNeedingDisplay]; }