Implement -menuForEvent: to always return nil to indicate that we don't have a context menu.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16047 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-02-22 11:33:41 +00:00
parent d78308a8e3
commit 5be49b8ab4

View file

@ -91,6 +91,18 @@ Class _nspopupbuttonCellClass = 0;
return self;
}
/*
In NSView, -menuForEvent: returns [self menu] as the context menu of the
view. Since our -menu returns the menu for our pop-up, we need to override
this to return nil to indicate that we have no context menu.
*/
- (NSMenu *)menuForEvent:(NSEvent *)theEvent
{
return nil;
}
- (void) setMenu: (NSMenu*)menu
{
[_cell setMenu: menu];