mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:21:04 +00:00
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:
parent
6ed7d47dae
commit
57435da7d5
58 changed files with 422 additions and 230 deletions
63
ChangeLog
63
ChangeLog
|
@ -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>
|
||||
|
||||
* Source/NSImageView.m: Fix error in initial drag position.
|
||||
|
|
|
@ -147,14 +147,18 @@
|
|||
@class GSDrawTiles;
|
||||
|
||||
/**
|
||||
* This defines how the center middle image in a tile array should be
|
||||
* used when drawing a rectangle.
|
||||
* This defines how the values in a tile array should be used when
|
||||
* 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 {
|
||||
FillStyleNone, /** The image is not drawn */
|
||||
FillStyleScale, /** The image is scaled to fit */
|
||||
FillStyleRepeat, /** The image is tiled from bottom left */
|
||||
FillStyleCenter /** The image is tiled from the center */
|
||||
GSThemeFillStyleNone, /** CM image is not drawn */
|
||||
GSThemeFillStyleScale, /** CM image is scaled to fit */
|
||||
GSThemeFillStyleRepeat, /** CM image is tiled from bottom left */
|
||||
GSThemeFillStyleCenter, /** CM image is tiled from the center */
|
||||
GSThemeFillStyleMatrix /** a matrix of nine separated images */
|
||||
} GSThemeFillStyle;
|
||||
|
||||
|
||||
|
@ -349,9 +353,11 @@ APPKIT_EXPORT NSString *GSThemeDidDeactivateNotification;
|
|||
* The GUI library uses this internally to handling tiling of image
|
||||
* information to draw user interface elements. The tile information
|
||||
* 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
|
||||
|
||||
/**
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
withZone: zone];
|
||||
|
||||
// report a problem if there is one.
|
||||
if(loaded == NO)
|
||||
if (loaded == NO)
|
||||
{
|
||||
NSLog(@"Could not load Gorm file: %@",fileName);
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ enablingXResizing: (BOOL)aFlag
|
|||
-(void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeBool: _haveViews forKey: @"GSHaveViews"];
|
||||
[aCoder encodeFloat: _defaultMinXMargin forKey: @"GSDefaultMinXMargin"];
|
||||
|
@ -175,7 +175,7 @@ enablingXResizing: (BOOL)aFlag
|
|||
-(id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
[super initWithCoder: aDecoder];
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
_haveViews = [aDecoder decodeBoolForKey: @"GSHaveViews"];
|
||||
_defaultMinXMargin = [aDecoder decodeFloatForKey: @"GSDefaultMinXMargin"];
|
||||
|
|
|
@ -63,11 +63,11 @@
|
|||
{
|
||||
NSComparisonResult result = NSOrderedSame;
|
||||
|
||||
if([self priority] < [loader priority])
|
||||
if ([self priority] < [loader priority])
|
||||
{
|
||||
result = NSOrderedAscending;
|
||||
}
|
||||
if([self priority] > [loader priority])
|
||||
if ([self priority] > [loader priority])
|
||||
{
|
||||
result = NSOrderedDescending;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ static NSMutableDictionary *_modelMap = nil;
|
|||
NSEnumerator *en = [classes objectEnumerator];
|
||||
Class cls = nil;
|
||||
|
||||
while((cls = [en nextObject]) != nil)
|
||||
while ((cls = [en nextObject]) != nil)
|
||||
{
|
||||
[self registerModelLoaderClass: cls];
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ static NSMutableDictionary *_modelMap = nil;
|
|||
|
||||
+ (void) registerModelLoaderClass: (Class)aClass
|
||||
{
|
||||
if(_modelMap == nil)
|
||||
if (_modelMap == nil)
|
||||
{
|
||||
_modelMap = [[NSMutableDictionary alloc] initWithCapacity: 5];
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ static NSMutableDictionary *_modelMap = nil;
|
|||
NSFileManager *mgr = [NSFileManager defaultManager];
|
||||
NSString *ext = [modelPath pathExtension];
|
||||
|
||||
if([ext isEqual: @""])
|
||||
if ([ext isEqual: @""])
|
||||
{
|
||||
NSArray *objectArray = [_modelMap allValues];
|
||||
NSArray *sortedArray = [objectArray sortedArrayUsingSelector:
|
||||
|
@ -120,11 +120,11 @@ static NSMutableDictionary *_modelMap = nil;
|
|||
NSEnumerator *oen = [sortedArray objectEnumerator];
|
||||
Class cls = nil;
|
||||
|
||||
while((cls = [oen nextObject]) != nil && result == NO)
|
||||
while ((cls = [oen nextObject]) != nil && result == NO)
|
||||
{
|
||||
NSString *path = [modelPath stringByAppendingPathExtension:
|
||||
(NSString *)[cls type]];
|
||||
if([mgr isReadableFileAtPath: path])
|
||||
if ([mgr isReadableFileAtPath: path])
|
||||
{
|
||||
result = path;
|
||||
}
|
||||
|
@ -132,9 +132,9 @@ static NSMutableDictionary *_modelMap = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
if([_modelMap objectForKey: ext] != nil)
|
||||
if ([_modelMap objectForKey: ext] != nil)
|
||||
{
|
||||
if([mgr isReadableFileAtPath: modelPath])
|
||||
if ([mgr isReadableFileAtPath: modelPath])
|
||||
{
|
||||
result = modelPath;
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ static NSMutableDictionary *_modelMap = nil;
|
|||
Class aClass = [GSModelLoaderFactory classForType: type];
|
||||
GSModelLoader *loader = nil;
|
||||
|
||||
if(aClass != nil)
|
||||
if (aClass != nil)
|
||||
{
|
||||
loader = AUTORELEASE([[aClass alloc] init]);
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ static NSMutableDictionary *_modelMap = nil;
|
|||
NSString *path = [GSModelLoaderFactory supportedModelFileAtPath: modelPath];
|
||||
GSModelLoader *result = nil;
|
||||
|
||||
if(path != nil)
|
||||
if (path != nil)
|
||||
{
|
||||
NSString *ext = [path pathExtension];
|
||||
result = [self modelLoaderForFileType: ext];
|
||||
|
|
|
@ -70,9 +70,9 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
{
|
||||
NSEnumerator *en = [[self subviews] objectEnumerator];
|
||||
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 _setWindow: [self window]];
|
||||
|
@ -113,9 +113,9 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
wantsToBeColor: (BOOL) wantsToBeColor
|
||||
autoPositionMask: (int) autoPositionMask
|
||||
{
|
||||
if((self = [super init]) != nil)
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
if(window != nil)
|
||||
if (window != nil)
|
||||
{
|
||||
// object members
|
||||
ASSIGN(_title, [window title]);
|
||||
|
@ -163,7 +163,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
{
|
||||
_windowStyle = [coder decodeIntForKey: @"NSWindowStyleMask"];
|
||||
}
|
||||
if([coder containsValueForKey: @"NSWindowBacking"])
|
||||
if ([coder containsValueForKey: @"NSWindowBacking"])
|
||||
{
|
||||
_backingStoreType = [coder decodeIntForKey: @"NSWindowBacking"];
|
||||
}
|
||||
|
@ -234,13 +234,13 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id) nibInstantiate
|
||||
{
|
||||
if(_realObject == nil)
|
||||
if (_realObject == nil)
|
||||
{
|
||||
Class aClass;
|
||||
NSEnumerator *en;
|
||||
id v = nil;
|
||||
|
||||
if([NSClassSwapper isInInterfaceBuilder])
|
||||
if ([NSClassSwapper isInInterfaceBuilder])
|
||||
{
|
||||
aClass = [self baseWindowClass];
|
||||
}
|
||||
|
@ -290,9 +290,9 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
// swap out any views which need to be swapped...
|
||||
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];
|
||||
}
|
||||
|
@ -436,9 +436,9 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
- (id) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
self = [super initWithCoder: coder];
|
||||
if(self != nil)
|
||||
if (self != nil)
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
_className = [coder decodeObjectForKey: @"NSClassName"];
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: (id)_className forKey: @"NSClassName"];
|
||||
}
|
||||
|
@ -462,10 +462,10 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id) nibInstantiate
|
||||
{
|
||||
if(_realObject == nil)
|
||||
if (_realObject == nil)
|
||||
{
|
||||
Class aClass = NSClassFromString(_className);
|
||||
if(aClass == nil)
|
||||
if (aClass == nil)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"Unable to find class '%@'", _className];
|
||||
|
@ -520,10 +520,10 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id)nibInstantiate
|
||||
{
|
||||
if(_realObject == nil)
|
||||
if (_realObject == nil)
|
||||
{
|
||||
Class aClass = NSClassFromString(_className);
|
||||
if(aClass == nil)
|
||||
if (aClass == nil)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"Unable to find class '%@'", _className];
|
||||
|
@ -612,7 +612,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]);
|
||||
ASSIGN(_extension, [coder decodeObjectForKey: @"NSExtension"]);
|
||||
|
@ -628,7 +628,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: (id)_className forKey: @"NSClassName"];
|
||||
[coder encodeConditionalObject: (id)_extension forKey: @"NSExtension"];
|
||||
|
@ -644,11 +644,11 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id) nibInstantiate
|
||||
{
|
||||
if(_object == nil)
|
||||
if (_object == nil)
|
||||
{
|
||||
Class aClass;
|
||||
|
||||
if([NSClassSwapper isInInterfaceBuilder])
|
||||
if ([NSClassSwapper isInInterfaceBuilder])
|
||||
{
|
||||
aClass = [self class];
|
||||
}
|
||||
|
@ -657,7 +657,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
aClass = NSClassFromString(_className);
|
||||
}
|
||||
|
||||
if(aClass == nil)
|
||||
if (aClass == nil)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"Unable to find class '%@'", _className];
|
||||
|
@ -698,11 +698,11 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id) nibInstantiate
|
||||
{
|
||||
if(_view == nil)
|
||||
if (_view == nil)
|
||||
{
|
||||
Class aClass;
|
||||
|
||||
if([NSClassSwapper isInInterfaceBuilder])
|
||||
if ([NSClassSwapper isInInterfaceBuilder])
|
||||
{
|
||||
aClass = [self class];
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
aClass = NSClassFromString(_className);
|
||||
}
|
||||
|
||||
if(aClass == nil)
|
||||
if (aClass == nil)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"Unable to find class '%@'", _className];
|
||||
|
@ -731,9 +731,9 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
- (id) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
self = [super initWithCoder: coder];
|
||||
if(self != nil)
|
||||
if (self != nil)
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]);
|
||||
ASSIGN(_extension, [coder decodeObjectForKey: @"NSExtension"]);
|
||||
|
@ -751,7 +751,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
[super encodeWithCoder: coder];
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: _className forKey: @"NSClassName"];
|
||||
[coder encodeObject: _extension forKey: @"NSExtension"];
|
||||
|
@ -794,23 +794,23 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
- (id) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
id realObject = nil;
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]);
|
||||
ASSIGN(_resourceName, [coder decodeObjectForKey: @"NSResourceName"]);
|
||||
|
||||
// this is a hack, but for now it should do.
|
||||
if([_className isEqual: @"NSSound"])
|
||||
if ([_className isEqual: @"NSSound"])
|
||||
{
|
||||
realObject = RETAIN([NSSound soundNamed: _resourceName]);
|
||||
}
|
||||
else if([_className isEqual: @"NSImage"])
|
||||
else if ([_className isEqual: @"NSImage"])
|
||||
{
|
||||
realObject = RETAIN([NSImage imageNamed: _resourceName]);
|
||||
}
|
||||
|
||||
// if an object has been substituted, then release the placeholder.
|
||||
if(realObject != nil)
|
||||
if (realObject != nil)
|
||||
{
|
||||
RELEASE(self);
|
||||
}
|
||||
|
@ -827,7 +827,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: (id)_className forKey: @"NSClassName"];
|
||||
[coder encodeObject: (id)_resourceName forKey: @"NSResourceName"];
|
||||
|
@ -845,14 +845,14 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
{
|
||||
unsigned int i = 0;
|
||||
unsigned int count = GSIArrayCount(_objMap);
|
||||
for(i = 0; i < count; i++)
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id obj = GSIArrayItemAtIndex(_objMap, i).obj;
|
||||
if(obj == oldObj)
|
||||
if (obj == oldObj)
|
||||
break;
|
||||
}
|
||||
|
||||
if(i < count)
|
||||
if (i < count)
|
||||
{
|
||||
GSIArraySetItemAtIndex(_objMap, (GSIArrayItem)newObj, i);
|
||||
return YES;
|
||||
|
@ -872,7 +872,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
withClassName: (NSString *)className
|
||||
originalClassName: (NSString *)origClassName
|
||||
{
|
||||
if((self = [super init]) != nil)
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
[self setTemplate: object];
|
||||
[self setClassName: className];
|
||||
|
@ -930,12 +930,12 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
Class origCellClass = nil;
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
if(aClass == nil)
|
||||
if (aClass == nil)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
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
|
||||
// subclass responds to cellClass.
|
||||
if([aClass respondsToSelector: @selector(cellClass)] &&
|
||||
if ([aClass respondsToSelector: @selector(cellClass)] &&
|
||||
[className isEqualToString: _originalClassName] == NO)
|
||||
{
|
||||
Class origClass = NSClassFromString(_originalClassName);
|
||||
|
@ -958,12 +958,12 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
object = [aClass allocWithZone: NSDefaultMallocZone()];
|
||||
[(NSKeyedUnarchiver *)coder replaceObject: self withObject: object];
|
||||
[self setTemplate: [object initWithCoder: coder]];
|
||||
if(object != _template)
|
||||
if (object != _template)
|
||||
{
|
||||
[(NSKeyedUnarchiver *)coder replaceObject: object withObject: _template];
|
||||
}
|
||||
|
||||
if(newCellClass != nil && origCellClass != nil)
|
||||
if (newCellClass != nil && origCellClass != nil)
|
||||
{
|
||||
[(NSKeyedUnarchiver *)coder setClass: origCellClass forClassName: nil];
|
||||
}
|
||||
|
@ -971,13 +971,13 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGN(_className, [coder decodeObjectForKey: @"NSClassName"]);
|
||||
ASSIGN(_originalClassName, [coder decodeObjectForKey: @"NSOriginalClassName"]);
|
||||
|
||||
// build the real object...
|
||||
if([NSClassSwapper isInInterfaceBuilder] == YES)
|
||||
if ([NSClassSwapper isInInterfaceBuilder] == YES)
|
||||
{
|
||||
[self instantiateRealObject: coder withClassName: _originalClassName];
|
||||
}
|
||||
|
@ -998,7 +998,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: _originalClassName forKey: @"NSOriginalClassName"];
|
||||
[coder encodeObject: _className forKey: @"NSClassName"];
|
||||
|
@ -1032,7 +1032,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
NSRange colonRange = [_tag rangeOfString: @":"];
|
||||
unsigned int location = colonRange.location;
|
||||
|
||||
if(location == NSNotFound)
|
||||
if (location == NSNotFound)
|
||||
{
|
||||
NSString *newTag = [NSString stringWithFormat: @"%@:",_tag];
|
||||
[self setLabel: (id)newTag];
|
||||
|
@ -1046,10 +1046,10 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
- (id)instantiateObject: (id)obj
|
||||
{
|
||||
id newObject = obj;
|
||||
if([obj respondsToSelector: @selector(nibInstantiate)])
|
||||
if ([obj respondsToSelector: @selector(nibInstantiate)])
|
||||
{
|
||||
newObject = [obj nibInstantiate];
|
||||
if([newObject respondsToSelector: @selector(awakeFromNib)])
|
||||
if ([newObject respondsToSelector: @selector(awakeFromNib)])
|
||||
{
|
||||
// awaken the object.
|
||||
[newObject awakeFromNib];
|
||||
|
@ -1074,9 +1074,9 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
[_root setObject: owner];
|
||||
|
||||
// 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 establishConnection];
|
||||
|
@ -1085,11 +1085,11 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
// instantiate all windows and fill in the top level array.
|
||||
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];
|
||||
[topLevelObjects addObject: o];
|
||||
|
@ -1098,7 +1098,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
else
|
||||
{
|
||||
id v = NSMapGet(_objects, obj);
|
||||
if(v == nil || v == owner)
|
||||
if (v == nil || v == owner)
|
||||
{
|
||||
[topLevelObjects addObject: obj];
|
||||
}
|
||||
|
@ -1107,7 +1107,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
// bring visible windows to front...
|
||||
en = [_visibleWindows objectEnumerator];
|
||||
while((obj = [en nextObject]) != nil)
|
||||
while ((obj = [en nextObject]) != nil)
|
||||
{
|
||||
id w = [obj realObject];
|
||||
[w orderFront: self];
|
||||
|
@ -1115,7 +1115,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
// add the menu...
|
||||
menu = [self objectForName: @"MainMenu"];
|
||||
if(menu != nil)
|
||||
if (menu != nil)
|
||||
{
|
||||
menu = [self instantiateObject: menu];
|
||||
[NSApp setMainMenu: menu];
|
||||
|
@ -1176,7 +1176,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
int i = [nameValues indexOfObject: name];
|
||||
id result = nil;
|
||||
|
||||
if(i != NSNotFound)
|
||||
if (i != NSNotFound)
|
||||
{
|
||||
result = [nameKeys objectAtIndex: i];
|
||||
}
|
||||
|
@ -1201,7 +1201,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
NSMutableArray *result = [NSMutableArray array];
|
||||
NSEnumerator *en = [keys objectEnumerator];
|
||||
id key = nil;
|
||||
while((key = [en nextObject]) != nil)
|
||||
while ((key = [en nextObject]) != nil)
|
||||
{
|
||||
id value = (id)NSMapGet(map,key);
|
||||
[result addObject: value];
|
||||
|
@ -1211,7 +1211,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
NSArray *accessibilityOidsKeys = (NSArray *)NSAllMapTableKeys(_accessibilityOids);
|
||||
NSArray *accessibilityOidsValues = [self _valuesForKeys: accessibilityOidsKeys inMap: _accessibilityOids];
|
||||
|
@ -1261,7 +1261,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
id key = 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);
|
||||
}
|
||||
|
@ -1269,7 +1269,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGN(_root, [coder decodeObjectForKey: @"NSRoot"]);
|
||||
ASSIGN(_visibleWindows, (NSMutableArray *)[coder decodeObjectForKey: @"NSVisibleWindows"]);
|
||||
|
@ -1347,7 +1347,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id) init
|
||||
{
|
||||
if((self = [super init]) != nil)
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
// instantiate the maps..
|
||||
_objects = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
||||
|
@ -1417,7 +1417,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
@implementation NSButtonImageSource
|
||||
- (id) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGN(imageName, [coder decodeObjectForKey: @"NSImageName"]);
|
||||
}
|
||||
|
@ -1434,7 +1434,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: imageName forKey: @"NSImageName"];
|
||||
}
|
||||
|
@ -1448,7 +1448,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (id) initWithImageNamed: (NSString *)name
|
||||
{
|
||||
if((self = [super init]) != nil)
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
ASSIGN(imageName,name);
|
||||
}
|
||||
|
@ -1470,7 +1470,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
@implementation NSIBHelpConnector
|
||||
- (id) init
|
||||
{
|
||||
if((self = [super init]) != nil)
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
_file = nil;
|
||||
_marker = @"NSToolTipHelpKey";
|
||||
|
@ -1480,15 +1480,15 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
- (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"]);
|
||||
}
|
||||
if([coder containsValueForKey: @"NSMarker"])
|
||||
if ([coder containsValueForKey: @"NSMarker"])
|
||||
{
|
||||
_marker = RETAIN([coder decodeObjectForKey: @"NSMarker"]);
|
||||
}
|
||||
|
@ -1505,13 +1505,13 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
[super encodeWithCoder: coder];
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
if(_file != nil)
|
||||
if (_file != nil)
|
||||
{
|
||||
[coder encodeObject: _file forKey: @"NSFile"];
|
||||
}
|
||||
if(_marker != nil)
|
||||
if (_marker != nil)
|
||||
{
|
||||
[coder encodeObject: _file forKey: @"NSMarker"];
|
||||
}
|
||||
|
@ -1556,7 +1556,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
- (id) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
NSDecimalNumber *dn = nil;
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
unsigned int len = 0;
|
||||
short exponent = (short)[coder decodeIntForKey: @"NS.exponent"];
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
withZone: zone];
|
||||
|
||||
// report a problem if there is one.
|
||||
if(loaded == NO)
|
||||
if (loaded == NO)
|
||||
{
|
||||
NSLog(@"Could not load Gorm file: %@",fileName);
|
||||
}
|
||||
|
|
|
@ -722,7 +722,7 @@
|
|||
int i;
|
||||
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeInt: _numberOfRows forKey: @"GSNumberOfRows"];
|
||||
[aCoder encodeInt: _numberOfColumns forKey: @"GSNumberOfColumns"];
|
||||
|
@ -792,7 +792,7 @@
|
|||
[super initWithCoder: aDecoder];
|
||||
[super setAutoresizesSubviews: NO];
|
||||
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
_numberOfRows = [aDecoder decodeIntForKey: @"GSNumberOfRows"];
|
||||
_numberOfColumns = [aDecoder decodeIntForKey: @"GSNumberOfColumns"];
|
||||
|
|
|
@ -178,7 +178,7 @@ unCacheAttributes(NSDictionary *attrs)
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding] == NO)
|
||||
if ([aCoder allowsKeyedCoding] == NO)
|
||||
{
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &loc];
|
||||
[aCoder encodeValueOfObjCType: @encode(id) at: &attrs];
|
||||
|
@ -193,7 +193,7 @@ unCacheAttributes(NSDictionary *attrs)
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding] == NO)
|
||||
if ([aCoder allowsKeyedCoding] == NO)
|
||||
{
|
||||
NSDictionary *a;
|
||||
[aCoder decodeValueOfObjCType: @encode(unsigned) at: &loc];
|
||||
|
|
151
Source/GSTheme.m
151
Source/GSTheme.m
|
@ -397,8 +397,8 @@ static NSNull *null = nil;
|
|||
}
|
||||
|
||||
/*
|
||||
* We could cache tile info here, but it's probabaly better for the
|
||||
* tilesNamed: method to do it lazily.
|
||||
* We could cache tile info here, but it's probably better for the
|
||||
* tilesNamed:cache: method to do it lazily.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -566,10 +566,11 @@ static NSNull *null = nil;
|
|||
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)
|
||||
{
|
||||
NSDictionary *info;
|
||||
|
@ -1074,7 +1075,129 @@ withRepeatedImage: (NSImage*)image
|
|||
}
|
||||
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:
|
||||
NSMakeRect (rect.origin.x + bls.width,
|
||||
|
@ -1131,25 +1254,25 @@ withRepeatedImage: (NSImage*)image
|
|||
operation: NSCompositeSourceOver];
|
||||
|
||||
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.height - bms.height - tms.height);
|
||||
if (style == FillStyleCenter)
|
||||
if (style == GSThemeFillStyleCenter)
|
||||
{
|
||||
[self fillRect: inFill
|
||||
withRepeatedImage: tiles->images[TileCM]
|
||||
fromRect: tiles->rects[TileCM]
|
||||
center: NO];
|
||||
}
|
||||
else if (style == FillStyleRepeat)
|
||||
else if (style == GSThemeFillStyleRepeat)
|
||||
{
|
||||
[self fillRect: inFill
|
||||
withRepeatedImage: tiles->images[TileCM]
|
||||
fromRect: tiles->rects[TileCM]
|
||||
center: NO];
|
||||
}
|
||||
else if (style == FillStyleScale)
|
||||
{
|
||||
else if (style == GSThemeFillStyleScale)
|
||||
{
|
||||
[tiles->images[TileCM] setScalesWhenResized: YES];
|
||||
[tiles->images[TileCM] setSize: inFill.size];
|
||||
[tiles->images[TileCM] compositeToPoint: inFill.origin
|
||||
|
@ -1222,25 +1345,25 @@ withRepeatedImage: (NSImage*)image
|
|||
operation: NSCompositeSourceOver];
|
||||
|
||||
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.height - bms.height - tms.height);
|
||||
|
||||
if (style == FillStyleCenter)
|
||||
if (style == GSThemeFillStyleCenter)
|
||||
{
|
||||
[self fillRect: inFill
|
||||
withRepeatedImage: tiles->images[TileCM]
|
||||
fromRect: tiles->rects[TileCM]
|
||||
center: NO];
|
||||
}
|
||||
else if (style == FillStyleRepeat)
|
||||
else if (style == GSThemeFillStyleRepeat)
|
||||
{
|
||||
[self fillRect: inFill
|
||||
withRepeatedImage: tiles->images[TileCM]
|
||||
fromRect: tiles->rects[TileCM]
|
||||
center: YES];
|
||||
}
|
||||
else if (style == FillStyleScale)
|
||||
else if (style == GSThemeFillStyleScale)
|
||||
{
|
||||
[tiles->images[TileCM] setScalesWhenResized: YES];
|
||||
[tiles->images[TileCM] setSize: inFill.size];
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
*/
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding] == NO)
|
||||
if ([aCoder allowsKeyedCoding] == NO)
|
||||
{
|
||||
BOOL inside = flags.inside;
|
||||
|
||||
|
@ -127,7 +127,7 @@
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
if([aDecoder allowsKeyedCoding] == NO)
|
||||
if ([aDecoder allowsKeyedCoding] == NO)
|
||||
{
|
||||
BOOL inside;
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ enablingYResizing: (BOOL)aFlag
|
|||
-(void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeBool: _haveViews forKey: @"GSHaveViews"];
|
||||
[aCoder encodeFloat: _defaultMinYMargin forKey: @"GSDefaultMinYMargin"];
|
||||
|
@ -178,7 +178,7 @@ enablingYResizing: (BOOL)aFlag
|
|||
-(id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
[super initWithCoder: aDecoder];
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
_haveViews = [aDecoder decodeBoolForKey: @"GSHaveViews"];
|
||||
_defaultMinYMargin = [aDecoder decodeFloatForKey: @"GSDefaultMinYMargin"];
|
||||
|
|
|
@ -285,7 +285,7 @@ static Class controlClass;
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeInt: [self tag] forKey: @"NSTag"];
|
||||
[aCoder encodeObject: [self target] forKey: @"NSTarget"];
|
||||
|
|
|
@ -3292,10 +3292,10 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
/*
|
||||
if(_delegate != nil)
|
||||
if (_delegate != nil)
|
||||
{
|
||||
[aCoder encodeObject: _delegate forKey: @"NSDelegate"];
|
||||
}
|
||||
|
@ -3316,10 +3316,10 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
id obj;
|
||||
|
||||
[super initWithCoder: aDecoder];
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
/*
|
||||
if([aDecoder containsValueForKey: @"NSDelegate"])
|
||||
if ([aDecoder containsValueForKey: @"NSDelegate"])
|
||||
{
|
||||
obj = [aDecoder decodeObjectForKey: @"NSDelegate"];
|
||||
[self setDelegate: obj];
|
||||
|
|
|
@ -948,7 +948,7 @@ static BOOL supports_lzw_compression = NO;
|
|||
NSData *data = [self TIFFRepresentation];
|
||||
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeObject: data forKey: @"NSTIFFRepresentation"];
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ static NSTextFieldCell *titleCell;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder *)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
}
|
||||
else
|
||||
|
@ -169,7 +169,7 @@ static NSTextFieldCell *titleCell;
|
|||
|
||||
- (id) initWithCoder: (NSCoder *)aDecoder
|
||||
{
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -2501,7 +2501,7 @@ static NSTextFieldCell *titleCell;
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
long flags = 0;
|
||||
|
||||
|
|
|
@ -339,7 +339,7 @@ static NSFont *_leafFont;
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// simply encodes prescence...
|
||||
}
|
||||
|
|
|
@ -72,15 +72,15 @@
|
|||
{
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
if(_src != nil)
|
||||
if (_src != nil)
|
||||
{
|
||||
[aCoder encodeObject: _src forKey: @"NSSource"];
|
||||
}
|
||||
if(_dst != nil)
|
||||
if (_dst != nil)
|
||||
{
|
||||
[aCoder encodeObject: _dst forKey: @"NSDestination"];
|
||||
}
|
||||
if(_tag != nil)
|
||||
if (_tag != nil)
|
||||
{
|
||||
[aCoder encodeObject: _tag forKey: @"NSLabel"];
|
||||
}
|
||||
|
@ -101,15 +101,15 @@
|
|||
{
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
if([aDecoder containsValueForKey: @"NSDestination"])
|
||||
if ([aDecoder containsValueForKey: @"NSDestination"])
|
||||
{
|
||||
ASSIGN(_dst, [aDecoder decodeObjectForKey: @"NSDestination"]);
|
||||
}
|
||||
if([aDecoder containsValueForKey: @"NSSource"])
|
||||
if ([aDecoder containsValueForKey: @"NSSource"])
|
||||
{
|
||||
ASSIGN(_src, [aDecoder decodeObjectForKey: @"NSSource"]);
|
||||
}
|
||||
if([aDecoder containsValueForKey: @"NSLabel"])
|
||||
if ([aDecoder containsValueForKey: @"NSLabel"])
|
||||
{
|
||||
ASSIGN(_tag, [aDecoder decodeObjectForKey: @"NSLabel"]);
|
||||
}
|
||||
|
@ -323,7 +323,7 @@
|
|||
NSString *modelPath = [rootPath stringByAppendingPathComponent: fileName];
|
||||
NSString *path = [GSModelLoaderFactory supportedModelFileAtPath: modelPath];
|
||||
|
||||
if(path != nil)
|
||||
if (path != nil)
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
|
|
@ -1448,7 +1448,7 @@ typedef struct _GSButtonCellFlags
|
|||
BOOL tmp;
|
||||
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
GSButtonCellFlags buttonCellFlags;
|
||||
unsigned int bFlags = 0;
|
||||
|
@ -1456,15 +1456,15 @@ typedef struct _GSButtonCellFlags
|
|||
NSImage *image = [self image];
|
||||
NSButtonImageSource *bi = nil;
|
||||
|
||||
if([self keyEquivalent] != nil)
|
||||
if ([self keyEquivalent] != nil)
|
||||
{
|
||||
[aCoder encodeObject: [self keyEquivalent] forKey: @"NSKeyEquivalent"];
|
||||
}
|
||||
if([self image] != nil)
|
||||
if ([self image] != nil)
|
||||
{
|
||||
[aCoder encodeObject: [self image] forKey: @"NSNormalImage"];
|
||||
}
|
||||
if([self alternateTitle] != nil)
|
||||
if ([self alternateTitle] != nil)
|
||||
{
|
||||
[aCoder encodeObject: [self alternateTitle] forKey: @"NSAlternateContents"];
|
||||
}
|
||||
|
@ -1503,15 +1503,15 @@ typedef struct _GSButtonCellFlags
|
|||
[aCoder encodeInt: bFlags2 forKey: @"NSButtonFlags2"];
|
||||
|
||||
// alternate image encoding...
|
||||
if(image != nil)
|
||||
if (image != nil)
|
||||
{
|
||||
if ([image isKindOfClass: [NSImage class]] && buttonCellFlags.useButtonImageSource)
|
||||
{
|
||||
if([NSImage imageNamed: @"NSSwitch"] == image)
|
||||
if ([NSImage imageNamed: @"NSSwitch"] == image)
|
||||
{
|
||||
bi = [[NSButtonImageSource alloc] initWithImageNamed: @"NSHighlightedSwitch"];
|
||||
}
|
||||
else if([NSImage imageNamed: @"NSRadioButton"] == image)
|
||||
else if ([NSImage imageNamed: @"NSRadioButton"] == image)
|
||||
{
|
||||
bi = [[NSButtonImageSource alloc] initWithImageNamed: @"NSHighlightedRadioButton"];
|
||||
}
|
||||
|
@ -1519,11 +1519,11 @@ typedef struct _GSButtonCellFlags
|
|||
}
|
||||
|
||||
// encode button image source, if it exists...
|
||||
if(bi != nil)
|
||||
if (bi != nil)
|
||||
{
|
||||
[aCoder encodeObject: bi forKey: @"NSAlternateImage"];
|
||||
}
|
||||
else if(_altImage != nil)
|
||||
else if (_altImage != nil)
|
||||
{
|
||||
[aCoder encodeObject: _altImage forKey: @"NSAlternateImage"];
|
||||
}
|
||||
|
@ -1657,18 +1657,18 @@ typedef struct _GSButtonCellFlags
|
|||
image = [aDecoder decodeObjectForKey: @"NSAlternateImage"];
|
||||
if ([image isKindOfClass: [NSImage class]])
|
||||
{
|
||||
if([NSImage imageNamed: @"NSSwitch"] == image)
|
||||
if ([NSImage imageNamed: @"NSSwitch"] == image)
|
||||
{
|
||||
image = [NSImage imageNamed: @"NSHighlightedSwitch"];
|
||||
if([self image] == nil)
|
||||
if ([self image] == nil)
|
||||
{
|
||||
[self setImage: [NSImage imageNamed: @"NSSwitch"]];
|
||||
}
|
||||
}
|
||||
else if([NSImage imageNamed: @"NSRadioButton"] == image)
|
||||
else if ([NSImage imageNamed: @"NSRadioButton"] == image)
|
||||
{
|
||||
image = [NSImage imageNamed: @"NSHighlightedRadioButton"];
|
||||
if([self image] == nil)
|
||||
if ([self image] == nil)
|
||||
{
|
||||
[self setImage: [NSImage imageNamed: @"NSRadioButton"]];
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding] == NO)
|
||||
if ([aCoder allowsKeyedCoding] == NO)
|
||||
{
|
||||
[aCoder encodeObject: _window];
|
||||
[aCoder encodeRect: _rect];
|
||||
|
@ -177,7 +177,7 @@
|
|||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
self = [super initWithCoder: aDecoder];
|
||||
if([aDecoder allowsKeyedCoding] == NO)
|
||||
if ([aDecoder allowsKeyedCoding] == NO)
|
||||
{
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_window];
|
||||
_rect = [aDecoder decodeRect];
|
||||
|
|
|
@ -2179,7 +2179,7 @@ static NSColor *shadowCol;
|
|||
*/
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
unsigned long cFlags = 0;
|
||||
unsigned int cFlags2 = 0;
|
||||
|
@ -2216,7 +2216,7 @@ static NSColor *shadowCol;
|
|||
// font and formatter.
|
||||
[aCoder encodeObject: [self font] forKey: @"NSSupport"];
|
||||
|
||||
if([self formatter])
|
||||
if ([self formatter])
|
||||
{
|
||||
[aCoder encodeObject: [self formatter] forKey: @"NSFormatter"];
|
||||
}
|
||||
|
@ -2292,11 +2292,11 @@ static NSColor *shadowCol;
|
|||
id contents = [aDecoder decodeObjectForKey: @"NSContents"];
|
||||
|
||||
// initialize based on content...
|
||||
if([contents isKindOfClass: [NSString class]])
|
||||
if ([contents isKindOfClass: [NSString class]])
|
||||
{
|
||||
self = [self initTextCell: contents];
|
||||
}
|
||||
else if([contents isKindOfClass: [NSImage class]])
|
||||
else if ([contents isKindOfClass: [NSImage class]])
|
||||
{
|
||||
self = [self initImageCell: contents];
|
||||
}
|
||||
|
|
|
@ -753,16 +753,16 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
unsigned int flags = 0;
|
||||
[aCoder encodeObject: [self backgroundColor] forKey: @"NSBGColor"];
|
||||
[aCoder encodeObject: [self documentCursor] forKey: @"NSCursor"];
|
||||
[aCoder encodeObject: [self documentView] forKey: @"NSDocView"];
|
||||
|
||||
if([self drawsBackground])
|
||||
if ([self drawsBackground])
|
||||
flags |= 4;
|
||||
if([self copiesOnScroll] == NO)
|
||||
if ([self copiesOnScroll] == NO)
|
||||
flags |= 2;
|
||||
|
||||
[aCoder encodeInt: flags forKey: @"NScvFlags"];
|
||||
|
|
|
@ -235,7 +235,7 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeObject: _the_color forKey: @"NSColor"];
|
||||
// [aCoder encodeBool: _is_active forKey: @"NSEnabled"];
|
||||
|
@ -258,7 +258,7 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
|
|||
self = [super initWithCoder: aDecoder];
|
||||
if (self != nil)
|
||||
{
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
NSString *action;
|
||||
|
||||
|
|
|
@ -1654,7 +1654,7 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
|
|||
{
|
||||
[super encodeWithCoder: coder];
|
||||
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeBool: [self hasVerticalScroller] forKey: @"NSHasVerticalScroller"];
|
||||
[coder encodeInt: [self numberOfVisibleItems] forKey: @"NSVisibleItemCount"];
|
||||
|
|
|
@ -833,7 +833,7 @@ static Class actionCellClass;
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeObject: [self cell] forKey: @"NSCell"];
|
||||
[aCoder encodeBool: [self isEnabled] forKey: @"NSEnabled"];
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
{
|
||||
BOOL flag = NO;
|
||||
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeInt: linkNumber forKey: @"GSLinkNumber"];
|
||||
[aCoder encodeInt: disposition forKey: @"GSUpdateMode"];
|
||||
|
@ -337,7 +337,7 @@
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
id obj;
|
||||
|
||||
|
|
|
@ -333,7 +333,7 @@
|
|||
{
|
||||
BOOL flag = NO;
|
||||
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeObject: filename forKey: @"GSFilename"];
|
||||
[aCoder encodeObject: sourceLinks forKey: @"GSSourceLinks"];
|
||||
|
@ -367,7 +367,7 @@
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
BOOL flag = NO;
|
||||
id obj;
|
||||
|
|
|
@ -464,7 +464,7 @@
|
|||
ASSIGN(_saveType, [controller _nameForHumanReadableType:
|
||||
[sender titleOfSelectedItem]]);
|
||||
extensions = [controller fileExtensionsFromType: _saveType];
|
||||
if([extensions count] > 0)
|
||||
if ([extensions count] > 0)
|
||||
{
|
||||
[(NSSavePanel *)[sender window] setRequiredFileType: [extensions objectAtIndex:0]];
|
||||
}
|
||||
|
@ -484,7 +484,7 @@
|
|||
|
||||
- (void) _createPanelAccessory
|
||||
{
|
||||
if(savePanelAccessory == nil)
|
||||
if (savePanelAccessory == nil)
|
||||
{
|
||||
NSRect accessoryFrame = NSMakeRect(0,0,380,70);
|
||||
NSRect spaFrame = NSMakeRect(115,14,150,22);
|
||||
|
@ -507,7 +507,7 @@
|
|||
NSString *title = nil;
|
||||
int i = 0;
|
||||
|
||||
while((title = [en nextObject]) != nil)
|
||||
while ((title = [en nextObject]) != nil)
|
||||
{
|
||||
[spaButton addItemWithTitle: title];
|
||||
i++;
|
||||
|
@ -517,11 +517,11 @@
|
|||
[spaButton setEnabled: (i > 0)];
|
||||
|
||||
// if we have some items, select the current filetype.
|
||||
if(i > 0)
|
||||
if (i > 0)
|
||||
{
|
||||
NSString *title = [[NSDocumentController sharedDocumentController]
|
||||
displayNameForType: [self fileType]];
|
||||
if([spaButton itemWithTitle: title] != nil)
|
||||
if ([spaButton itemWithTitle: title] != nil)
|
||||
{
|
||||
[spaButton selectItemWithTitle: title];
|
||||
}
|
||||
|
@ -558,7 +558,7 @@
|
|||
{
|
||||
NSArray *extensions = [[NSDocumentController sharedDocumentController]
|
||||
fileExtensionsFromType: [self fileTypeFromLastRunSavePanel]];
|
||||
if([extensions count] > 0)
|
||||
if ([extensions count] > 0)
|
||||
{
|
||||
[savePanel setRequiredFileType:[extensions objectAtIndex:0]];
|
||||
}
|
||||
|
@ -736,7 +736,7 @@
|
|||
NSArray *extensions = [[NSDocumentController sharedDocumentController]
|
||||
fileExtensionsFromType: fileType];
|
||||
|
||||
if([extensions count] > 0)
|
||||
if ([extensions count] > 0)
|
||||
{
|
||||
NSString *extension = [extensions objectAtIndex: 0];
|
||||
NSString *newFileName = [[fileName stringByDeletingPathExtension]
|
||||
|
|
|
@ -873,7 +873,7 @@ static NSString *NSViewerRole = @"Viewer";
|
|||
NSEnumerator *en = [types objectEnumerator];
|
||||
NSString *type = nil;
|
||||
NSMutableArray *result = [NSMutableArray arrayWithCapacity: 10];
|
||||
while((type = (NSString *)[en nextObject]) != nil)
|
||||
while ((type = (NSString *)[en nextObject]) != nil)
|
||||
{
|
||||
NSString *name = [self displayNameForType: type];
|
||||
[result addObject: name];
|
||||
|
|
|
@ -395,10 +395,10 @@ static NSColor *shadowCol;
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
/*
|
||||
if([self stringValue] != nil)
|
||||
if ([self stringValue] != nil)
|
||||
{
|
||||
[aCoder encodeObject: [self stringValue] forKey: @"NSContents"];
|
||||
}
|
||||
|
|
|
@ -1479,11 +1479,11 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
{
|
||||
BOOL flag;
|
||||
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
// FIXME: Not sure this is the way it goes...
|
||||
/*
|
||||
if(_flags.archiveByName == NO)
|
||||
if (_flags.archiveByName == NO)
|
||||
{
|
||||
NSMutableArray *container = [NSMutableArray array];
|
||||
NSMutableArray *reps = [NSMutableArray array];
|
||||
|
@ -1492,7 +1492,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
|
||||
// add the reps to the container...
|
||||
[container addObject: reps];
|
||||
while((rd = [en nextObject]) != nil)
|
||||
while ((rd = [en nextObject]) != nil)
|
||||
{
|
||||
[reps addObject: rd->rep];
|
||||
}
|
||||
|
|
|
@ -369,7 +369,7 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect)
|
|||
- (void) encodeWithCoder: (NSCoder *)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeInt: _imageAlignment forKey: @"NSAlign"];
|
||||
[aCoder encodeInt: _imageScaling forKey: @"NSScale"];
|
||||
|
@ -387,7 +387,7 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect)
|
|||
|
||||
- (id) initWithCoder: (NSCoder *)aDecoder
|
||||
{
|
||||
if((self = [super initWithCoder: aDecoder]) != nil)
|
||||
if ((self = [super initWithCoder: aDecoder]) != nil)
|
||||
{
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
|
|
|
@ -278,7 +278,7 @@ static Class imageCellClass;
|
|||
- (void) encodeWithCoder: (NSCoder *)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeBool: [self isEditable] forKey: @"NSEditable"];
|
||||
}
|
||||
|
|
|
@ -1277,13 +1277,13 @@ static NSNotificationCenter *nc;
|
|||
*/
|
||||
- (void) encodeWithCoder: (NSCoder*)encoder
|
||||
{
|
||||
if([encoder allowsKeyedCoding])
|
||||
if ([encoder allowsKeyedCoding])
|
||||
{
|
||||
[encoder encodeObject: _title forKey: @"NSTitle"];
|
||||
[encoder encodeObject: _items forKey: @"NSMenuItems"];
|
||||
|
||||
// if there is no supermenu, make it the main menu.
|
||||
if([self supermenu] == nil)
|
||||
if ([self supermenu] == nil)
|
||||
{
|
||||
[encoder encodeObject: @"_NSMainMenu" forKey: @"NSName"];
|
||||
}
|
||||
|
|
|
@ -1592,7 +1592,7 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
|||
- (void) encodeWithCoder: (NSCoder*)encoder
|
||||
{
|
||||
[super encodeWithCoder: encoder];
|
||||
if([encoder allowsKeyedCoding] == NO)
|
||||
if ([encoder allowsKeyedCoding] == NO)
|
||||
{
|
||||
[encoder encodeObject: _itemCells];
|
||||
[encoder encodeObject: _font];
|
||||
|
@ -1605,7 +1605,7 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
|||
- (id) initWithCoder: (NSCoder*)decoder
|
||||
{
|
||||
self = [super initWithCoder: decoder];
|
||||
if([decoder allowsKeyedCoding] == NO)
|
||||
if ([decoder allowsKeyedCoding] == NO)
|
||||
{
|
||||
[decoder decodeValueOfObjCType: @encode(id) at: &_itemCells];
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@
|
|||
// objects and is going to be deprecated in the future. There just so
|
||||
// happens to be a one to one correspondence here.
|
||||
//
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
// TODO_NIB: Need to verify this key...
|
||||
ASSIGN(_nibData, [coder decodeObjectForKey: @"NSData"]);
|
||||
|
@ -225,7 +225,7 @@
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
// TODO_NIB: Need to verify this key...
|
||||
[coder encodeObject: _nibData
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
BOOL flag;
|
||||
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// Nothing to do here, for keyed coding this is handled by NSWindowTemplate.
|
||||
// Calling the above method should throw an NSInvalidArgumentException.
|
||||
|
@ -184,7 +184,7 @@
|
|||
BOOL flag;
|
||||
|
||||
[super initWithCoder: aDecoder];
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
// Nothing to do here, for keyed coding this is handled by NSWindowTemplate.
|
||||
// Calling the above method should throw an NSInvalidArgumentException.
|
||||
|
|
|
@ -314,7 +314,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// TODO_NIB: Determine keys for NSParagraphStyle, if there are any.
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// TODO_NIB: Determine keys for NSParagraphStyle, if there are any.
|
||||
}
|
||||
|
|
|
@ -959,7 +959,7 @@ static NSImage *_pbc_image[2];
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeBool: [self altersStateOfSelectedItem] forKey: @"NSAltersState"];
|
||||
[aCoder encodeBool: [self usesItemFromMenu] forKey: @"NSUsesItemFromMenu"];
|
||||
|
@ -967,7 +967,7 @@ static NSImage *_pbc_image[2];
|
|||
[aCoder encodeInt: [self preferredEdge] forKey: @"NSPreferredEdge"];
|
||||
|
||||
// encode the menu, if present.
|
||||
if(_menu != nil)
|
||||
if (_menu != nil)
|
||||
{
|
||||
[aCoder encodeObject: _menu forKey: @"NSMenu"];
|
||||
}
|
||||
|
|
|
@ -646,7 +646,7 @@ static NSMutableDictionary* printerCache;
|
|||
//
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// TODO: Determine keys for NSPrinter.
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ static NSMutableDictionary* printerCache;
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
// TODO: Determine keys for NSPrinter.
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ static NSColor *fillColour = nil;
|
|||
- (void)encodeWithCoder:(NSCoder *)aCoder
|
||||
{
|
||||
[super encodeWithCoder:aCoder];
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
unsigned long flags = 0;
|
||||
id matrix = AUTORELEASE([[NSPSMatrix alloc] init]);
|
||||
|
|
|
@ -1218,7 +1218,7 @@ static float scrollerWidth;
|
|||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
unsigned long flags = 0;
|
||||
GSScrollViewFlags scrollViewFlags;
|
||||
|
@ -1228,7 +1228,7 @@ static float scrollerWidth;
|
|||
[aCoder encodeObject: _contentView forKey: @"NSContentView"];
|
||||
|
||||
// only encode this, if it's not null...
|
||||
if(_headerClipView != nil)
|
||||
if (_headerClipView != nil)
|
||||
{
|
||||
[aCoder encodeObject: _headerClipView forKey: @"NSHeaderClipView"];
|
||||
}
|
||||
|
@ -1316,7 +1316,7 @@ static float scrollerWidth;
|
|||
NSRect frame = [content frame];
|
||||
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
|
||||
|
|
|
@ -284,7 +284,7 @@
|
|||
NSDivideRect(rect, &search, &part, ICON_WIDTH, NSMinXEdge);
|
||||
}
|
||||
|
||||
if(!_cancel_button_cell)
|
||||
if (!_cancel_button_cell)
|
||||
{
|
||||
// nothing to split off
|
||||
text = part;
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
- (id) initWithCoder: (NSCoder *)decoder
|
||||
{
|
||||
self = [super initWithCoder: decoder];
|
||||
if([decoder allowsKeyedCoding])
|
||||
if ([decoder allowsKeyedCoding])
|
||||
{
|
||||
// do nothing for now...
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@ typedef enum
|
|||
//
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeBool: _isWellKnownSelection
|
||||
forKey: @"GSIsWellKnownSelection"];
|
||||
|
@ -234,7 +234,7 @@ typedef enum
|
|||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
[super init];
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
_isWellKnownSelection = [aDecoder decodeBoolForKey: @"GSIsWellKnownSelection"];
|
||||
_selectionType = [aDecoder decodeIntForKey: @"GSSelectionType"];
|
||||
|
|
|
@ -727,7 +727,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
|
|||
- (id) initWithCoder: (NSCoder*)decoder
|
||||
{
|
||||
self = [super initWithCoder: decoder];
|
||||
if([decoder allowsKeyedCoding])
|
||||
if ([decoder allowsKeyedCoding])
|
||||
{
|
||||
_allowsTickMarkValuesOnly = [decoder decodeBoolForKey: @"NSAllowsTickMarkValuesOnly"];
|
||||
_numberOfTickMarks = [decoder decodeIntForKey: @"NSNumberOfTickMarks"];
|
||||
|
@ -769,7 +769,7 @@ float _floatValueForMousePoint (NSPoint point, NSRect knobRect,
|
|||
- (void) encodeWithCoder: (NSCoder*)coder
|
||||
{
|
||||
[super encodeWithCoder: coder];
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeBool: _allowsTickMarkValuesOnly forKey: @"NSAllowsTickMarkValuesOnly"];
|
||||
[coder encodeInt: _numberOfTickMarks forKey: @"NSNumberOfTickMarks"];
|
||||
|
|
|
@ -667,7 +667,7 @@ return NO; \
|
|||
//
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
// TODO_NIB: Determine keys for NSSound.
|
||||
}
|
||||
|
@ -701,7 +701,7 @@ return NO; \
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)decoder
|
||||
{
|
||||
if([decoder allowsKeyedCoding])
|
||||
if ([decoder allowsKeyedCoding])
|
||||
{
|
||||
// TODO_NIB: Determine keys for NSSound.
|
||||
}
|
||||
|
|
|
@ -449,7 +449,7 @@ static inline void HighlightDownButton(NSRect aRect)
|
|||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeDouble: [self increment] forKey: @"NSIncrement"];
|
||||
[aCoder encodeDouble: [self maxValue] forKey: @"NSMaxValue"];
|
||||
|
@ -481,13 +481,13 @@ static inline void HighlightDownButton(NSRect aRect)
|
|||
{
|
||||
[super initWithCoder: aDecoder];
|
||||
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
_autorepeat = [aDecoder decodeBoolForKey: @"NSAutorepeat"];
|
||||
_valueWraps = [aDecoder decodeBoolForKey: @"NSValueWraps"];
|
||||
_increment = [aDecoder decodeDoubleForKey: @"NSIncrement"];
|
||||
_maxValue = [aDecoder decodeDoubleForKey: @"NSMaxValue"];
|
||||
if([aDecoder containsValueForKey: @"NSMinValue"])
|
||||
if ([aDecoder containsValueForKey: @"NSMinValue"])
|
||||
{
|
||||
_minValue = [aDecoder decodeDoubleForKey: @"NSMinValue"];
|
||||
}
|
||||
|
|
|
@ -370,7 +370,7 @@
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeObject: _identifier forKey: @"NSIdentifier"];
|
||||
[aCoder encodeObject: _dataCell forKey: @"NSDataCell"];
|
||||
|
|
|
@ -5120,19 +5120,19 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
|||
// make sure the corner view is properly encoded...
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
if([self dataSource])
|
||||
if ([self dataSource])
|
||||
{
|
||||
[aCoder encodeObject: [self dataSource] forKey: @"NSDataSource"];
|
||||
}
|
||||
if([self delegate])
|
||||
if ([self delegate])
|
||||
{
|
||||
[aCoder encodeObject: [self delegate] forKey: @"NSDelegate"];
|
||||
}
|
||||
if([self target])
|
||||
if ([self target])
|
||||
{
|
||||
[aCoder encodeObject: [self target] forKey: @"NSTarget"];
|
||||
}
|
||||
if([self action])
|
||||
if ([self action])
|
||||
{
|
||||
[aCoder encodeObject: NSStringFromSelector([self action]) forKey: @"NSAction"];
|
||||
}
|
||||
|
@ -5144,11 +5144,11 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
|||
[aCoder encodeFloat: [self rowHeight] forKey: @"NSRowHeight"];
|
||||
[aCoder encodeObject: [self tableColumns] forKey: @"NSTableColumns"];
|
||||
|
||||
if(_headerView)
|
||||
if (_headerView)
|
||||
{
|
||||
[aCoder encodeObject: _headerView forKey: @"NSHeaderView"];
|
||||
}
|
||||
if(_cornerView)
|
||||
if (_cornerView)
|
||||
{
|
||||
[aCoder encodeObject: _cornerView forKey: @"NSCornerView"];
|
||||
}
|
||||
|
|
|
@ -323,7 +323,7 @@
|
|||
*/
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
// TODO_NIB: Determine keys for NSTextAttachment.
|
||||
}
|
||||
|
@ -336,7 +336,7 @@
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
// TODO_NIB: Determine keys for NSTextAttachment.
|
||||
}
|
||||
|
|
|
@ -464,7 +464,7 @@ framework intact.
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
NSSize size = _containerRect.size;
|
||||
int flags = ((_widthTracksTextView)?1:0) |
|
||||
|
|
|
@ -709,7 +709,7 @@ static Class textFieldCellClass;
|
|||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
if(![aCoder allowsKeyedCoding])
|
||||
if (![aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeConditionalObject: _delegate];
|
||||
[aCoder encodeValueOfObjCType: @encode(SEL) at: &_error_action];
|
||||
|
@ -719,7 +719,7 @@ static Class textFieldCellClass;
|
|||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
self = [super initWithCoder: aDecoder];
|
||||
if([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
// do nothing for now...
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ static NSColor *txtCol;
|
|||
BOOL tmp;
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeObject: [self backgroundColor] forKey: @"NSBackgroundColor"];
|
||||
[aCoder encodeObject: [self textColor] forKey: @"NSTextColor"];
|
||||
|
|
|
@ -355,7 +355,7 @@ static NSNotificationCenter *nc = nil;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: [self delegate] forKey: @"NSDelegate"];
|
||||
[coder encodeObject: [self string] forKey: @"NSString"];
|
||||
|
|
|
@ -149,7 +149,7 @@ Interface for a bunch of internal methods that need to be cleaned up.
|
|||
|
||||
- (id) initWithTextView: (NSTextView *)tv
|
||||
{
|
||||
if((self = [super init]) != nil)
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
flags = (([tv isEditable]?0x01: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
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
[coder encodeObject: backgroundColor forKey: @"NSBackgroundColor"];
|
||||
[coder encodeObject: paragraphStyle forKey: @"NSDefaultParagraphStyle"];
|
||||
|
@ -696,7 +696,7 @@ that makes decoding and encoding compatible with the old code.
|
|||
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
if([aCoder allowsKeyedCoding])
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
NSTextViewSharedData *tvsd = [[NSTextViewSharedData alloc] initWithTextView: self];
|
||||
|
||||
|
|
|
@ -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
|
||||
// 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"];
|
||||
}
|
||||
|
|
|
@ -4343,7 +4343,7 @@ resetCursorRectsForView(NSView *theView)
|
|||
|
||||
|
||||
// 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
|
||||
// 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([aDecoder allowsKeyedCoding])
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
// The docs indicate that there should be an error when directly encoding with
|
||||
// a keyed coding archiver. We should only encode NSWindow and subclasses
|
||||
|
|
Loading…
Reference in a new issue