diff --git a/ChangeLog b/ChangeLog index aeb2c3cc4..2a2d105ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-16 20:43-EST Gregory John Casamento + + * Source/NSCell.m: Correction for bug#22332. + * Source/NSSegmentedCell.m: + * Source/NSSegmentedControl.m: Set up default values in init + methods. + 2008-02-16 Fred Kiefer * Source/NSTableColumn.m (-initWithIdentifier:): Set _width to 100 diff --git a/Source/NSCell.m b/Source/NSCell.m index ef563b19a..1389eb217 100644 --- a/Source/NSCell.m +++ b/Source/NSCell.m @@ -2647,7 +2647,7 @@ static NSColor *shadowCol; } _action_mask = mask; } - _action_mask = NSLeftMouseUpMask; + _action_mask |= NSLeftMouseUpMask; [aDecoder decodeValueOfObjCType: @encode(id) at: &formatter]; [self setFormatter: formatter]; [aDecoder decodeValueOfObjCType: @encode(id) at: &menu]; diff --git a/Source/NSSegmentedCell.m b/Source/NSSegmentedCell.m index 1dd0295fb..665a01b55 100644 --- a/Source/NSSegmentedCell.m +++ b/Source/NSSegmentedCell.m @@ -252,12 +252,27 @@ @implementation NSSegmentedCell +- (id) init +{ + self = [super initTextCell: @""]; + if (!self) + return nil; + + _segmentCellFlags._tracking_mode = NSSegmentSwitchTrackingSelectOne; + _items = [[NSMutableArray alloc] initWithCapacity: 2]; + _selected_segment = -1; + [self setAlignment: NSCenterTextAlignment]; + + return self; +} + - (id) initImageCell: (NSImage*)anImage { self = [super initImageCell: anImage]; if (!self) return nil; + _segmentCellFlags._tracking_mode = NSSegmentSwitchTrackingSelectOne; _items = [[NSMutableArray alloc] initWithCapacity: 2]; _selected_segment = -1; [self setAlignment: NSCenterTextAlignment]; @@ -271,6 +286,7 @@ if (!self) return nil; + _segmentCellFlags._tracking_mode = NSSegmentSwitchTrackingSelectOne; _items = [[NSMutableArray alloc] initWithCapacity: 2]; _selected_segment = -1; [self setAlignment: NSCenterTextAlignment]; diff --git a/Source/NSSegmentedControl.m b/Source/NSSegmentedControl.m index 5a49c896c..99669f61f 100644 --- a/Source/NSSegmentedControl.m +++ b/Source/NSSegmentedControl.m @@ -27,8 +27,24 @@ #include #include +static Class segmentedControlCellClass; + @implementation NSSegmentedControl ++ (void) initialize +{ + if(self == [NSSegmentedControl class]) + { + [self setVersion: 1]; + segmentedControlCellClass = [NSSegmentedCell class]; + } +} + ++ (Class) cellClass +{ + return segmentedControlCellClass; +} + // Specifying number of segments... - (void) setSegmentCount: (int) count {