Correct indentation.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28901 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2009-10-28 07:47:14 +00:00
parent 4974760a67
commit 10130ce9e9

View file

@ -446,51 +446,54 @@ static NSImage *spinningImages[MaxCount];
- (id)initWithCoder:(NSCoder *)aDecoder - (id)initWithCoder:(NSCoder *)aDecoder
{ {
self = [super initWithCoder:aDecoder]; self = [super initWithCoder: aDecoder];
if (!self)
return nil;
if ([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
// id matrix = [aDecoder decodeObjectForKey: @"NSDrawMatrix"]; // id matrix = [aDecoder decodeObjectForKey: @"NSDrawMatrix"];
if ([aDecoder containsValueForKey: @"NSMaxValue"]) if ([aDecoder containsValueForKey: @"NSMaxValue"])
{ {
int max = [aDecoder decodeDoubleForKey: @"NSMaxValue"]; int max = [aDecoder decodeDoubleForKey: @"NSMaxValue"];
[self setMaxValue: max]; [self setMaxValue: max];
} }
if ([aDecoder containsValueForKey: @"NSMinValue"]) if ([aDecoder containsValueForKey: @"NSMinValue"])
{ {
int min = [aDecoder decodeDoubleForKey: @"NSMinValue"]; int min = [aDecoder decodeDoubleForKey: @"NSMinValue"];
[self setMinValue: min]; [self setMinValue: min];
} }
if ([aDecoder containsValueForKey: @"NSpiFlags"]) if ([aDecoder containsValueForKey: @"NSpiFlags"])
{ {
int flags = [aDecoder decodeIntForKey: @"NSpiFlags"]; int flags = [aDecoder decodeIntForKey: @"NSpiFlags"];
_isIndeterminate = ((flags & 2) == 2); _isIndeterminate = ((flags & 2) == 2);
// ignore the rest, since they are not pertinent to GNUstep. // ignore the rest, since they are not pertinent to GNUstep.
} }
// things which Gorm encodes, but IB doesn't care about. // things which Gorm encodes, but IB doesn't care about.
if ([aDecoder containsValueForKey: @"GSDoubleValue"]) if ([aDecoder containsValueForKey: @"GSDoubleValue"])
{ {
_doubleValue = [aDecoder decodeDoubleForKey: @"GSDoubleValue"]; _doubleValue = [aDecoder decodeDoubleForKey: @"GSDoubleValue"];
} }
if ([aDecoder containsValueForKey: @"GSIsBezeled"]) if ([aDecoder containsValueForKey: @"GSIsBezeled"])
{ {
_isBezeled = [aDecoder decodeBoolForKey: @"GSIsBezeled"]; _isBezeled = [aDecoder decodeBoolForKey: @"GSIsBezeled"];
} }
if ([aDecoder containsValueForKey: @"GSIsVertical"]) if ([aDecoder containsValueForKey: @"GSIsVertical"])
{ {
_isVertical = [aDecoder decodeBoolForKey: @"GSIsVertical"]; _isVertical = [aDecoder decodeBoolForKey: @"GSIsVertical"];
} }
if ([aDecoder containsValueForKey: @"GSUsesThreadAnimation"]) if ([aDecoder containsValueForKey: @"GSUsesThreadAnimation"])
{ {
_usesThreadedAnimation = [aDecoder decodeBoolForKey: @"GSUsesThreadAnimation"]; _usesThreadedAnimation = [aDecoder decodeBoolForKey: @"GSUsesThreadAnimation"];
} }
if ([aDecoder containsValueForKey: @"GSAnimationDelay"]) if ([aDecoder containsValueForKey: @"GSAnimationDelay"])
{ {
_animationDelay = [aDecoder decodeDoubleForKey: @"GSAnimationDelay"]; _animationDelay = [aDecoder decodeDoubleForKey: @"GSAnimationDelay"];
} }
} }
else else
{ {
@ -511,7 +514,11 @@ static NSImage *spinningImages[MaxCount];
@implementation NSProgressIndicator (GNUstepExtensions) @implementation NSProgressIndicator (GNUstepExtensions)
- (BOOL)isVertical { return _isVertical; } - (BOOL)isVertical
{
return _isVertical;
}
- (void)setVertical:(BOOL)flag - (void)setVertical:(BOOL)flag
{ {
if (_isVertical != flag) if (_isVertical != flag)