mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
tweak acceptsFirstResponder
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3467 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1551c447ac
commit
48d1a0486f
1 changed files with 5 additions and 5 deletions
|
@ -37,7 +37,7 @@
|
|||
//
|
||||
// class variables
|
||||
//
|
||||
id gnustep_gui_nsbutton_class = nil;
|
||||
id _nsbuttonCellClass = nil;
|
||||
|
||||
//
|
||||
// NSButton implementation
|
||||
|
@ -61,12 +61,12 @@ id gnustep_gui_nsbutton_class = nil;
|
|||
//
|
||||
+ (Class)cellClass
|
||||
{
|
||||
return gnustep_gui_nsbutton_class;
|
||||
return _nsbuttonCellClass;
|
||||
}
|
||||
|
||||
+ (void)setCellClass:(Class)classId
|
||||
{
|
||||
gnustep_gui_nsbutton_class = classId;
|
||||
_nsbuttonCellClass = classId;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -85,7 +85,7 @@ id gnustep_gui_nsbutton_class = nil;
|
|||
[super initWithFrame:frameRect];
|
||||
|
||||
// set our cell
|
||||
[self setCell:[[gnustep_gui_nsbutton_class new] autorelease]];
|
||||
[self setCell:[[_nsbuttonCellClass new] autorelease]];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ id gnustep_gui_nsbutton_class = nil;
|
|||
//
|
||||
- (BOOL)acceptsFirstResponder
|
||||
{
|
||||
return [cell acceptsFirstResponder] && ([self keyEquivalent] != nil);
|
||||
return [cell acceptsFirstResponder] || ([self keyEquivalent] != nil);
|
||||
}
|
||||
|
||||
- (void) keyDown: (NSEvent*)theEvent
|
||||
|
|
Loading…
Reference in a new issue