Made change to prevent the color well's use when disabled.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20631 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-01-29 02:54:50 +00:00
parent 79e9a091e7
commit 7700675c89
2 changed files with 26 additions and 14 deletions

View file

@ -1,3 +1,8 @@
2005-01-28 21:58 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSColorWell.m: [NSColorWell mouseDown:] prevent use
of the colorwell when it's disabled.
2005-01-28 17:57 Alexander Malmberg <alexander@malmberg.org> 2005-01-28 17:57 Alexander Malmberg <alexander@malmberg.org>
* Source/NSImageCell.m (-drawInteriorWithFrame:inView:): If our * Source/NSImageCell.m (-drawInteriorWithFrame:inView:): If our

View file

@ -277,22 +277,29 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
- (void) mouseDown: (NSEvent *)theEvent - (void) mouseDown: (NSEvent *)theEvent
{ {
NSPoint point = [self convertPoint: [theEvent locationInWindow] //
// OPENSTEP 4.2 and OSX behavior indicates that the colorwell doesn't
// work when the widget is marked as disabled.
//
if([self isEnabled])
{
NSPoint point = [self convertPoint: [theEvent locationInWindow]
fromView: nil]; fromView: nil];
if ([self mouse: point inRect: _wellRect]) if ([self mouse: point inRect: _wellRect])
{ {
[NSColorPanel dragColor: _the_color [NSColorPanel dragColor: _the_color
withEvent: theEvent withEvent: theEvent
fromView: self]; fromView: self];
} }
else if (_is_active == NO) else if (_is_active == NO)
{ {
[self activate: YES]; [self activate: YES];
} }
else else
{ {
[self deactivate]; [self deactivate];
}
} }
} }