mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 07:40:55 +00:00
* 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:
parent
e8195fd09d
commit
7b09a29b5c
4 changed files with 40 additions and 1 deletions
|
@ -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>
|
2008-02-16 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSTableColumn.m (-initWithIdentifier:): Set _width to 100
|
* Source/NSTableColumn.m (-initWithIdentifier:): Set _width to 100
|
||||||
|
|
|
@ -2647,7 +2647,7 @@ static NSColor *shadowCol;
|
||||||
}
|
}
|
||||||
_action_mask = mask;
|
_action_mask = mask;
|
||||||
}
|
}
|
||||||
_action_mask = NSLeftMouseUpMask;
|
_action_mask |= NSLeftMouseUpMask;
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &formatter];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &formatter];
|
||||||
[self setFormatter: formatter];
|
[self setFormatter: formatter];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &menu];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &menu];
|
||||||
|
|
|
@ -252,12 +252,27 @@
|
||||||
|
|
||||||
@implementation NSSegmentedCell
|
@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
|
- (id) initImageCell: (NSImage*)anImage
|
||||||
{
|
{
|
||||||
self = [super initImageCell: anImage];
|
self = [super initImageCell: anImage];
|
||||||
if (!self)
|
if (!self)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
|
_segmentCellFlags._tracking_mode = NSSegmentSwitchTrackingSelectOne;
|
||||||
_items = [[NSMutableArray alloc] initWithCapacity: 2];
|
_items = [[NSMutableArray alloc] initWithCapacity: 2];
|
||||||
_selected_segment = -1;
|
_selected_segment = -1;
|
||||||
[self setAlignment: NSCenterTextAlignment];
|
[self setAlignment: NSCenterTextAlignment];
|
||||||
|
@ -271,6 +286,7 @@
|
||||||
if (!self)
|
if (!self)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
|
_segmentCellFlags._tracking_mode = NSSegmentSwitchTrackingSelectOne;
|
||||||
_items = [[NSMutableArray alloc] initWithCapacity: 2];
|
_items = [[NSMutableArray alloc] initWithCapacity: 2];
|
||||||
_selected_segment = -1;
|
_selected_segment = -1;
|
||||||
[self setAlignment: NSCenterTextAlignment];
|
[self setAlignment: NSCenterTextAlignment];
|
||||||
|
|
|
@ -27,8 +27,24 @@
|
||||||
#include <AppKit/NSSegmentedControl.h>
|
#include <AppKit/NSSegmentedControl.h>
|
||||||
#include <AppKit/NSEvent.h>
|
#include <AppKit/NSEvent.h>
|
||||||
|
|
||||||
|
static Class segmentedControlCellClass;
|
||||||
|
|
||||||
@implementation NSSegmentedControl
|
@implementation NSSegmentedControl
|
||||||
|
|
||||||
|
+ (void) initialize
|
||||||
|
{
|
||||||
|
if(self == [NSSegmentedControl class])
|
||||||
|
{
|
||||||
|
[self setVersion: 1];
|
||||||
|
segmentedControlCellClass = [NSSegmentedCell class];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (Class) cellClass
|
||||||
|
{
|
||||||
|
return segmentedControlCellClass;
|
||||||
|
}
|
||||||
|
|
||||||
// Specifying number of segments...
|
// Specifying number of segments...
|
||||||
- (void) setSegmentCount: (int) count
|
- (void) setSegmentCount: (int) count
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue