From d5250aeb6bcb94e5ae155ce258b81e7de9a8170b Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Wed, 28 Oct 2009 07:47:14 +0000 Subject: [PATCH] Correct indentation. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28901 72102866-910b-0410-8b05-ffd578937521 --- Source/NSProgressIndicator.m | 69 ++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/Source/NSProgressIndicator.m b/Source/NSProgressIndicator.m index f821d2316..f1c5d25ad 100644 --- a/Source/NSProgressIndicator.m +++ b/Source/NSProgressIndicator.m @@ -446,51 +446,54 @@ static NSImage *spinningImages[MaxCount]; - (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; + self = [super initWithCoder: aDecoder]; + if (!self) + return nil; + if ([aDecoder allowsKeyedCoding]) { // id matrix = [aDecoder decodeObjectForKey: @"NSDrawMatrix"]; if ([aDecoder containsValueForKey: @"NSMaxValue"]) { - int max = [aDecoder decodeDoubleForKey: @"NSMaxValue"]; - - [self setMaxValue: max]; - } + int max = [aDecoder decodeDoubleForKey: @"NSMaxValue"]; + + [self setMaxValue: max]; + } if ([aDecoder containsValueForKey: @"NSMinValue"]) { - int min = [aDecoder decodeDoubleForKey: @"NSMinValue"]; - - [self setMinValue: min]; - } + int min = [aDecoder decodeDoubleForKey: @"NSMinValue"]; + + [self setMinValue: min]; + } if ([aDecoder containsValueForKey: @"NSpiFlags"]) { - int flags = [aDecoder decodeIntForKey: @"NSpiFlags"]; - - _isIndeterminate = ((flags & 2) == 2); - // ignore the rest, since they are not pertinent to GNUstep. - } - + int flags = [aDecoder decodeIntForKey: @"NSpiFlags"]; + + _isIndeterminate = ((flags & 2) == 2); + // ignore the rest, since they are not pertinent to GNUstep. + } + // things which Gorm encodes, but IB doesn't care about. if ([aDecoder containsValueForKey: @"GSDoubleValue"]) - { - _doubleValue = [aDecoder decodeDoubleForKey: @"GSDoubleValue"]; - } + { + _doubleValue = [aDecoder decodeDoubleForKey: @"GSDoubleValue"]; + } if ([aDecoder containsValueForKey: @"GSIsBezeled"]) - { - _isBezeled = [aDecoder decodeBoolForKey: @"GSIsBezeled"]; - } + { + _isBezeled = [aDecoder decodeBoolForKey: @"GSIsBezeled"]; + } if ([aDecoder containsValueForKey: @"GSIsVertical"]) - { - _isVertical = [aDecoder decodeBoolForKey: @"GSIsVertical"]; - } + { + _isVertical = [aDecoder decodeBoolForKey: @"GSIsVertical"]; + } if ([aDecoder containsValueForKey: @"GSUsesThreadAnimation"]) - { - _usesThreadedAnimation = [aDecoder decodeBoolForKey: @"GSUsesThreadAnimation"]; - } + { + _usesThreadedAnimation = [aDecoder decodeBoolForKey: @"GSUsesThreadAnimation"]; + } if ([aDecoder containsValueForKey: @"GSAnimationDelay"]) - { - _animationDelay = [aDecoder decodeDoubleForKey: @"GSAnimationDelay"]; - } + { + _animationDelay = [aDecoder decodeDoubleForKey: @"GSAnimationDelay"]; + } } else { @@ -511,7 +514,11 @@ static NSImage *spinningImages[MaxCount]; @implementation NSProgressIndicator (GNUstepExtensions) -- (BOOL)isVertical { return _isVertical; } +- (BOOL)isVertical +{ + return _isVertical; +} + - (void)setVertical:(BOOL)flag { if (_isVertical != flag)