Really commit the NSTextContainer changes of r30491 and not only their

change log.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30497 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2010-05-30 20:57:01 +00:00
parent 724a198f41
commit cec8360d99

View file

@ -117,7 +117,7 @@ use bounds rectangle instead of frame? */
- (id) init
{
return [self initWithContainerSize: NSZeroSize];
return [self initWithContainerSize: NSMakeSize(1e7, 1e7)];
}
- (void) dealloc
@ -465,8 +465,7 @@ framework intact.
{
if ([aDecoder allowsKeyedCoding])
{
NSSize size = NSZeroSize;
// NSTextView *view = [aDecoder decodeObjectForKey: @"NSTextView"];
NSSize size = NSMakeSize(1e7, 1e7);
if ([aDecoder containsValueForKey: @"NSWidth"])
{
@ -478,9 +477,10 @@ framework intact.
int flags = [aDecoder decodeIntForKey: @"NSTCFlags"];
// decode the flags.
_widthTracksTextView = flags & 1;
_heightTracksTextView = flags & 2;
_observingFrameChanges = flags & 4;
_widthTracksTextView = (flags & 1) != 0;
_heightTracksTextView = (flags & 2) != 0;
// Mac OS X doesn't seem to save this flag
_observingFrameChanges = _widthTracksTextView | _heightTracksTextView;
}
// decoding the manager adds this text container automatically...
@ -489,7 +489,6 @@ framework intact.
_layoutManager = [aDecoder decodeObjectForKey: @"NSLayoutManager"];
}
// [self setTextView: view];
return self;
}
else
@ -508,10 +507,9 @@ framework intact.
((_observingFrameChanges)?4:0);
[coder encodeObject: _textView forKey: @"NSTextView"];
[coder encodeObject: _layoutManager forKey: @"NSLayoutManager"];
[coder encodeFloat: size.width forKey: @"NSWidth"];
[coder encodeInt: flags forKey: @"NSTCFlags"];
// TODO: Add layout manager encoding, if needed...
}
}