From 4e159c6bda5fe3534aee8f54688f961d2dfe2e67 Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Wed, 19 Mar 2003 16:15:21 +0000 Subject: [PATCH] Implemented [popUpContextMenu:withEvent:forView:] using [_rightMouseDisplay:]. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16209 72102866-910b-0410-8b05-ffd578937521 --- Source/NSMenu.m | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Source/NSMenu.m b/Source/NSMenu.m index 3d5b21733..aaa61f012 100644 --- a/Source/NSMenu.m +++ b/Source/NSMenu.m @@ -123,6 +123,7 @@ static NSNotificationCenter *nc; - (NSString *) _locationKey; - (NSMenuPanel *) _createWindow; - (void) _updateUserDefaults: (id) notification; +- (void) _rightMouseDisplay: (NSEvent*)theEvent; @end @@ -242,6 +243,13 @@ static NSNotificationCenter *nc; } } +- (void) _rightMouseDisplay: (NSEvent*)theEvent +{ + [self displayTransient]; + [_view mouseDown: theEvent]; + [self closeTransient]; +} + @end @@ -1025,7 +1033,7 @@ static NSNotificationCenter *nc; withEvent: (NSEvent*)event forView: (NSView*)view { - // TODO + [menu _rightMouseDisplay: event]; } /* @@ -1193,13 +1201,6 @@ static NSNotificationCenter *nc; [self _updateUserDefaults: nil]; } -- (void) _rightMouseDisplay: (NSEvent*)theEvent -{ - [self displayTransient]; - [_view mouseDown: theEvent]; - [self closeTransient]; -} - - (void) display { if (_transient)