2012-10-15 18:02-EDT Gregory John Casamento <greg.casamento@gmail.com>

* Source/NSButtonCell.m



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35696 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2012-10-15 22:06:22 +00:00
parent ce25719c03
commit 9cd6adf8a6
2 changed files with 20 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2012-10-15 18:02-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSButtonCell.m: Implementation for change request
bug#37233. Button should now show the return image "common_ret"
and "common_retH" when return/enter is the key equivalent.
2012-10-14 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSThemeDrawing.m (-drawTabViewRect:...selectedItem:),

View file

@ -630,6 +630,20 @@ typedef struct _GSButtonCellFlags
- (void) setKeyEquivalent: (NSString*)key
{
ASSIGNCOPY(_keyEquivalent, key);
if([self image] == nil && ([_keyEquivalent isEqualToString:@"\r"] ||
[_keyEquivalent isEqualToString:@"\n"]))
{
[self setImagePosition: NSImageRight];
[self setImage: [NSImage imageNamed:@"common_ret"]];
[self setAlternateImage: [NSImage imageNamed:@"common_retH"]];
}
else
{
[self setImagePosition: NSNoImage];
[self setImage: nil];
[self setAlternateImage: nil];
}
}
/** <p>Sets the modifier mask of the NSButtonCell's key equivalent to