mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:30:37 +00:00
Minor bug fixes related to lock/unlock of focus and
displaying cells when their value has changed. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2257 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bec518f970
commit
fe5dc912f5
5 changed files with 43 additions and 53 deletions
|
@ -325,46 +325,15 @@ id gnustep_gui_nsbutton_class = nil;
|
|||
[cell highlight: NO withFrame: bounds
|
||||
inView: self];
|
||||
|
||||
#if 0
|
||||
//
|
||||
// Perform different state changes based upon our type
|
||||
//
|
||||
switch ([cell type])
|
||||
{
|
||||
case NSToggleButton:
|
||||
case NSMomentaryChangeButton:
|
||||
case NSMomentaryPushButton:
|
||||
/* No state changes */
|
||||
break;
|
||||
|
||||
case NSPushOnPushOffButton:
|
||||
case NSSwitchButton:
|
||||
case NSRadioButton:
|
||||
case NSOnOffButton:
|
||||
// Toggle our state
|
||||
if ([self state])
|
||||
{
|
||||
[cell setState:0];
|
||||
NSDebugLog(@"toggle state off\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
[cell setState:1];
|
||||
NSDebugLog(@"toggle state on\n");
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
[cell setState:![self state]];
|
||||
|
||||
// Have the target perform the action
|
||||
[self sendAction:[self action] to:[self target]];
|
||||
|
||||
[cell drawWithFrame:bounds inView:self];
|
||||
[[self window] flushWindow];
|
||||
}
|
||||
[[self window] flushWindow];
|
||||
[self unlockFocus];
|
||||
|
||||
// Have the target perform the action
|
||||
if (mouseUp)
|
||||
[self sendAction:[self action] to:[self target]];
|
||||
}
|
||||
|
||||
- (void)performClick:(id)sender
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue