mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 15:00:38 +00:00
Changed all title methods on NSButtonCell to use the
super string value methods and redefine the local string value methods to work with the object value. Patch by Matt Rice <ratmice@gmail.com>. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27946 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
04ab4d4392
commit
ac0a1fa85f
3 changed files with 37 additions and 11 deletions
|
@ -199,7 +199,7 @@ typedef struct _GSButtonCellFlags
|
|||
*/
|
||||
- (NSString*) title
|
||||
{
|
||||
return [self stringValue];
|
||||
return [super stringValue];
|
||||
}
|
||||
|
||||
/** <p>Returns the NSButtonCell's alternate title ( used when highlighted ).
|
||||
|
@ -327,7 +327,7 @@ typedef struct _GSButtonCellFlags
|
|||
*/
|
||||
- (void) setTitle: (NSString*)aString
|
||||
{
|
||||
[self setStringValue: aString];
|
||||
[super setStringValue: aString];
|
||||
}
|
||||
|
||||
/**<p>Sets the NSButtonCell's alternate title ( used when highlighted )
|
||||
|
@ -364,21 +364,17 @@ typedef struct _GSButtonCellFlags
|
|||
- (void)setAttributedAlternateTitle:(NSAttributedString *)aString
|
||||
{
|
||||
// TODO
|
||||
NSString *alternateTitle;
|
||||
|
||||
alternateTitle = AUTORELEASE ([[aString string] copy]);
|
||||
|
||||
[self setAlternateTitle: alternateTitle];
|
||||
[self setAlternateTitle: [aString string]];
|
||||
}
|
||||
|
||||
- (NSAttributedString *)attributedTitle
|
||||
{
|
||||
return [self attributedStringValue];
|
||||
return [super attributedStringValue];
|
||||
}
|
||||
|
||||
- (void)setAttributedTitle:(NSAttributedString *)aString
|
||||
{
|
||||
[self setAttributedStringValue: aString];
|
||||
[super setAttributedStringValue: aString];
|
||||
}
|
||||
|
||||
- (void)setTitleWithMnemonic:(NSString *)aString
|
||||
|
@ -809,7 +805,28 @@ typedef struct _GSButtonCellFlags
|
|||
else // NSMixedState
|
||||
{
|
||||
return [NSNumber numberWithInt: -1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setStringValue: (NSString *)aString
|
||||
{
|
||||
[self setState: ([aString length] != 0)];
|
||||
}
|
||||
|
||||
- (NSString *) stringValue
|
||||
{
|
||||
return _cell.state ? @"1" : @"";
|
||||
}
|
||||
|
||||
- (void) setAttributedStringValue: (NSAttributedString *)attrString
|
||||
{
|
||||
[self setState: ([attrString length] != 0)];
|
||||
}
|
||||
|
||||
- (NSAttributedString *) attributedStringValue
|
||||
{
|
||||
return AUTORELEASE([[NSAttributedString alloc]
|
||||
initWithString: [self stringValue]]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue