tidyups and minor theme tiling updates.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23871 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2006-10-15 08:34:47 +00:00
parent 477b1ee968
commit cc3cafa874
58 changed files with 422 additions and 230 deletions

View file

@ -1,3 +1,66 @@
2006-10-15 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSBrowser.m:
* Source/NSSound.m:
* Source/NSTextAttachment.m:
* Source/NSPopUpButtonCell.m:
* Source/NSPanel.m:
* Source/NSImageCell.m:
* Source/NSSliderCell.m:
* Source/GSGormLoader.m:
* Source/NSParagraphStyle.m:
* Source/NSFormCell.m:
* Source/NSMenu.m:
* Source/NSWindow.m:
* Source/NSButtonCell.m:
* Source/NSImageView.m:
* Source/NSActionCell.m:
* Source/NSDataLinkManager.m:
* Source/NSClipView.m:
* Source/NSBitmapImageRep.m:
* Source/NSTextFieldCell.m:
* Source/NSColorWell.m:
* Source/GSTextStorage.m:
* Source/NSApplication.m:
* Source/NSTableColumn.m:
* Source/GSVbox.m:
* Source/NSNib.m:
* Source/NSCachedImageRep.m:
* Source/NSPrinter.m:
* Source/NSTextContainer.m:
* Source/GSNibLoader.m:
* Source/GSNibCompatibility.m:
* Source/GSTrackingRect.m:
* Source/NSSearchFieldCell.m:
* Source/NSControl.m:
* Source/GSHbox.m:
* Source/NSProgressIndicator.m:
* Source/GSModelLoaderFactory.m:
* Source/NSTextStorage.m:
* Source/NSTextView.m:
* Source/NSDocumentController.m:
* Source/NSMenuView.m:
* Source/NSSecureTextField.m:
* Source/NSComboBoxCell.m:
* Source/NSImage.m:
* Source/NSStepperCell.m:
* Source/NSDataLink.m:
* Source/NSScrollView.m:
* Source/NSBundleAdditions.m:
* Source/NSCell.m:
* Source/GSTable.m:
* Source/NSTableView.m:
* Source/NSBrowserCell.m:
* Source/NSSelection.m:
* Source/NSTextField.m:
* Source/NSView.m:
* Source/NSDocument.m:
Fixup some minor coding standard violations ... add white space.
* Headers/Additions/GNUstepGUI/GSTheme.h:
* Source/GSTheme.m:
Add control for caching of tiles. Add another fill style for tiling.
Make fill style names avoid possible name clashes by using GS prefix.
2006-10-12 Richard Frith-Macdonald <rfm@gnu.org> 2006-10-12 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSImageView.m: Fix error in initial drag position. * Source/NSImageView.m: Fix error in initial drag position.

View file

