* Source/NSCell.m: Correction for bug#22332.

* Source/NSSegmentedCell.m: 
        * Source/NSSegmentedControl.m: Set up default values in init 
        methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26075 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2008-02-17 01:45:17 +00:00
parent 518e863647
commit 86fdb04504
4 changed files with 40 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2008-02-16 20:43-EST Gregory John Casamento <greg_casamento@yahoo.com>
* 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 <FredKiefer@gmx.de>
* Source/NSTableColumn.m (-initWithIdentifier:): Set _width to 100

View file

@ -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];

View file

@ -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];

View file

@ -27,8 +27,24 @@
#include <AppKit/NSSegmentedControl.h>
#include <AppKit/NSEvent.h>
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
{