diff --git a/ChangeLog b/ChangeLog index a3fda5a49..2e667a40a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-09-24 Fred Kiefer + + * Source/NSView.m (-initWithCoder:): Added keyed decoding of + "hidden" flag. + * Source/NSCell.m (-initWithCoder:): Added the first bit of + keyed flags decoding. Values provided by Adrian Robert + . + 2004-09-23 22:33 Alexander Malmberg * Source/NSTableView.m (-mouseDown:): Fix the check that detects diff --git a/Source/NSCell.m b/Source/NSCell.m index cfbcc95da..790202b9a 100644 --- a/Source/NSCell.m +++ b/Source/NSCell.m @@ -2007,17 +2007,37 @@ static NSColor *shadowCol; { NSString *contents = [aDecoder decodeObjectForKey: @"NSContents"]; NSFont *support = [aDecoder decodeObjectForKey: @"NSSupport"]; - int cFlags; - int cFlags2; if ([aDecoder containsValueForKey: @"NSCellFlags"]) { + int cFlags; + cFlags = [aDecoder decodeIntForKey: @"NSCellFlags"]; + + // This bit flag is the other way around! + [self setWraps: ((cFlags & 0x40) != 0x40)]; + [self setContinuous: ((cFlags & 0x80000) == 0x80000)]; + [self setScrollable: ((cFlags & 0x100000) == 0x100000)]; + // Strange that this is not a simple bit flag + [self setSelectable: ((cFlags & 0x200001) == 0x200001)]; + [self setBezeled: ((cFlags & 0x400000) == 0x400000)]; + [self setBordered: ((cFlags & 0x800000) == 0x800000)]; + [self setEditable: ((cFlags & 0x10000000) == 0x10000000)]; + // This bit flag is the other way around! + [self setEnabled: ((cFlags & 0x20000000) != 0x20000000)]; + [self setHighlighted: ((cFlags & 0x40000000) == 0x40000000)]; // FIXME + } if ([aDecoder containsValueForKey: @"NSCellFlags2"]) { + int cFlags2; + cFlags2 = [aDecoder decodeIntForKey: @"NSCellFlags2"]; + [self setAllowsMixedState: ((cFlags2 & 0x1000000) == 0x1000000)]; + [self setRefusesFirstResponder: ((cFlags2 & 0x2000000) == 0x2000000)]; + [self setImportsGraphics: ((cFlags2 & 0x20000000) == 0x20000000)]; + [self setAllowsEditingTextAttributes: ((cFlags2 & 0x40000000) == 0x40000000)]; // FIXME } diff --git a/Source/NSView.m b/Source/NSView.m index 2e5f48dac..62607e7d9 100644 --- a/Source/NSView.m +++ b/Source/NSView.m @@ -3790,7 +3790,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level) // We are lucky here, Apple use the same constants // in the lower bits of the flags [self setAutoresizingMask: vFlags & 0x3F]; - [self setHidden: vFlags & (1 << 32)]; + [self setAutoresizesSubviews: ((vFlags & 0x100) == 0x100)]; + [self setHidden: ((vFlags & 0x80000000) == 0x80000000)]; } } else