mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 12:30:58 +00:00
Fixes from Jonathon Gapen
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5388 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
faecf1dc76
commit
8c43a032db
2 changed files with 20 additions and 6 deletions
|
@ -75,17 +75,21 @@ id _nsbuttonCellClass = nil;
|
||||||
//
|
//
|
||||||
// Initialization
|
// Initialization
|
||||||
//
|
//
|
||||||
- init
|
- (id) init
|
||||||
{
|
{
|
||||||
return [self initWithFrame: NSZeroRect];
|
return [self initWithFrame: NSZeroRect];
|
||||||
}
|
}
|
||||||
|
|
||||||
- initWithFrame: (NSRect)frameRect
|
- (id) initWithFrame: (NSRect)frameRect
|
||||||
{
|
{
|
||||||
|
NSCell *aCell;
|
||||||
|
|
||||||
[super initWithFrame: frameRect];
|
[super initWithFrame: frameRect];
|
||||||
|
|
||||||
// set our cell
|
// set our cell
|
||||||
[self setCell: [[_nsbuttonCellClass new] autorelease]];
|
aCell = [[[self class] cellClass] new];
|
||||||
|
[self setCell: aCell];
|
||||||
|
RELEASE(aCell);
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
//
|
//
|
||||||
// class variables
|
// class variables
|
||||||
//
|
//
|
||||||
id _nspopupbuttonCellClass = nil;
|
Class _nspopupbuttonCellClass = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
// NSPopUpButton implementation
|
// NSPopUpButton implementation
|
||||||
|
@ -62,6 +62,16 @@ id _nspopupbuttonCellClass = nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (Class) cellClass
|
||||||
|
{
|
||||||
|
return _nspopupbuttonCellClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void) setCellClass: (Class)classId
|
||||||
|
{
|
||||||
|
_nspopupbuttonCellClass = classId;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initializing an NSPopUpButton
|
// Initializing an NSPopUpButton
|
||||||
//
|
//
|
||||||
|
@ -135,7 +145,7 @@ id _nspopupbuttonCellClass = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) insertItemWithTitle: (NSString *)title
|
- (void) insertItemWithTitle: (NSString *)title
|
||||||
atIndex: (int)index
|
atIndex: (int)index
|
||||||
{
|
{
|
||||||
[cell insertItemWithTitle: title adIndex: index];
|
[cell insertItemWithTitle: title adIndex: index];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue