diff --git a/ChangeLog b/ChangeLog index 904476556..002a24d56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-24 10:54-EDT Gregory John Casamento + + * Headers/AppKit/NSWindow.h: Minor cleanup and spacing. + * Source/GSNibTemplates.m: Removed call to designated init, since + this is handled by the initWithCOoder method in NSWindow.m. + * Source/NSWindow.m: Correction for calling the designated initializer. + Fix for bug#23336. + 2008-05-21 Fred Kiefer * Source/NSAttributedString.m (-_substituteFontFor:font:fromList:): diff --git a/Headers/AppKit/NSWindow.h b/Headers/AppKit/NSWindow.h index 18c4f1ca3..a53273160 100644 --- a/Headers/AppKit/NSWindow.h +++ b/Headers/AppKit/NSWindow.h @@ -191,16 +191,16 @@ APPKIT_EXPORT NSSize NSTokenSize; NSRect _rectNeedingFlush; NSMutableArray *_rectsBeingDrawn; unsigned _disableFlushWindow; - + NSWindowDepth _depthLimit; NSWindowController *_windowController; - int _counterpart; + int _counterpart; float _alphaValue; NSMutableArray *_children; - NSWindow *_parent; + NSWindow *_parent; NSCachedImageRep *_cachedImage; - NSPoint _cachedImageOrigin; + NSPoint _cachedImageOrigin; struct GSWindowFlagsType { unsigned accepts_drag:1; diff --git a/Source/GSNibTemplates.m b/Source/GSNibTemplates.m index 07319696e..cc018bd86 100644 --- a/Source/GSNibTemplates.m +++ b/Source/GSNibTemplates.m @@ -910,40 +910,20 @@ static NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedN _screenRect = [[_object screen] frame]; } - if ([self shouldSwapClass]) - { - if (GSGetMethod([obj class], @selector(initWithContentRect:styleMask:backing:defer:), YES, NO) != NULL - && ![_className isEqualToString: NSStringFromClass(_superClass)]) - { - NSView *contentView = [obj contentView]; + // FIXME: The designated initializer logic for NSWindow is in the initWithCoder: method of + // NSWindow. Unfortunately, this means that the "defer" flag for NSWindows and NSWindow + // subclasses in gorm files will be ignored. This shouldn't have a great impact, + // but it is not the correct behavior. - // if we are not in an interface builder, call - // designated initializer per spec... - RETAIN(contentView); // prevent view from being deallocated. - obj = [obj initWithContentRect: [contentView frame] - styleMask: [obj styleMask] - backing: [obj backingType] - defer: _deferFlag]; - - // set the content view back - [obj setContentView: contentView]; - RELEASE(contentView); // release view. - } - - // autoposition window - [self autoPositionWindow: obj]; - } - else + // + // Set all of the attributes into the object, if it + // responds to any of these methods. + // + if ([obj respondsToSelector: @selector(setAutoPositionMask:)]) { - // - // Set all of the attributes into the object, if it - // responds to any of these methods. - // - if ([obj respondsToSelector: @selector(setAutoPositionMask:)]) - { - [obj setAutoPositionMask: [self autoPositionMask]]; - } + [obj setAutoPositionMask: [self autoPositionMask]]; } + RELEASE(self); } return obj; diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 76f51a0ae..52ed3f0e6 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -4899,11 +4899,11 @@ current key view.
[aDecoder decodeValueOfObjCType: @encode(NSBackingStoreType) at: &aBacking]; + // call the designated initializer.... self = [self initWithContentRect: aRect styleMask: aStyle backing: aBacking - defer: NO - screen: nil]; + defer: NO]; p = [aDecoder decodePoint]; obj = [aDecoder decodeObject];