Merge branch '0.9.1b'

This commit is contained in:
Klaas Pieter Annema committed 2011-06-01 12:10:10 +02:00
commit 9f2804c700
2 files changed
+6 -3

No files matched your search

+2
View File
@@ -199,6 +199,8 @@ var NSButtonIsBorderedMask = 0x00800000,
[self setImage:[cell normalImage]];
[self setImagePosition:[cell imagePosition]];
[self setEnabled:[cell isEnabled]];
return self;
}
+4 -3
View File
@@ -44,9 +44,10 @@
[self setFont:[cell font]];
[self setAlignment:[cell alignment]];
// The NSEnabled flag is never changed when changing the enabled state of a control
// Enabled state should is derived from the NSCellFlags decoded by NSCell
[self setEnabled:[cell isEnabled]];
// Enabled state is derived from the NSEnabled flag or the control's cell.
// For example NSTableView uses the NSEnabled flag, but NSButton uses it's cell isEnabled state.
// We use the NSEnabled flag here and override the behavior in controls using different logic (NSButton).
[self setEnabled:[aCoder decodeBoolForKey:@"NSEnabled"]];
[self setContinuous:[cell isContinuous]];
[self setTarget:[aCoder decodeObjectForKey:@"NSTarget"]];