@ -147,14 +147,18 @@
@class GSDrawTiles; @class GSDrawTiles;
/** /**
* This defines how the center middle image in a tile array should be * This defines how the values in a tile array should be used when
* used when drawing a rectangle. * drawing a rectangle. Mostly this just effects the center, middle
* image of the rectangle.<br />
* FillStyleMatrix is provided for the use of theme editors wishing
* to display the tile.
*/ */
typedef enum { typedef enum {
FillStyleNone, /** The image is not drawn */ GSThemeFillStyleNone, /** CM image is not drawn */
FillStyleScale, /** The image is scaled to fit */ GSThemeFillStyleScale, /** CM image is scaled to fit */
FillStyleRepeat, /** The image is tiled from bottom left */ GSThemeFillStyleRepeat, /** CM image is tiled from bottom left */
FillStyleCenter /** The image is tiled from the center */ GSThemeFillStyleCenter, /** CM image is tiled from the center */
GSThemeFillStyleMatrix /** a matrix of nine separated images */
} GSThemeFillStyle; } GSThemeFillStyle;
@ -349,9 +353,11 @@ APPKIT_EXPORT NSString *GSThemeDidDeactivateNotification;
* The GUI library uses this internally to handling tiling of image * The GUI library uses this internally to handling tiling of image
* information to draw user interface elements. The tile information * information to draw user interface elements. The tile information
* returned by this method can be passed to the * returned by this method can be passed to the
* -fillRect:withTiles:background:fillStyle: method. * -fillRect:withTiles:background:fillStyle: method.<br />
* The useCache argument controls whether the information is retrieved
* from cache or regenerated from information in the theme bundle.
*/ */
- (GSDrawTiles*) tilesNamed: (NSString*)aName; - (GSDrawTiles*) tilesNamed: (NSString*)aName cache: (BOOL)useCache;
@end @end
/** /**

View file

@ -135,7 +135,7 @@
withZone: zone]; withZone: zone];
// report a problem if there is one. // report a problem if there is one.
if(loaded == NO) if (loaded == NO)
{ {
NSLog(@"Could not load Gorm file: %@",fileName); NSLog(@"Could not load Gorm file: %@",fileName);
} }

View file

@ -160,7 +160,7 @@ enablingXResizing: (BOOL)aFlag
-(void) encodeWithCoder: (NSCoder*)aCoder -(void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeBool: _haveViews forKey: @"GSHaveViews"]; [aCoder encodeBool: _haveViews forKey: @"GSHaveViews"];
[aCoder encodeFloat: _defaultMinXMargin forKey: @"GSDefaultMinXMargin"]; [aCoder encodeFloat: _defaultMinXMargin forKey: @"GSDefaultMinXMargin"];
@ -175,7 +175,7 @@ enablingXResizing: (BOOL)aFlag
-(id) initWithCoder: (NSCoder*)aDecoder -(id) initWithCoder: (NSCoder*)aDecoder
{ {
[super initWithCoder: aDecoder]; [super initWithCoder: aDecoder];
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
_haveViews = [aDecoder decodeBoolForKey: @"GSHaveViews"]; _haveViews = [aDecoder decodeBoolForKey: @"GSHaveViews"];
_defaultMinXMargin = [aDecoder decodeFloatForKey: @"GSDefaultMinXMargin"]; _defaultMinXMargin = [aDecoder decodeFloatForKey: @"GSDefaultMinXMargin"];

View file

@ -63,11 +63,11 @@
{ {
NSComparisonResult result = NSOrderedSame; NSComparisonResult result = NSOrderedSame;
if([self priority] < [loader priority]) if ([self priority] < [loader priority])
{ {
result = NSOrderedAscending; result = NSOrderedAscending;
} }
if([self priority] > [loader priority]) if ([self priority] > [loader priority])
{ {
result = NSOrderedDescending; result = NSOrderedDescending;
} }
@ -85,7 +85,7 @@ static NSMutableDictionary *_modelMap = nil;
NSEnumerator *en = [classes objectEnumerator]; NSEnumerator *en = [classes objectEnumerator];
Class cls = nil; Class cls = nil;
while((cls = [en nextObject]) != nil) while ((cls = [en nextObject]) != nil)
{ {
[self registerModelLoaderClass: cls]; [self registerModelLoaderClass: cls];
} }
@ -93,7 +93,7 @@ static NSMutableDictionary *_modelMap = nil;
+ (void) registerModelLoaderClass: (Class)aClass + (void) registerModelLoaderClass: (Class)aClass
{ {
if(_modelMap == nil) if (_modelMap == nil)
{ {
_modelMap = [[NSMutableDictionary alloc] initWithCapacity: 5]; _modelMap = [[NSMutableDictionary alloc] initWithCapacity: 5];
} }
@ -112,7 +112,7 @@ static NSMutableDictionary *_modelMap = nil;
NSFileManager *mgr = [NSFileManager defaultManager]; NSFileManager *mgr = [NSFileManager defaultManager];
NSString *ext = [modelPath pathExtension]; NSString *ext = [modelPath pathExtension];
if([ext isEqual: @""]) if ([ext isEqual: @""])
{ {
NSArray *objectArray = [_modelMap allValues]; NSArray *objectArray = [_modelMap allValues];
NSArray *sortedArray = [objectArray sortedArrayUsingSelector: NSArray *sortedArray = [objectArray sortedArrayUsingSelector:
@ -120,11 +120,11 @@ static NSMutableDictionary *_modelMap = nil;
NSEnumerator *oen = [sortedArray objectEnumerator]; NSEnumerator *oen = [sortedArray objectEnumerator];
Class cls = nil; Class cls = nil;
while((cls = [oen nextObject]) != nil && result == NO) while ((cls = [oen nextObject]) != nil && result == NO)
{ {
NSString *path = [modelPath stringByAppendingPathExtension: NSString *path = [modelPath stringByAppendingPathExtension:
(NSString *)[cls type]]; (NSString *)[cls type]];
if([mgr isReadableFileAtPath: path]) if ([mgr isReadableFileAtPath: path])
{ {
result = path; result = path;
} }
@ -132,9 +132,9 @@ static NSMutableDictionary *_modelMap = nil;
} }
else else
{ {
if([_modelMap objectForKey: ext] != nil) if ([_modelMap objectForKey: ext] != nil)
{ {
if([mgr isReadableFileAtPath: modelPath]) if ([mgr isReadableFileAtPath: modelPath])
{ {
result = modelPath; result = modelPath;
} }
@ -149,7 +149,7 @@ static NSMutableDictionary *_modelMap = nil;
Class aClass = [GSModelLoaderFactory classForType: type]; Class aClass = [GSModelLoaderFactory classForType: type];
GSModelLoader *loader = nil; GSModelLoader *loader = nil;
if(aClass != nil) if (aClass != nil)
{ {
loader = AUTORELEASE([[aClass alloc] init]); loader = AUTORELEASE([[aClass alloc] init]);
} }
@ -167,7 +167,7 @@ static NSMutableDictionary *_modelMap = nil;
NSString *path = [GSModelLoaderFactory supportedModelFileAtPath: modelPath]; NSString *path = [GSModelLoaderFactory supportedModelFileAtPath: modelPath];
GSModelLoader *result = nil; GSModelLoader *result = nil;
if(path != nil) if (path != nil)
{ {
NSString *ext = [path pathExtension]; NSString *ext = [path pathExtension];
result = [self modelLoaderForFileType: ext]; result = [self modelLoaderForFileType: ext];

View file

@ -70,9 +70,9 @@ static BOOL _isInInterfaceBuilder = NO;
{ {
NSEnumerator *en = [[self subviews] objectEnumerator]; NSEnumerator *en = [[self subviews] objectEnumerator];
id v = nil; id v = nil;
while((v = [en nextObject]) != nil) while ((v = [en nextObject]) != nil)
{ {
if([v window] != [self window] || if ([v window] != [self window] ||
[v superview] != self) [v superview] != self)
{ {
[v _setWindow: [self window]]; [v _setWindow: [self window]];
@ -113,9 +113,9 @@ static BOOL _isInInterfaceBuilder = NO;
wantsToBeColor: (BOOL) wantsToBeColor wantsToBeColor: (BOOL) wantsToBeColor
autoPositionMask: (int) autoPositionMask autoPositionMask: (int) autoPositionMask
{ {
if((self = [super init]) != nil) if ((self = [super init]) != nil)
{ {
if(window != nil) if (window != nil)
{ {
// object members // object members
ASSIGN(_title, [window title]); ASSIGN(_title, [window title]);
@ -163,7 +163,7 @@ static BOOL _isInInterfaceBuilder = NO;
{ {
_windowStyle = [coder decodeIntForKey: @"NSWindowStyleMask"]; _windowStyle = [coder decodeIntForKey: @"NSWindowStyleMask"];
} }
if([coder containsValueForKey: @"NSWindowBacking"]) if ([coder containsValueForKey: @"NSWindowBacking"])
{ {
_backingStoreType = [coder decodeIntForKey: @"NSWindowBacking"]; _backingStoreType = [coder decodeIntForKey: @"NSWindowBacking"];
} }
@ -234,13 +234,13 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) nibInstantiate - (id) nibInstantiate
{ {
if(_realObject == nil) if (_realObject == nil)
{ {
Class aClass; Class aClass;
NSEnumerator *en; NSEnumerator *en;
id v = nil; id v = nil;
if([NSClassSwapper isInInterfaceBuilder]) if ([NSClassSwapper isInInterfaceBuilder])
{ {
aClass = [self baseWindowClass]; aClass = [self baseWindowClass];
} }
@ -290,9 +290,9 @@ static BOOL _isInInterfaceBuilder = NO;
// swap out any views which need to be swapped... // swap out any views which need to be swapped...
en = [[[_realObject contentView] subviews] objectEnumerator]; en = [[[_realObject contentView] subviews] objectEnumerator];
while((v = [en nextObject]) != nil) while ((v = [en nextObject]) != nil)
{ {
if([v respondsToSelector: @selector(nibInstantiate)]) if ([v respondsToSelector: @selector(nibInstantiate)])
{ {
[v nibInstantiate]; [v nibInstantiate];
} }
@ -436,9 +436,9 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) initWithCoder: (NSCoder *)coder - (id) initWithCoder: (NSCoder *)coder
{ {
self = [super initWithCoder: coder]; self = [super initWithCoder: coder];
if(self != nil) if (self != nil)
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
_className = [coder decodeObjectForKey: @"NSClassName"]; _className = [coder decodeObjectForKey: @"NSClassName"];
} }
@ -454,7 +454,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
[coder encodeObject: (id)_className forKey: @"NSClassName"]; [coder encodeObject: (id)_className forKey: @"NSClassName"];
} }
@ -462,10 +462,10 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) nibInstantiate - (id) nibInstantiate
{ {
if(_realObject == nil) if (_realObject == nil)
{ {
Class aClass = NSClassFromString(_className); Class aClass = NSClassFromString(_className);
if(aClass == nil) if (aClass == nil)
{ {
[NSException raise: NSInternalInconsistencyException [NSException raise: NSInternalInconsistencyException
format: @"Unable to find class '%@'", _className]; format: @"Unable to find class '%@'", _className];
@ -520,10 +520,10 @@ static BOOL _isInInterfaceBuilder = NO;
- (id)nibInstantiate - (id)nibInstantiate
{ {
if(_realObject == nil) if (_realObject == nil)
{ {
Class aClass = NSClassFromString(_className); Class aClass = NSClassFromString(_className);
if(aClass == nil) if (aClass == nil)
{ {
[NSException raise: NSInternalInconsistencyException [NSException raise: NSInternalInconsistencyException
format: @"Unable to find class '%@'", _className]; format: @"Unable to find class '%@'", _className];
@ -612,7 +612,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) initWithCoder: (NSCoder *)coder - (id) initWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]); ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]);
ASSIGN(_extension, [coder decodeObjectForKey: @"NSExtension"]); ASSIGN(_extension, [coder decodeObjectForKey: @"NSExtension"]);
@ -628,7 +628,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
[coder encodeObject: (id)_className forKey: @"NSClassName"]; [coder encodeObject: (id)_className forKey: @"NSClassName"];
[coder encodeConditionalObject: (id)_extension forKey: @"NSExtension"]; [coder encodeConditionalObject: (id)_extension forKey: @"NSExtension"];
@ -644,11 +644,11 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) nibInstantiate - (id) nibInstantiate
{ {
if(_object == nil) if (_object == nil)
{ {
Class aClass; Class aClass;
if([NSClassSwapper isInInterfaceBuilder]) if ([NSClassSwapper isInInterfaceBuilder])
{ {
aClass = [self class]; aClass = [self class];
} }
@ -657,7 +657,7 @@ static BOOL _isInInterfaceBuilder = NO;
aClass = NSClassFromString(_className); aClass = NSClassFromString(_className);
} }
if(aClass == nil) if (aClass == nil)
{ {
[NSException raise: NSInternalInconsistencyException [NSException raise: NSInternalInconsistencyException
format: @"Unable to find class '%@'", _className]; format: @"Unable to find class '%@'", _className];
@ -698,11 +698,11 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) nibInstantiate - (id) nibInstantiate
{ {
if(_view == nil) if (_view == nil)
{ {
Class aClass; Class aClass;
if([NSClassSwapper isInInterfaceBuilder]) if ([NSClassSwapper isInInterfaceBuilder])
{ {
aClass = [self class]; aClass = [self class];
} }
@ -711,7 +711,7 @@ static BOOL _isInInterfaceBuilder = NO;
aClass = NSClassFromString(_className); aClass = NSClassFromString(_className);
} }
if(aClass == nil) if (aClass == nil)
{ {
[NSException raise: NSInternalInconsistencyException [NSException raise: NSInternalInconsistencyException
format: @"Unable to find class '%@'", _className]; format: @"Unable to find class '%@'", _className];
@ -731,9 +731,9 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) initWithCoder: (NSCoder *)coder - (id) initWithCoder: (NSCoder *)coder
{ {
self = [super initWithCoder: coder]; self = [super initWithCoder: coder];
if(self != nil) if (self != nil)
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]); ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]);
ASSIGN(_extension, [coder decodeObjectForKey: @"NSExtension"]); ASSIGN(_extension, [coder decodeObjectForKey: @"NSExtension"]);
@ -751,7 +751,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
[super encodeWithCoder: coder]; [super encodeWithCoder: coder];
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
[coder encodeObject: _className forKey: @"NSClassName"]; [coder encodeObject: _className forKey: @"NSClassName"];
[coder encodeObject: _extension forKey: @"NSExtension"]; [coder encodeObject: _extension forKey: @"NSExtension"];
@ -794,23 +794,23 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) initWithCoder: (NSCoder *)coder - (id) initWithCoder: (NSCoder *)coder
{ {
id realObject = nil; id realObject = nil;
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]); ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]);
ASSIGN(_resourceName, [coder decodeObjectForKey: @"NSResourceName"]); ASSIGN(_resourceName, [coder decodeObjectForKey: @"NSResourceName"]);
// this is a hack, but for now it should do. // this is a hack, but for now it should do.
if([_className isEqual: @"NSSound"]) if ([_className isEqual: @"NSSound"])
{ {
realObject = RETAIN([NSSound soundNamed: _resourceName]); realObject = RETAIN([NSSound soundNamed: _resourceName]);
} }
else if([_className isEqual: @"NSImage"]) else if ([_className isEqual: @"NSImage"])
{ {
realObject = RETAIN([NSImage imageNamed: _resourceName]); realObject = RETAIN([NSImage imageNamed: _resourceName]);
} }
// if an object has been substituted, then release the placeholder. // if an object has been substituted, then release the placeholder.
if(realObject != nil) if (realObject != nil)
{ {
RELEASE(self); RELEASE(self);
} }
@ -827,7 +827,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
[coder encodeObject: (id)_className forKey: @"NSClassName"]; [coder encodeObject: (id)_className forKey: @"NSClassName"];
[coder encodeObject: (id)_resourceName forKey: @"NSResourceName"]; [coder encodeObject: (id)_resourceName forKey: @"NSResourceName"];
@ -845,14 +845,14 @@ static BOOL _isInInterfaceBuilder = NO;
{ {
unsigned int i = 0; unsigned int i = 0;
unsigned int count = GSIArrayCount(_objMap); unsigned int count = GSIArrayCount(_objMap);
for(i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
id obj = GSIArrayItemAtIndex(_objMap, i).obj; id obj = GSIArrayItemAtIndex(_objMap, i).obj;
if(obj == oldObj) if (obj == oldObj)
break; break;
} }
if(i < count) if (i < count)
{ {
GSIArraySetItemAtIndex(_objMap, (GSIArrayItem)newObj, i); GSIArraySetItemAtIndex(_objMap, (GSIArrayItem)newObj, i);
return YES; return YES;
@ -872,7 +872,7 @@ static BOOL _isInInterfaceBuilder = NO;
withClassName: (NSString *)className withClassName: (NSString *)className
originalClassName: (NSString *)origClassName originalClassName: (NSString *)origClassName
{ {
if((self = [super init]) != nil) if ((self = [super init]) != nil)
{ {
[self setTemplate: object]; [self setTemplate: object];
[self setClassName: className]; [self setClassName: className];
@ -930,12 +930,12 @@ static BOOL _isInInterfaceBuilder = NO;
Class origCellClass = nil; Class origCellClass = nil;
// if there is a replacement class, use it, otherwise, use the one specified. // if there is a replacement class, use it, otherwise, use the one specified.
if((aClass = [(NSKeyedUnarchiver *)coder classForClassName: className]) == nil) if ((aClass = [(NSKeyedUnarchiver *)coder classForClassName: className]) == nil)
{ {
aClass = NSClassFromString(className); aClass = NSClassFromString(className);
} }
if(aClass == nil) if (aClass == nil)
{ {
[NSException raise: NSInternalInconsistencyException [NSException raise: NSInternalInconsistencyException
format: @"NSClassSwapper unable to find class '%@'", className]; format: @"NSClassSwapper unable to find class '%@'", className];
@ -943,7 +943,7 @@ static BOOL _isInInterfaceBuilder = NO;
// if this is a class which uses cells, override with the new cellClass, if the // if this is a class which uses cells, override with the new cellClass, if the
// subclass responds to cellClass. // subclass responds to cellClass.
if([aClass respondsToSelector: @selector(cellClass)] && if ([aClass respondsToSelector: @selector(cellClass)] &&
[className isEqualToString: _originalClassName] == NO) [className isEqualToString: _originalClassName] == NO)
{ {
Class origClass = NSClassFromString(_originalClassName); Class origClass = NSClassFromString(_originalClassName);
@ -958,12 +958,12 @@ static BOOL _isInInterfaceBuilder = NO;
object = [aClass allocWithZone: NSDefaultMallocZone()]; object = [aClass allocWithZone: NSDefaultMallocZone()];
[(NSKeyedUnarchiver *)coder replaceObject: self withObject: object]; [(NSKeyedUnarchiver *)coder replaceObject: self withObject: object];
[self setTemplate: [object initWithCoder: coder]]; [self setTemplate: [object initWithCoder: coder]];
if(object != _template) if (object != _template)
{ {
[(NSKeyedUnarchiver *)coder replaceObject: object withObject: _template]; [(NSKeyedUnarchiver *)coder replaceObject: object withObject: _template];
} }
if(newCellClass != nil && origCellClass != nil) if (newCellClass != nil && origCellClass != nil)
{ {
[(NSKeyedUnarchiver *)coder setClass: origCellClass forClassName: nil]; [(NSKeyedUnarchiver *)coder setClass: origCellClass forClassName: nil];
} }
@ -971,13 +971,13 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) initWithCoder: (NSCoder *)coder - (id) initWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]); ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]);
ASSIGN(_originalClassName, [coder decodeObjectForKey: @"NSOriginalClassName"]); ASSIGN(_originalClassName, [coder decodeObjectForKey: @"NSOriginalClassName"]);
// build the real object... // build the real object...
if([NSClassSwapper isInInterfaceBuilder] == YES) if ([NSClassSwapper isInInterfaceBuilder] == YES)
{ {
[self instantiateRealObject: coder withClassName: _originalClassName]; [self instantiateRealObject: coder withClassName: _originalClassName];
} }
@ -998,7 +998,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
[coder encodeObject: _originalClassName forKey: @"NSOriginalClassName"]; [coder encodeObject: _originalClassName forKey: @"NSOriginalClassName"];
[coder encodeObject: _className forKey: @"NSClassName"]; [coder encodeObject: _className forKey: @"NSClassName"];
@ -1032,7 +1032,7 @@ static BOOL _isInInterfaceBuilder = NO;
NSRange colonRange = [_tag rangeOfString: @":"]; NSRange colonRange = [_tag rangeOfString: @":"];
unsigned int location = colonRange.location; unsigned int location = colonRange.location;
if(location == NSNotFound) if (location == NSNotFound)
{ {
NSString *newTag = [NSString stringWithFormat: @"%@:",_tag]; NSString *newTag = [NSString stringWithFormat: @"%@:",_tag];
[self setLabel: (id)newTag]; [self setLabel: (id)newTag];
@ -1046,10 +1046,10 @@ static BOOL _isInInterfaceBuilder = NO;
- (id)instantiateObject: (id)obj - (id)instantiateObject: (id)obj
{ {
id newObject = obj; id newObject = obj;
if([obj respondsToSelector: @selector(nibInstantiate)]) if ([obj respondsToSelector: @selector(nibInstantiate)])
{ {
newObject = [obj nibInstantiate]; newObject = [obj nibInstantiate];
if([newObject respondsToSelector: @selector(awakeFromNib)]) if ([newObject respondsToSelector: @selector(awakeFromNib)])
{ {
// awaken the object. // awaken the object.
[newObject awakeFromNib]; [newObject awakeFromNib];
@ -1074,9 +1074,9 @@ static BOOL _isInInterfaceBuilder = NO;
[_root setObject: owner]; [_root setObject: owner];
// iterate over connections, instantiate, and then establish them. // iterate over connections, instantiate, and then establish them.
while((obj = [en nextObject]) != nil) while ((obj = [en nextObject]) != nil)
{ {
if([obj respondsToSelector: @selector(instantiateWithInstantiator:)]) if ([obj respondsToSelector: @selector(instantiateWithInstantiator:)])
{ {
[obj instantiateWithInstantiator: self]; [obj instantiateWithInstantiator: self];
[obj establishConnection]; [obj establishConnection];
@ -1085,11 +1085,11 @@ static BOOL _isInInterfaceBuilder = NO;
// instantiate all windows and fill in the top level array. // instantiate all windows and fill in the top level array.
en = [objs objectEnumerator]; en = [objs objectEnumerator];
while((obj = [en nextObject]) != nil) while ((obj = [en nextObject]) != nil)
{ {
if([obj isKindOfClass: [NSWindowTemplate class]]) if ([obj isKindOfClass: [NSWindowTemplate class]])
{ {
if([obj realObject] == nil) if ([obj realObject] == nil)
{ {
id o = [self instantiateObject: obj]; id o = [self instantiateObject: obj];
[topLevelObjects addObject: o]; [topLevelObjects addObject: o];
@ -1098,7 +1098,7 @@ static BOOL _isInInterfaceBuilder = NO;
else else
{ {
id v = NSMapGet(_objects, obj); id v = NSMapGet(_objects, obj);
if(v == nil || v == owner) if (v == nil || v == owner)
{ {
[topLevelObjects addObject: obj]; [topLevelObjects addObject: obj];
} }
@ -1107,7 +1107,7 @@ static BOOL _isInInterfaceBuilder = NO;
// bring visible windows to front... // bring visible windows to front...
en = [_visibleWindows objectEnumerator]; en = [_visibleWindows objectEnumerator];
while((obj = [en nextObject]) != nil) while ((obj = [en nextObject]) != nil)
{ {
id w = [obj realObject]; id w = [obj realObject];
[w orderFront: self]; [w orderFront: self];
@ -1115,7 +1115,7 @@ static BOOL _isInInterfaceBuilder = NO;
// add the menu... // add the menu...
menu = [self objectForName: @"MainMenu"]; menu = [self objectForName: @"MainMenu"];
if(menu != nil) if (menu != nil)
{ {
menu = [self instantiateObject: menu]; menu = [self instantiateObject: menu];
[NSApp setMainMenu: menu]; [NSApp setMainMenu: menu];
@ -1176,7 +1176,7 @@ static BOOL _isInInterfaceBuilder = NO;
int i = [nameValues indexOfObject: name]; int i = [nameValues indexOfObject: name];
id result = nil; id result = nil;
if(i != NSNotFound) if (i != NSNotFound)
{ {
result = [nameKeys objectAtIndex: i]; result = [nameKeys objectAtIndex: i];
} }
@ -1201,7 +1201,7 @@ static BOOL _isInInterfaceBuilder = NO;
NSMutableArray *result = [NSMutableArray array]; NSMutableArray *result = [NSMutableArray array];
NSEnumerator *en = [keys objectEnumerator]; NSEnumerator *en = [keys objectEnumerator];
id key = nil; id key = nil;
while((key = [en nextObject]) != nil) while ((key = [en nextObject]) != nil)
{ {
id value = (id)NSMapGet(map,key); id value = (id)NSMapGet(map,key);
[result addObject: value]; [result addObject: value];
@ -1211,7 +1211,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
NSArray *accessibilityOidsKeys = (NSArray *)NSAllMapTableKeys(_accessibilityOids); NSArray *accessibilityOidsKeys = (NSArray *)NSAllMapTableKeys(_accessibilityOids);
NSArray *accessibilityOidsValues = [self _valuesForKeys: accessibilityOidsKeys inMap: _accessibilityOids]; NSArray *accessibilityOidsValues = [self _valuesForKeys: accessibilityOidsKeys inMap: _accessibilityOids];
@ -1261,7 +1261,7 @@ static BOOL _isInInterfaceBuilder = NO;
id key = nil; id key = nil;
id value = nil; id value = nil;
while((key = [ken nextObject]) != nil && (value = [ven nextObject]) != nil) while ((key = [ken nextObject]) != nil && (value = [ven nextObject]) != nil)
{ {
NSMapInsert(mapTable, key, value); NSMapInsert(mapTable, key, value);
} }
@ -1269,7 +1269,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) initWithCoder: (NSCoder *)coder - (id) initWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
ASSIGN(_root, [coder decodeObjectForKey: @"NSRoot"]); ASSIGN(_root, [coder decodeObjectForKey: @"NSRoot"]);
ASSIGN(_visibleWindows, (NSMutableArray *)[coder decodeObjectForKey: @"NSVisibleWindows"]); ASSIGN(_visibleWindows, (NSMutableArray *)[coder decodeObjectForKey: @"NSVisibleWindows"]);
@ -1347,7 +1347,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) init - (id) init
{ {
if((self = [super init]) != nil) if ((self = [super init]) != nil)
{ {
// instantiate the maps.. // instantiate the maps..
_objects = NSCreateMapTable(NSObjectMapKeyCallBacks, _objects = NSCreateMapTable(NSObjectMapKeyCallBacks,
@ -1417,7 +1417,7 @@ static BOOL _isInInterfaceBuilder = NO;
@implementation NSButtonImageSource @implementation NSButtonImageSource
- (id) initWithCoder: (NSCoder *)coder - (id) initWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
ASSIGN(imageName, [coder decodeObjectForKey: @"NSImageName"]); ASSIGN(imageName, [coder decodeObjectForKey: @"NSImageName"]);
} }
@ -1434,7 +1434,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
[coder encodeObject: imageName forKey: @"NSImageName"]; [coder encodeObject: imageName forKey: @"NSImageName"];
} }
@ -1448,7 +1448,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) initWithImageNamed: (NSString *)name - (id) initWithImageNamed: (NSString *)name
{ {
if((self = [super init]) != nil) if ((self = [super init]) != nil)
{ {
ASSIGN(imageName,name); ASSIGN(imageName,name);
} }
@ -1470,7 +1470,7 @@ static BOOL _isInInterfaceBuilder = NO;
@implementation NSIBHelpConnector @implementation NSIBHelpConnector
- (id) init - (id) init
{ {
if((self = [super init]) != nil) if ((self = [super init]) != nil)
{ {
_file = nil; _file = nil;
_marker = @"NSToolTipHelpKey"; _marker = @"NSToolTipHelpKey";
@ -1480,15 +1480,15 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) initWithCoder: (NSCoder *)coder - (id) initWithCoder: (NSCoder *)coder
{ {
if((self = [super initWithCoder: coder]) != nil) if ((self = [super initWithCoder: coder]) != nil)
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
if([coder containsValueForKey: @"NSFile"]) if ([coder containsValueForKey: @"NSFile"])
{ {
_file = RETAIN([coder decodeObjectForKey: @"NSFile"]); _file = RETAIN([coder decodeObjectForKey: @"NSFile"]);
} }
if([coder containsValueForKey: @"NSMarker"]) if ([coder containsValueForKey: @"NSMarker"])
{ {
_marker = RETAIN([coder decodeObjectForKey: @"NSMarker"]); _marker = RETAIN([coder decodeObjectForKey: @"NSMarker"]);
} }
@ -1505,13 +1505,13 @@ static BOOL _isInInterfaceBuilder = NO;
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
[super encodeWithCoder: coder]; [super encodeWithCoder: coder];
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
if(_file != nil) if (_file != nil)
{ {
[coder encodeObject: _file forKey: @"NSFile"]; [coder encodeObject: _file forKey: @"NSFile"];
} }
if(_marker != nil) if (_marker != nil)
{ {
[coder encodeObject: _file forKey: @"NSMarker"]; [coder encodeObject: _file forKey: @"NSMarker"];
} }
@ -1556,7 +1556,7 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) initWithCoder: (NSCoder *)coder - (id) initWithCoder: (NSCoder *)coder
{ {
NSDecimalNumber *dn = nil; NSDecimalNumber *dn = nil;
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
unsigned int len = 0; unsigned int len = 0;
short exponent = (short)[coder decodeIntForKey: @"NS.exponent"]; short exponent = (short)[coder decodeIntForKey: @"NS.exponent"];

View file

@ -134,7 +134,7 @@
withZone: zone]; withZone: zone];
// report a problem if there is one. // report a problem if there is one.
if(loaded == NO) if (loaded == NO)
{ {
NSLog(@"Could not load Gorm file: %@",fileName); NSLog(@"Could not load Gorm file: %@",fileName);
} }

View file

@ -722,7 +722,7 @@
int i; int i;
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeInt: _numberOfRows forKey: @"GSNumberOfRows"]; [aCoder encodeInt: _numberOfRows forKey: @"GSNumberOfRows"];
[aCoder encodeInt: _numberOfColumns forKey: @"GSNumberOfColumns"]; [aCoder encodeInt: _numberOfColumns forKey: @"GSNumberOfColumns"];
@ -792,7 +792,7 @@
[super initWithCoder: aDecoder]; [super initWithCoder: aDecoder];
[super setAutoresizesSubviews: NO]; [super setAutoresizesSubviews: NO];
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
_numberOfRows = [aDecoder decodeIntForKey: @"GSNumberOfRows"]; _numberOfRows = [aDecoder decodeIntForKey: @"GSNumberOfRows"];
_numberOfColumns = [aDecoder decodeIntForKey: @"GSNumberOfColumns"]; _numberOfColumns = [aDecoder decodeIntForKey: @"GSNumberOfColumns"];

View file

@ -178,7 +178,7 @@ unCacheAttributes(NSDictionary *attrs)
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding] == NO) if ([aCoder allowsKeyedCoding] == NO)
{ {
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &loc]; [aCoder encodeValueOfObjCType: @encode(unsigned) at: &loc];
[aCoder encodeValueOfObjCType: @encode(id) at: &attrs]; [aCoder encodeValueOfObjCType: @encode(id) at: &attrs];
@ -193,7 +193,7 @@ unCacheAttributes(NSDictionary *attrs)
- (id) initWithCoder: (NSCoder*)aCoder - (id) initWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding] == NO) if ([aCoder allowsKeyedCoding] == NO)
{ {
NSDictionary *a; NSDictionary *a;
[aCoder decodeValueOfObjCType: @encode(unsigned) at: &loc]; [aCoder decodeValueOfObjCType: @encode(unsigned) at: &loc];

View file

@ -397,8 +397,8 @@ static NSNull *null = nil;
} }
/* /*
* We could cache tile info here, but it's probabaly better for the * We could cache tile info here, but it's probably better for the
* tilesNamed: method to do it lazily. * tilesNamed:cache: method to do it lazily.
*/ */
/* /*
@ -566,10 +566,11 @@ static NSNull *null = nil;
return [GSThemeInspector sharedThemeInspector]; return [GSThemeInspector sharedThemeInspector];
} }
- (GSDrawTiles*) tilesNamed: (NSString*)aName - (GSDrawTiles*) tilesNamed: (NSString*)aName cache: (BOOL)useCache
{ {
GSDrawTiles *tiles = [_tiles objectForKey: aName]; GSDrawTiles *tiles;
tiles = (useCache == YES) ? [_tiles objectForKey: aName] : nil;
if (tiles == nil) if (tiles == nil)
{ {
NSDictionary *info; NSDictionary *info;
@ -1074,7 +1075,129 @@ withRepeatedImage: (NSImage*)image
} }
NSRectFill(rect); NSRectFill(rect);
if (flipped) if (style == GSThemeFillStyleMatrix)
{
NSRect grid;
float x;
float y;
if (tiles->images[TileTM] == nil)
{
grid.size.width = (tiles->rects[TileTL].size.width
+ tiles->rects[TileTR].size.width
+ 9);
}
else
{
grid.size.width = (tiles->rects[TileTL].size.width
+ tiles->rects[TileTM].size.width
+ tiles->rects[TileTR].size.width
+ 12);
}
grid.origin.x = rect.origin.x + (rect.size.width - grid.size.width) / 2;
x = grid.origin.x;
if (flipped)
{
grid.origin.y
= NSMaxY(rect) - (rect.size.height - grid.size.height) / 2;
y = NSMaxY(grid);
}
else
{
grid.origin.y
= rect.origin.y + (rect.size.height - grid.size.height) / 2;
y = grid.origin.y;
}
/* Draw bottom row
*/
if (flipped)
{
y -= (tiles->rects[TileBL].size.height + 3);
}
else
{
y += 3;
}
[tiles->images[TileBL] compositeToPoint:
NSMakePoint(x, y)
operation: NSCompositeSourceOver];
x += tiles->rects[TileBL].size.width + 3;
if (tiles->images[TileBM] != nil)
{
[tiles->images[TileBM] compositeToPoint:
NSMakePoint(x, y)
operation: NSCompositeSourceOver];
x += tiles->rects[TileBM].size.width + 3;
}
[tiles->images[TileBR] compositeToPoint:
NSMakePoint(x, y)
operation: NSCompositeSourceOver];
if (!flipped)
{
y += tiles->rects[TileBL].size.height;
}
if (tiles->images[TileCL] != nil)
{
/* Draw middle row
*/
x = grid.origin.x;
if (flipped)
{
y -= (tiles->rects[TileCL].size.height + 3);
}
else
{
y += 3;
}
[tiles->images[TileCL] compositeToPoint:
NSMakePoint(x, y)
operation: NSCompositeSourceOver];
x += tiles->rects[TileCL].size.width + 3;
if (tiles->images[TileCM] != nil)
{
[tiles->images[TileCM] compositeToPoint:
NSMakePoint(x, y)
operation: NSCompositeSourceOver];
x += tiles->rects[TileCM].size.width + 3;
}
[tiles->images[TileCR] compositeToPoint:
NSMakePoint(x, y)
operation: NSCompositeSourceOver];
if (!flipped)
{
y += tiles->rects[TileCL].size.height;
}
}
/* Draw top row
*/
x = grid.origin.x;
if (flipped)
{
y -= (tiles->rects[TileTL].size.height + 3);
}
else
{
y += 3;
}
[tiles->images[TileTL] compositeToPoint:
NSMakePoint(x, y)
operation: NSCompositeSourceOver];
x += tiles->rects[TileTL].size.width + 3;
if (tiles->images[TileTM] != nil)
{
[tiles->images[TileTM] compositeToPoint:
NSMakePoint(x, y)
operation: NSCompositeSourceOver];
x += tiles->rects[TileTM].size.width + 3;
}
[tiles->images[TileTR] compositeToPoint:
NSMakePoint(x, y)
operation: NSCompositeSourceOver];
}
else if (flipped)
{ {
[self fillHorizontalRect: [self fillHorizontalRect:
NSMakeRect (rect.origin.x + bls.width, NSMakeRect (rect.origin.x + bls.width,
@ -1131,25 +1254,25 @@ withRepeatedImage: (NSImage*)image
operation: NSCompositeSourceOver]; operation: NSCompositeSourceOver];
inFill = NSMakeRect (rect.origin.x +cls.width, inFill = NSMakeRect (rect.origin.x +cls.width,
rect.origin.y + bms.height, rect.origin.y + bms.height,
rect.size.width - cls.width - crs.width, rect.size.width - cls.width - crs.width,
rect.size.height - bms.height - tms.height); rect.size.height - bms.height - tms.height);
if (style == FillStyleCenter) if (style == GSThemeFillStyleCenter)
{ {
[self fillRect: inFill [self fillRect: inFill
withRepeatedImage: tiles->images[TileCM] withRepeatedImage: tiles->images[TileCM]
fromRect: tiles->rects[TileCM] fromRect: tiles->rects[TileCM]
center: NO]; center: NO];
} }
else if (style == FillStyleRepeat) else if (style == GSThemeFillStyleRepeat)
{ {
[self fillRect: inFill [self fillRect: inFill
withRepeatedImage: tiles->images[TileCM] withRepeatedImage: tiles->images[TileCM]
fromRect: tiles->rects[TileCM] fromRect: tiles->rects[TileCM]
center: NO]; center: NO];
} }
else if (style == FillStyleScale) else if (style == GSThemeFillStyleScale)
{ {
[tiles->images[TileCM] setScalesWhenResized: YES]; [tiles->images[TileCM] setScalesWhenResized: YES];
[tiles->images[TileCM] setSize: inFill.size]; [tiles->images[TileCM] setSize: inFill.size];
[tiles->images[TileCM] compositeToPoint: inFill.origin [tiles->images[TileCM] compositeToPoint: inFill.origin
@ -1222,25 +1345,25 @@ withRepeatedImage: (NSImage*)image
operation: NSCompositeSourceOver]; operation: NSCompositeSourceOver];
inFill = NSMakeRect (rect.origin.x +cls.width, inFill = NSMakeRect (rect.origin.x +cls.width,
rect.origin.y + bms.height, rect.origin.y + bms.height,
rect.size.width - cls.width - crs.width, rect.size.width - cls.width - crs.width,
rect.size.height - bms.height - tms.height); rect.size.height - bms.height - tms.height);
if (style == FillStyleCenter) if (style == GSThemeFillStyleCenter)
{ {
[self fillRect: inFill [self fillRect: inFill
withRepeatedImage: tiles->images[TileCM] withRepeatedImage: tiles->images[TileCM]
fromRect: tiles->rects[TileCM] fromRect: tiles->rects[TileCM]
center: NO]; center: NO];
} }
else if (style == FillStyleRepeat) else if (style == GSThemeFillStyleRepeat)
{ {
[self fillRect: inFill [self fillRect: inFill
withRepeatedImage: tiles->images[TileCM] withRepeatedImage: tiles->images[TileCM]
fromRect: tiles->rects[TileCM] fromRect: tiles->rects[TileCM]
center: YES]; center: YES];
} }
else if (style == FillStyleScale) else if (style == GSThemeFillStyleScale)
{ {
[tiles->images[TileCM] setScalesWhenResized: YES]; [tiles->images[TileCM] setScalesWhenResized: YES];
[tiles->images[TileCM] setSize: inFill.size]; [tiles->images[TileCM] setSize: inFill.size];

View file

@ -114,7 +114,7 @@
*/ */
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding] == NO) if ([aCoder allowsKeyedCoding] == NO)
{ {
BOOL inside = flags.inside; BOOL inside = flags.inside;
@ -127,7 +127,7 @@
- (id) initWithCoder: (NSCoder*)aDecoder - (id) initWithCoder: (NSCoder*)aDecoder
{ {
if([aDecoder allowsKeyedCoding] == NO) if ([aDecoder allowsKeyedCoding] == NO)
{ {
BOOL inside; BOOL inside;

View file

@ -163,7 +163,7 @@ enablingYResizing: (BOOL)aFlag
-(void) encodeWithCoder: (NSCoder*)aCoder -(void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeBool: _haveViews forKey: @"GSHaveViews"]; [aCoder encodeBool: _haveViews forKey: @"GSHaveViews"];
[aCoder encodeFloat: _defaultMinYMargin forKey: @"GSDefaultMinYMargin"]; [aCoder encodeFloat: _defaultMinYMargin forKey: @"GSDefaultMinYMargin"];
@ -178,7 +178,7 @@ enablingYResizing: (BOOL)aFlag
-(id) initWithCoder: (NSCoder*)aDecoder -(id) initWithCoder: (NSCoder*)aDecoder
{ {
[super initWithCoder: aDecoder]; [super initWithCoder: aDecoder];
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
_haveViews = [aDecoder decodeBoolForKey: @"GSHaveViews"]; _haveViews = [aDecoder decodeBoolForKey: @"GSHaveViews"];
_defaultMinYMargin = [aDecoder decodeFloatForKey: @"GSDefaultMinYMargin"]; _defaultMinYMargin = [aDecoder decodeFloatForKey: @"GSDefaultMinYMargin"];

View file

@ -285,7 +285,7 @@ static Class controlClass;
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeInt: [self tag] forKey: @"NSTag"]; [aCoder encodeInt: [self tag] forKey: @"NSTag"];
[aCoder encodeObject: [self target] forKey: @"NSTarget"]; [aCoder encodeObject: [self target] forKey: @"NSTarget"];

View file

@ -3292,10 +3292,10 @@ image.</p><p>See Also: -applicationIconImage</p>
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
/* /*
if(_delegate != nil) if (_delegate != nil)
{ {
[aCoder encodeObject: _delegate forKey: @"NSDelegate"]; [aCoder encodeObject: _delegate forKey: @"NSDelegate"];
} }
@ -3316,10 +3316,10 @@ image.</p><p>See Also: -applicationIconImage</p>
id obj; id obj;
[super initWithCoder: aDecoder]; [super initWithCoder: aDecoder];
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
/* /*
if([aDecoder containsValueForKey: @"NSDelegate"]) if ([aDecoder containsValueForKey: @"NSDelegate"])
{ {
obj = [aDecoder decodeObjectForKey: @"NSDelegate"]; obj = [aDecoder decodeObjectForKey: @"NSDelegate"];
[self setDelegate: obj]; [self setDelegate: obj];

View file

@ -948,7 +948,7 @@ static BOOL supports_lzw_compression = NO;
NSData *data = [self TIFFRepresentation]; NSData *data = [self TIFFRepresentation];
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeObject: data forKey: @"NSTIFFRepresentation"]; [aCoder encodeObject: data forKey: @"NSTIFFRepresentation"];
} }

View file

@ -152,7 +152,7 @@ static NSTextFieldCell *titleCell;
- (void) encodeWithCoder: (NSCoder *)aCoder - (void) encodeWithCoder: (NSCoder *)aCoder
{ {
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
} }
else else
@ -169,7 +169,7 @@ static NSTextFieldCell *titleCell;
- (id) initWithCoder: (NSCoder *)aDecoder - (id) initWithCoder: (NSCoder *)aDecoder
{ {
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
} }
@ -2501,7 +2501,7 @@ static NSTextFieldCell *titleCell;
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
long flags = 0; long flags = 0;

View file

@ -339,7 +339,7 @@ static NSFont *_leafFont;
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
// simply encodes prescence... // simply encodes prescence...
} }

View file

@ -72,15 +72,15 @@
{ {
if ([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
if(_src != nil) if (_src != nil)
{ {
[aCoder encodeObject: _src forKey: @"NSSource"]; [aCoder encodeObject: _src forKey: @"NSSource"];
} }
if(_dst != nil) if (_dst != nil)
{ {
[aCoder encodeObject: _dst forKey: @"NSDestination"]; [aCoder encodeObject: _dst forKey: @"NSDestination"];
} }
if(_tag != nil) if (_tag != nil)
{ {
[aCoder encodeObject: _tag forKey: @"NSLabel"]; [aCoder encodeObject: _tag forKey: @"NSLabel"];
} }
@ -101,15 +101,15 @@
{ {
if ([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
if([aDecoder containsValueForKey: @"NSDestination"]) if ([aDecoder containsValueForKey: @"NSDestination"])
{ {
ASSIGN(_dst, [aDecoder decodeObjectForKey: @"NSDestination"]); ASSIGN(_dst, [aDecoder decodeObjectForKey: @"NSDestination"]);
} }
if([aDecoder containsValueForKey: @"NSSource"]) if ([aDecoder containsValueForKey: @"NSSource"])
{ {
ASSIGN(_src, [aDecoder decodeObjectForKey: @"NSSource"]); ASSIGN(_src, [aDecoder decodeObjectForKey: @"NSSource"]);
} }
if([aDecoder containsValueForKey: @"NSLabel"]) if ([aDecoder containsValueForKey: @"NSLabel"])
{ {
ASSIGN(_tag, [aDecoder decodeObjectForKey: @"NSLabel"]); ASSIGN(_tag, [aDecoder decodeObjectForKey: @"NSLabel"]);
} }
@ -323,7 +323,7 @@
NSString *modelPath = [rootPath stringByAppendingPathComponent: fileName]; NSString *modelPath = [rootPath stringByAppendingPathComponent: fileName];
NSString *path = [GSModelLoaderFactory supportedModelFileAtPath: modelPath]; NSString *path = [GSModelLoaderFactory supportedModelFileAtPath: modelPath];
if(path != nil) if (path != nil)
{ {
return path; return path;
} }

View file

@ -1448,7 +1448,7 @@ typedef struct _GSButtonCellFlags
BOOL tmp; BOOL tmp;
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
GSButtonCellFlags buttonCellFlags; GSButtonCellFlags buttonCellFlags;
unsigned int bFlags = 0; unsigned int bFlags = 0;
@ -1456,15 +1456,15 @@ typedef struct _GSButtonCellFlags
NSImage *image = [self image]; NSImage *image = [self image];
NSButtonImageSource *bi = nil; NSButtonImageSource *bi = nil;
if([self keyEquivalent] != nil) if ([self keyEquivalent] != nil)
{ {
[aCoder encodeObject: [self keyEquivalent] forKey: @"NSKeyEquivalent"]; [aCoder encodeObject: [self keyEquivalent] forKey: @"NSKeyEquivalent"];
} }
if([self image] != nil) if ([self image] != nil)
{ {
[aCoder encodeObject: [self image] forKey: @"NSNormalImage"]; [aCoder encodeObject: [self image] forKey: @"NSNormalImage"];
} }
if([self alternateTitle] != nil) if ([self alternateTitle] != nil)
{ {
[aCoder encodeObject: [self alternateTitle] forKey: @"NSAlternateContents"]; [aCoder encodeObject: [self alternateTitle] forKey: @"NSAlternateContents"];
} }
@ -1503,15 +1503,15 @@ typedef struct _GSButtonCellFlags
[aCoder encodeInt: bFlags2 forKey: @"NSButtonFlags2"]; [aCoder encodeInt: bFlags2 forKey: @"NSButtonFlags2"];
// alternate image encoding... // alternate image encoding...
if(image != nil) if (image != nil)
{ {
if ([image isKindOfClass: [NSImage class]] && buttonCellFlags.useButtonImageSource) if ([image isKindOfClass: [NSImage class]] && buttonCellFlags.useButtonImageSource)
{ {
if([NSImage imageNamed: @"NSSwitch"] == image) if ([NSImage imageNamed: @"NSSwitch"] == image)
{ {
bi = [[NSButtonImageSource alloc] initWithImageNamed: @"NSHighlightedSwitch"]; bi = [[NSButtonImageSource alloc] initWithImageNamed: @"NSHighlightedSwitch"];
} }
else if([NSImage imageNamed: @"NSRadioButton"] == image) else if ([NSImage imageNamed: @"NSRadioButton"] == image)
{ {
bi = [[NSButtonImageSource alloc] initWithImageNamed: @"NSHighlightedRadioButton"]; bi = [[NSButtonImageSource alloc] initWithImageNamed: @"NSHighlightedRadioButton"];
} }
@ -1519,11 +1519,11 @@ typedef struct _GSButtonCellFlags
} }
// encode button image source, if it exists... // encode button image source, if it exists...
if(bi != nil) if (bi != nil)
{ {
[aCoder encodeObject: bi forKey: @"NSAlternateImage"]; [aCoder encodeObject: bi forKey: @"NSAlternateImage"];
} }
else if(_altImage != nil) else if (_altImage != nil)
{ {
[aCoder encodeObject: _altImage forKey: @"NSAlternateImage"]; [aCoder encodeObject: _altImage forKey: @"NSAlternateImage"];
} }
@ -1657,18 +1657,18 @@ typedef struct _GSButtonCellFlags
image = [aDecoder decodeObjectForKey: @"NSAlternateImage"]; image = [aDecoder decodeObjectForKey: @"NSAlternateImage"];
if ([image isKindOfClass: [NSImage class]]) if ([image isKindOfClass: [NSImage class]])
{ {
if([NSImage imageNamed: @"NSSwitch"] == image) if ([NSImage imageNamed: @"NSSwitch"] == image)
{ {
image = [NSImage imageNamed: @"NSHighlightedSwitch"]; image = [NSImage imageNamed: @"NSHighlightedSwitch"];
if([self image] == nil) if ([self image] == nil)
{ {
[self setImage: [NSImage imageNamed: @"NSSwitch"]]; [self setImage: [NSImage imageNamed: @"NSSwitch"]];
} }
} }
else if([NSImage imageNamed: @"NSRadioButton"] == image) else if ([NSImage imageNamed: @"NSRadioButton"] == image)
{ {
image = [NSImage imageNamed: @"NSHighlightedRadioButton"]; image = [NSImage imageNamed: @"NSHighlightedRadioButton"];
if([self image] == nil) if ([self image] == nil)
{ {
[self setImage: [NSImage imageNamed: @"NSRadioButton"]]; [self setImage: [NSImage imageNamed: @"NSRadioButton"]];
} }

View file

@ -167,7 +167,7 @@
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding] == NO) if ([aCoder allowsKeyedCoding] == NO)
{ {
[aCoder encodeObject: _window]; [aCoder encodeObject: _window];
[aCoder encodeRect: _rect]; [aCoder encodeRect: _rect];
@ -177,7 +177,7 @@
- (id) initWithCoder: (NSCoder*)aDecoder - (id) initWithCoder: (NSCoder*)aDecoder
{ {
self = [super initWithCoder: aDecoder]; self = [super initWithCoder: aDecoder];
if([aDecoder allowsKeyedCoding] == NO) if ([aDecoder allowsKeyedCoding] == NO)
{ {
[aDecoder decodeValueOfObjCType: @encode(id) at: &_window]; [aDecoder decodeValueOfObjCType: @encode(id) at: &_window];
_rect = [aDecoder decodeRect]; _rect = [aDecoder decodeRect];

View file

@ -2179,7 +2179,7 @@ static NSColor *shadowCol;
*/ */
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
unsigned long cFlags = 0; unsigned long cFlags = 0;
unsigned int cFlags2 = 0; unsigned int cFlags2 = 0;
@ -2216,7 +2216,7 @@ static NSColor *shadowCol;
// font and formatter. // font and formatter.
[aCoder encodeObject: [self font] forKey: @"NSSupport"]; [aCoder encodeObject: [self font] forKey: @"NSSupport"];
if([self formatter]) if ([self formatter])
{ {
[aCoder encodeObject: [self formatter] forKey: @"NSFormatter"]; [aCoder encodeObject: [self formatter] forKey: @"NSFormatter"];
} }
@ -2292,11 +2292,11 @@ static NSColor *shadowCol;
id contents = [aDecoder decodeObjectForKey: @"NSContents"]; id contents = [aDecoder decodeObjectForKey: @"NSContents"];
// initialize based on content... // initialize based on content...
if([contents isKindOfClass: [NSString class]]) if ([contents isKindOfClass: [NSString class]])
{ {
self = [self initTextCell: contents]; self = [self initTextCell: contents];
} }
else if([contents isKindOfClass: [NSImage class]]) else if ([contents isKindOfClass: [NSImage class]])
{ {
self = [self initImageCell: contents]; self = [self initImageCell: contents];
} }

View file

@ -753,16 +753,16 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
unsigned int flags = 0; unsigned int flags = 0;
[aCoder encodeObject: [self backgroundColor] forKey: @"NSBGColor"]; [aCoder encodeObject: [self backgroundColor] forKey: @"NSBGColor"];
[aCoder encodeObject: [self documentCursor] forKey: @"NSCursor"]; [aCoder encodeObject: [self documentCursor] forKey: @"NSCursor"];
[aCoder encodeObject: [self documentView] forKey: @"NSDocView"]; [aCoder encodeObject: [self documentView] forKey: @"NSDocView"];
if([self drawsBackground]) if ([self drawsBackground])
flags |= 4; flags |= 4;
if([self copiesOnScroll] == NO) if ([self copiesOnScroll] == NO)
flags |= 2; flags |= 2;
[aCoder encodeInt: flags forKey: @"NScvFlags"]; [aCoder encodeInt: flags forKey: @"NScvFlags"];

View file

@ -235,7 +235,7 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeObject: _the_color forKey: @"NSColor"]; [aCoder encodeObject: _the_color forKey: @"NSColor"];
// [aCoder encodeBool: _is_active forKey: @"NSEnabled"]; // [aCoder encodeBool: _is_active forKey: @"NSEnabled"];
@ -258,7 +258,7 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
self = [super initWithCoder: aDecoder]; self = [super initWithCoder: aDecoder];
if (self != nil) if (self != nil)
{ {
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
NSString *action; NSString *action;

View file

@ -1654,7 +1654,7 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
{ {
[super encodeWithCoder: coder]; [super encodeWithCoder: coder];
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
[coder encodeBool: [self hasVerticalScroller] forKey: @"NSHasVerticalScroller"]; [coder encodeBool: [self hasVerticalScroller] forKey: @"NSHasVerticalScroller"];
[coder encodeInt: [self numberOfVisibleItems] forKey: @"NSVisibleItemCount"]; [coder encodeInt: [self numberOfVisibleItems] forKey: @"NSVisibleItemCount"];

View file

@ -833,7 +833,7 @@ static Class actionCellClass;
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeObject: [self cell] forKey: @"NSCell"]; [aCoder encodeObject: [self cell] forKey: @"NSCell"];
[aCoder encodeBool: [self isEnabled] forKey: @"NSEnabled"]; [aCoder encodeBool: [self isEnabled] forKey: @"NSEnabled"];

View file

@ -270,7 +270,7 @@
{ {
BOOL flag = NO; BOOL flag = NO;
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeInt: linkNumber forKey: @"GSLinkNumber"]; [aCoder encodeInt: linkNumber forKey: @"GSLinkNumber"];
[aCoder encodeInt: disposition forKey: @"GSUpdateMode"]; [aCoder encodeInt: disposition forKey: @"GSUpdateMode"];
@ -337,7 +337,7 @@
- (id) initWithCoder: (NSCoder*)aCoder - (id) initWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
id obj; id obj;

View file

@ -333,7 +333,7 @@
{ {
BOOL flag = NO; BOOL flag = NO;
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeObject: filename forKey: @"GSFilename"]; [aCoder encodeObject: filename forKey: @"GSFilename"];
[aCoder encodeObject: sourceLinks forKey: @"GSSourceLinks"]; [aCoder encodeObject: sourceLinks forKey: @"GSSourceLinks"];
@ -367,7 +367,7 @@
- (id) initWithCoder: (NSCoder*)aCoder - (id) initWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
BOOL flag = NO; BOOL flag = NO;
id obj; id obj;

View file

@ -464,7 +464,7 @@
ASSIGN(_saveType, [controller _nameForHumanReadableType: ASSIGN(_saveType, [controller _nameForHumanReadableType:
[sender titleOfSelectedItem]]); [sender titleOfSelectedItem]]);
extensions = [controller fileExtensionsFromType: _saveType]; extensions = [controller fileExtensionsFromType: _saveType];
if([extensions count] > 0) if ([extensions count] > 0)
{ {
[(NSSavePanel *)[sender window] setRequiredFileType: [extensions objectAtIndex:0]]; [(NSSavePanel *)[sender window] setRequiredFileType: [extensions objectAtIndex:0]];
} }
@ -484,7 +484,7 @@
- (void) _createPanelAccessory - (void) _createPanelAccessory
{ {
if(savePanelAccessory == nil) if (savePanelAccessory == nil)
{ {
NSRect accessoryFrame = NSMakeRect(0,0,380,70); NSRect accessoryFrame = NSMakeRect(0,0,380,70);
NSRect spaFrame = NSMakeRect(115,14,150,22); NSRect spaFrame = NSMakeRect(115,14,150,22);
@ -507,7 +507,7 @@
NSString *title = nil; NSString *title = nil;
int i = 0; int i = 0;
while((title = [en nextObject]) != nil) while ((title = [en nextObject]) != nil)
{ {
[spaButton addItemWithTitle: title]; [spaButton addItemWithTitle: title];
i++; i++;
@ -517,11 +517,11 @@
[spaButton setEnabled: (i > 0)]; [spaButton setEnabled: (i > 0)];
// if we have some items, select the current filetype. // if we have some items, select the current filetype.
if(i > 0) if (i > 0)
{ {
NSString *title = [[NSDocumentController sharedDocumentController] NSString *title = [[NSDocumentController sharedDocumentController]
displayNameForType: [self fileType]]; displayNameForType: [self fileType]];
if([spaButton itemWithTitle: title] != nil) if ([spaButton itemWithTitle: title] != nil)
{ {
[spaButton selectItemWithTitle: title]; [spaButton selectItemWithTitle: title];
} }
@ -558,7 +558,7 @@
{ {
NSArray *extensions = [[NSDocumentController sharedDocumentController] NSArray *extensions = [[NSDocumentController sharedDocumentController]
fileExtensionsFromType: [self fileTypeFromLastRunSavePanel]]; fileExtensionsFromType: [self fileTypeFromLastRunSavePanel]];
if([extensions count] > 0) if ([extensions count] > 0)
{ {
[savePanel setRequiredFileType:[extensions objectAtIndex:0]]; [savePanel setRequiredFileType:[extensions objectAtIndex:0]];
} }
@ -736,7 +736,7 @@
NSArray *extensions = [[NSDocumentController sharedDocumentController] NSArray *extensions = [[NSDocumentController sharedDocumentController]
fileExtensionsFromType: fileType]; fileExtensionsFromType: fileType];
if([extensions count] > 0) if ([extensions count] > 0)
{ {
NSString *extension = [extensions objectAtIndex: 0]; NSString *extension = [extensions objectAtIndex: 0];
NSString *newFileName = [[fileName stringByDeletingPathExtension] NSString *newFileName = [[fileName stringByDeletingPathExtension]

View file

@ -873,7 +873,7 @@ static NSString *NSViewerRole = @"Viewer";
NSEnumerator *en = [types objectEnumerator]; NSEnumerator *en = [types objectEnumerator];
NSString *type = nil; NSString *type = nil;
NSMutableArray *result = [NSMutableArray arrayWithCapacity: 10]; NSMutableArray *result = [NSMutableArray arrayWithCapacity: 10];
while((type = (NSString *)[en nextObject]) != nil) while ((type = (NSString *)[en nextObject]) != nil)
{ {
NSString *name = [self displayNameForType: type]; NSString *name = [self displayNameForType: type];
[result addObject: name]; [result addObject: name];

View file

@ -395,10 +395,10 @@ static NSColor *shadowCol;
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
/* /*
if([self stringValue] != nil) if ([self stringValue] != nil)
{ {
[aCoder encodeObject: [self stringValue] forKey: @"NSContents"]; [aCoder encodeObject: [self stringValue] forKey: @"NSContents"];
} }

View file

@ -1479,11 +1479,11 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
{ {
BOOL flag; BOOL flag;
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
// FIXME: Not sure this is the way it goes... // FIXME: Not sure this is the way it goes...
/* /*
if(_flags.archiveByName == NO) if (_flags.archiveByName == NO)
{ {
NSMutableArray *container = [NSMutableArray array]; NSMutableArray *container = [NSMutableArray array];
NSMutableArray *reps = [NSMutableArray array]; NSMutableArray *reps = [NSMutableArray array];
@ -1492,7 +1492,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
// add the reps to the container... // add the reps to the container...
[container addObject: reps]; [container addObject: reps];
while((rd = [en nextObject]) != nil) while ((rd = [en nextObject]) != nil)
{ {
[reps addObject: rd->rep]; [reps addObject: rd->rep];
} }

View file

@ -369,7 +369,7 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect)
- (void) encodeWithCoder: (NSCoder *)aCoder - (void) encodeWithCoder: (NSCoder *)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeInt: _imageAlignment forKey: @"NSAlign"]; [aCoder encodeInt: _imageAlignment forKey: @"NSAlign"];
[aCoder encodeInt: _imageScaling forKey: @"NSScale"]; [aCoder encodeInt: _imageScaling forKey: @"NSScale"];
@ -387,7 +387,7 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect)
- (id) initWithCoder: (NSCoder *)aDecoder - (id) initWithCoder: (NSCoder *)aDecoder
{ {
if((self = [super initWithCoder: aDecoder]) != nil) if ((self = [super initWithCoder: aDecoder]) != nil)
{ {
if ([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {

View file

@ -278,7 +278,7 @@ static Class imageCellClass;
- (void) encodeWithCoder: (NSCoder *)aCoder - (void) encodeWithCoder: (NSCoder *)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeBool: [self isEditable] forKey: @"NSEditable"]; [aCoder encodeBool: [self isEditable] forKey: @"NSEditable"];
} }

View file

@ -1277,13 +1277,13 @@ static NSNotificationCenter *nc;
*/ */
- (void) encodeWithCoder: (NSCoder*)encoder - (void) encodeWithCoder: (NSCoder*)encoder
{ {
if([encoder allowsKeyedCoding]) if ([encoder allowsKeyedCoding])
{ {
[encoder encodeObject: _title forKey: @"NSTitle"]; [encoder encodeObject: _title forKey: @"NSTitle"];
[encoder encodeObject: _items forKey: @"NSMenuItems"]; [encoder encodeObject: _items forKey: @"NSMenuItems"];
// if there is no supermenu, make it the main menu. // if there is no supermenu, make it the main menu.
if([self supermenu] == nil) if ([self supermenu] == nil)
{ {
[encoder encodeObject: @"_NSMainMenu" forKey: @"NSName"]; [encoder encodeObject: @"_NSMainMenu" forKey: @"NSName"];
} }

View file

@ -1592,7 +1592,7 @@ _addLeftBorderOffsetToRect(NSRect aRect)
- (void) encodeWithCoder: (NSCoder*)encoder - (void) encodeWithCoder: (NSCoder*)encoder
{ {
[super encodeWithCoder: encoder]; [super encodeWithCoder: encoder];
if([encoder allowsKeyedCoding] == NO) if ([encoder allowsKeyedCoding] == NO)
{ {
[encoder encodeObject: _itemCells]; [encoder encodeObject: _itemCells];
[encoder encodeObject: _font]; [encoder encodeObject: _font];
@ -1605,7 +1605,7 @@ _addLeftBorderOffsetToRect(NSRect aRect)
- (id) initWithCoder: (NSCoder*)decoder - (id) initWithCoder: (NSCoder*)decoder
{ {
self = [super initWithCoder: decoder]; self = [super initWithCoder: decoder];
if([decoder allowsKeyedCoding] == NO) if ([decoder allowsKeyedCoding] == NO)
{ {
[decoder decodeValueOfObjCType: @encode(id) at: &_itemCells]; [decoder decodeValueOfObjCType: @encode(id) at: &_itemCells];

View file

@ -206,7 +206,7 @@
// objects and is going to be deprecated in the future. There just so // objects and is going to be deprecated in the future. There just so
// happens to be a one to one correspondence here. // happens to be a one to one correspondence here.
// //
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
// TODO_NIB: Need to verify this key... // TODO_NIB: Need to verify this key...
ASSIGN(_nibData, [coder decodeObjectForKey: @"NSData"]); ASSIGN(_nibData, [coder decodeObjectForKey: @"NSData"]);
@ -225,7 +225,7 @@
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
// TODO_NIB: Need to verify this key... // TODO_NIB: Need to verify this key...
[coder encodeObject: _nibData [coder encodeObject: _nibData

View file

@ -163,7 +163,7 @@
BOOL flag; BOOL flag;
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
// Nothing to do here, for keyed coding this is handled by NSWindowTemplate. // Nothing to do here, for keyed coding this is handled by NSWindowTemplate.
// Calling the above method should throw an NSInvalidArgumentException. // Calling the above method should throw an NSInvalidArgumentException.
@ -184,7 +184,7 @@
BOOL flag; BOOL flag;
[super initWithCoder: aDecoder]; [super initWithCoder: aDecoder];
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
// Nothing to do here, for keyed coding this is handled by NSWindowTemplate. // Nothing to do here, for keyed coding this is handled by NSWindowTemplate.
// Calling the above method should throw an NSInvalidArgumentException. // Calling the above method should throw an NSInvalidArgumentException.

View file

@ -314,7 +314,7 @@ static NSParagraphStyle *defaultStyle = nil;
- (id) initWithCoder: (NSCoder*)aCoder - (id) initWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
// TODO_NIB: Determine keys for NSParagraphStyle, if there are any. // TODO_NIB: Determine keys for NSParagraphStyle, if there are any.
} }
@ -371,7 +371,7 @@ static NSParagraphStyle *defaultStyle = nil;
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
// TODO_NIB: Determine keys for NSParagraphStyle, if there are any. // TODO_NIB: Determine keys for NSParagraphStyle, if there are any.
} }

View file

@ -959,7 +959,7 @@ static NSImage *_pbc_image[2];
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeBool: [self altersStateOfSelectedItem] forKey: @"NSAltersState"]; [aCoder encodeBool: [self altersStateOfSelectedItem] forKey: @"NSAltersState"];
[aCoder encodeBool: [self usesItemFromMenu] forKey: @"NSUsesItemFromMenu"]; [aCoder encodeBool: [self usesItemFromMenu] forKey: @"NSUsesItemFromMenu"];
@ -967,7 +967,7 @@ static NSImage *_pbc_image[2];
[aCoder encodeInt: [self preferredEdge] forKey: @"NSPreferredEdge"]; [aCoder encodeInt: [self preferredEdge] forKey: @"NSPreferredEdge"];
// encode the menu, if present. // encode the menu, if present.
if(_menu != nil) if (_menu != nil)
{ {
[aCoder encodeObject: _menu forKey: @"NSMenu"]; [aCoder encodeObject: _menu forKey: @"NSMenu"];
} }

View file

@ -646,7 +646,7 @@ static NSMutableDictionary* printerCache;
// //
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
// TODO: Determine keys for NSPrinter. // TODO: Determine keys for NSPrinter.
} }
@ -662,7 +662,7 @@ static NSMutableDictionary* printerCache;
- (id) initWithCoder: (NSCoder*)aDecoder - (id) initWithCoder: (NSCoder*)aDecoder
{ {
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
// TODO: Determine keys for NSPrinter. // TODO: Determine keys for NSPrinter.
} }

View file

@ -290,7 +290,7 @@ static NSColor *fillColour = nil;
- (void)encodeWithCoder:(NSCoder *)aCoder - (void)encodeWithCoder:(NSCoder *)aCoder
{ {
[super encodeWithCoder:aCoder]; [super encodeWithCoder:aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
unsigned long flags = 0; unsigned long flags = 0;
id matrix = AUTORELEASE([[NSPSMatrix alloc] init]); id matrix = AUTORELEASE([[NSPSMatrix alloc] init]);

View file

@ -1218,7 +1218,7 @@ static float scrollerWidth;
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
unsigned long flags = 0; unsigned long flags = 0;
GSScrollViewFlags scrollViewFlags; GSScrollViewFlags scrollViewFlags;
@ -1228,7 +1228,7 @@ static float scrollerWidth;
[aCoder encodeObject: _contentView forKey: @"NSContentView"]; [aCoder encodeObject: _contentView forKey: @"NSContentView"];
// only encode this, if it's not null... // only encode this, if it's not null...
if(_headerClipView != nil) if (_headerClipView != nil)
{ {
[aCoder encodeObject: _headerClipView forKey: @"NSHeaderClipView"]; [aCoder encodeObject: _headerClipView forKey: @"NSHeaderClipView"];
} }
@ -1316,7 +1316,7 @@ static float scrollerWidth;
NSRect frame = [content frame]; NSRect frame = [content frame];
float w = [vScroller frame].size.width; float w = [vScroller frame].size.width;
if(_hasVertScroller) if (_hasVertScroller)
{ {
// //
// Slide the content view over, since on Mac OS X the scroller is on the // Slide the content view over, since on Mac OS X the scroller is on the

View file

@ -284,7 +284,7 @@
NSDivideRect(rect, &search, &part, ICON_WIDTH, NSMinXEdge); NSDivideRect(rect, &search, &part, ICON_WIDTH, NSMinXEdge);
} }
if(!_cancel_button_cell) if (!_cancel_button_cell)
{ {
// nothing to split off // nothing to split off
text = part; text = part;

View file

@ -135,7 +135,7 @@
- (id) initWithCoder: (NSCoder *)decoder - (id) initWithCoder: (NSCoder *)decoder
{ {
self = [super initWithCoder: decoder]; self = [super initWithCoder: decoder];
if([decoder allowsKeyedCoding]) if ([decoder allowsKeyedCoding])
{ {
// do nothing for now... // do nothing for now...
} }

View file

@ -211,7 +211,7 @@ typedef enum
// //
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeBool: _isWellKnownSelection [aCoder encodeBool: _isWellKnownSelection
forKey: @"GSIsWellKnownSelection"]; forKey: @"GSIsWellKnownSelection"];
@ -234,7 +234,7 @@ typedef enum
- (id) initWithCoder: (NSCoder*)aDecoder - (id) initWithCoder: (NSCoder*)aDecoder
{ {
[super init]; [super init];
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
_isWellKnownSelection = [aDecoder decodeBoolForKey: @"GSIsWellKnownSelection"]; _isWellKnownSelection = [aDecoder decodeBoolForKey: @"GSIsWellKnownSelection"];
_selectionType = [aDecoder decodeIntForKey: @"GSSelectionType"]; _selectionType = [aDecoder decodeIntForKey: @"GSSelectionType"];

View file

@ -727,7 +727,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
- (id) initWithCoder: (NSCoder*)decoder - (id) initWithCoder: (NSCoder*)decoder
{ {
self = [super initWithCoder: decoder]; self = [super initWithCoder: decoder];
if([decoder allowsKeyedCoding]) if ([decoder allowsKeyedCoding])
{ {
_allowsTickMarkValuesOnly = [decoder decodeBoolForKey: @"NSAllowsTickMarkValuesOnly"]; _allowsTickMarkValuesOnly = [decoder decodeBoolForKey: @"NSAllowsTickMarkValuesOnly"];
_numberOfTickMarks = [decoder decodeIntForKey: @"NSNumberOfTickMarks"]; _numberOfTickMarks = [decoder decodeIntForKey: @"NSNumberOfTickMarks"];
@ -769,7 +769,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
- (void) encodeWithCoder: (NSCoder*)coder - (void) encodeWithCoder: (NSCoder*)coder
{ {
[super encodeWithCoder: coder]; [super encodeWithCoder: coder];
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
[coder encodeBool: _allowsTickMarkValuesOnly forKey: @"NSAllowsTickMarkValuesOnly"]; [coder encodeBool: _allowsTickMarkValuesOnly forKey: @"NSAllowsTickMarkValuesOnly"];
[coder encodeInt: _numberOfTickMarks forKey: @"NSNumberOfTickMarks"]; [coder encodeInt: _numberOfTickMarks forKey: @"NSNumberOfTickMarks"];

View file

@ -667,7 +667,7 @@ return NO; \
// //
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
// TODO_NIB: Determine keys for NSSound. // TODO_NIB: Determine keys for NSSound.
} }
@ -701,7 +701,7 @@ return NO; \
- (id) initWithCoder: (NSCoder*)decoder - (id) initWithCoder: (NSCoder*)decoder
{ {
if([decoder allowsKeyedCoding]) if ([decoder allowsKeyedCoding])
{ {
// TODO_NIB: Determine keys for NSSound. // TODO_NIB: Determine keys for NSSound.
} }

View file

@ -449,7 +449,7 @@ static inline void HighlightDownButton(NSRect aRect)
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeDouble: [self increment] forKey: @"NSIncrement"]; [aCoder encodeDouble: [self increment] forKey: @"NSIncrement"];
[aCoder encodeDouble: [self maxValue] forKey: @"NSMaxValue"]; [aCoder encodeDouble: [self maxValue] forKey: @"NSMaxValue"];
@ -481,13 +481,13 @@ static inline void HighlightDownButton(NSRect aRect)
{ {
[super initWithCoder: aDecoder]; [super initWithCoder: aDecoder];
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
_autorepeat = [aDecoder decodeBoolForKey: @"NSAutorepeat"]; _autorepeat = [aDecoder decodeBoolForKey: @"NSAutorepeat"];
_valueWraps = [aDecoder decodeBoolForKey: @"NSValueWraps"]; _valueWraps = [aDecoder decodeBoolForKey: @"NSValueWraps"];
_increment = [aDecoder decodeDoubleForKey: @"NSIncrement"]; _increment = [aDecoder decodeDoubleForKey: @"NSIncrement"];
_maxValue = [aDecoder decodeDoubleForKey: @"NSMaxValue"]; _maxValue = [aDecoder decodeDoubleForKey: @"NSMaxValue"];
if([aDecoder containsValueForKey: @"NSMinValue"]) if ([aDecoder containsValueForKey: @"NSMinValue"])
{ {
_minValue = [aDecoder decodeDoubleForKey: @"NSMinValue"]; _minValue = [aDecoder decodeDoubleForKey: @"NSMinValue"];
} }

View file

@ -370,7 +370,7 @@
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeObject: _identifier forKey: @"NSIdentifier"]; [aCoder encodeObject: _identifier forKey: @"NSIdentifier"];
[aCoder encodeObject: _dataCell forKey: @"NSDataCell"]; [aCoder encodeObject: _dataCell forKey: @"NSDataCell"];

View file

@ -5120,19 +5120,19 @@ static inline float computePeriod(NSPoint mouseLocationWin,
// make sure the corner view is properly encoded... // make sure the corner view is properly encoded...
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([self dataSource]) if ([self dataSource])
{ {
[aCoder encodeObject: [self dataSource] forKey: @"NSDataSource"]; [aCoder encodeObject: [self dataSource] forKey: @"NSDataSource"];
} }
if([self delegate]) if ([self delegate])
{ {
[aCoder encodeObject: [self delegate] forKey: @"NSDelegate"]; [aCoder encodeObject: [self delegate] forKey: @"NSDelegate"];
} }
if([self target]) if ([self target])
{ {
[aCoder encodeObject: [self target] forKey: @"NSTarget"]; [aCoder encodeObject: [self target] forKey: @"NSTarget"];
} }
if([self action]) if ([self action])
{ {
[aCoder encodeObject: NSStringFromSelector([self action]) forKey: @"NSAction"]; [aCoder encodeObject: NSStringFromSelector([self action]) forKey: @"NSAction"];
} }
@ -5144,11 +5144,11 @@ static inline float computePeriod(NSPoint mouseLocationWin,
[aCoder encodeFloat: [self rowHeight] forKey: @"NSRowHeight"]; [aCoder encodeFloat: [self rowHeight] forKey: @"NSRowHeight"];
[aCoder encodeObject: [self tableColumns] forKey: @"NSTableColumns"]; [aCoder encodeObject: [self tableColumns] forKey: @"NSTableColumns"];
if(_headerView) if (_headerView)
{ {
[aCoder encodeObject: _headerView forKey: @"NSHeaderView"]; [aCoder encodeObject: _headerView forKey: @"NSHeaderView"];
} }
if(_cornerView) if (_cornerView)
{ {
[aCoder encodeObject: _cornerView forKey: @"NSCornerView"]; [aCoder encodeObject: _cornerView forKey: @"NSCornerView"];
} }

View file

@ -323,7 +323,7 @@
*/ */
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
// TODO_NIB: Determine keys for NSTextAttachment. // TODO_NIB: Determine keys for NSTextAttachment.
} }
@ -336,7 +336,7 @@
- (id) initWithCoder: (NSCoder*)aDecoder - (id) initWithCoder: (NSCoder*)aDecoder
{ {
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
// TODO_NIB: Determine keys for NSTextAttachment. // TODO_NIB: Determine keys for NSTextAttachment.
} }

View file

@ -464,7 +464,7 @@ framework intact.
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
NSSize size = _containerRect.size; NSSize size = _containerRect.size;
int flags = ((_widthTracksTextView)?1:0) | int flags = ((_widthTracksTextView)?1:0) |

View file

@ -709,7 +709,7 @@ static Class textFieldCellClass;
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if(![aCoder allowsKeyedCoding]) if (![aCoder allowsKeyedCoding])
{ {
[aCoder encodeConditionalObject: _delegate]; [aCoder encodeConditionalObject: _delegate];
[aCoder encodeValueOfObjCType: @encode(SEL) at: &_error_action]; [aCoder encodeValueOfObjCType: @encode(SEL) at: &_error_action];
@ -719,7 +719,7 @@ static Class textFieldCellClass;
- (id) initWithCoder: (NSCoder*)aDecoder - (id) initWithCoder: (NSCoder*)aDecoder
{ {
self = [super initWithCoder: aDecoder]; self = [super initWithCoder: aDecoder];
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
// do nothing for now... // do nothing for now...
} }

View file

@ -208,7 +208,7 @@ static NSColor *txtCol;
BOOL tmp; BOOL tmp;
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
[aCoder encodeObject: [self backgroundColor] forKey: @"NSBackgroundColor"]; [aCoder encodeObject: [self backgroundColor] forKey: @"NSBackgroundColor"];
[aCoder encodeObject: [self textColor] forKey: @"NSTextColor"]; [aCoder encodeObject: [self textColor] forKey: @"NSTextColor"];

View file

@ -355,7 +355,7 @@ static NSNotificationCenter *nc = nil;
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
[coder encodeObject: [self delegate] forKey: @"NSDelegate"]; [coder encodeObject: [self delegate] forKey: @"NSDelegate"];
[coder encodeObject: [self string] forKey: @"NSString"]; [coder encodeObject: [self string] forKey: @"NSString"];

View file

@ -149,7 +149,7 @@ Interface for a bunch of internal methods that need to be cleaned up.
- (id) initWithTextView: (NSTextView *)tv - (id) initWithTextView: (NSTextView *)tv
{ {
if((self = [super init]) != nil) if ((self = [super init]) != nil)
{ {
flags = (([tv isEditable]?0x01:0) | flags = (([tv isEditable]?0x01:0) |
([tv isSelectable]?0x02:0) | ([tv isSelectable]?0x02:0) |
@ -198,7 +198,7 @@ Interface for a bunch of internal methods that need to be cleaned up.
- (void) encodeWithCoder: (NSCoder *)coder - (void) encodeWithCoder: (NSCoder *)coder
{ {
if([coder allowsKeyedCoding]) if ([coder allowsKeyedCoding])
{ {
[coder encodeObject: backgroundColor forKey: @"NSBackgroundColor"]; [coder encodeObject: backgroundColor forKey: @"NSBackgroundColor"];
[coder encodeObject: paragraphStyle forKey: @"NSDefaultParagraphStyle"]; [coder encodeObject: paragraphStyle forKey: @"NSDefaultParagraphStyle"];
@ -696,7 +696,7 @@ that makes decoding and encoding compatible with the old code.
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
NSTextViewSharedData *tvsd = [[NSTextViewSharedData alloc] initWithTextView: self]; NSTextViewSharedData *tvsd = [[NSTextViewSharedData alloc] initWithTextView: self];

View file

@ -3964,7 +3964,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
// Don't attempt to archive the superview of a view which is the // Don't attempt to archive the superview of a view which is the
// content view for a window. // content view for a window.
// //
if(([[self window] contentView] != self) && _super_view != nil) if (([[self window] contentView] != self) && _super_view != nil)
{ {
[aCoder encodeObject: _super_view forKey: @"NSSuperview"]; [aCoder encodeObject: _super_view forKey: @"NSSuperview"];
} }

View file

@ -4343,7 +4343,7 @@ resetCursorRectsForView(NSView *theView)
// If were're being initialized from a keyed coder... // If were're being initialized from a keyed coder...
if([aCoder allowsKeyedCoding]) if ([aCoder allowsKeyedCoding])
{ {
// The docs indicate that there should be an error when directly encoding with // The docs indicate that there should be an error when directly encoding with
// a keyed coding archiver. We should only encode NSWindow and subclasses // a keyed coding archiver. We should only encode NSWindow and subclasses
@ -4402,7 +4402,7 @@ resetCursorRectsForView(NSView *theView)
// If were're being initialized from a keyed coder... // If were're being initialized from a keyed coder...
if([aDecoder allowsKeyedCoding]) if ([aDecoder allowsKeyedCoding])
{ {
// The docs indicate that there should be an error when directly encoding with // The docs indicate that there should be an error when directly encoding with
// a keyed coding archiver. We should only encode NSWindow and subclasses // a keyed coding archiver. We should only encode NSWindow and subclasses