mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 02:10:48 +00:00
Implemented NSMenu removeAllItems method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37996 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
21ffab74f8
commit
61695272c5
3 changed files with 22 additions and 0 deletions
|
@ -829,6 +829,15 @@ static BOOL menuBarVisible = YES;
|
|||
[self menuChanged];
|
||||
}
|
||||
|
||||
- (void) removeAllItems
|
||||
{
|
||||
[_items makeObjectsPerformSelector:@selector(setMenu:) withObject:nil];
|
||||
[_items removeAllObjects];
|
||||
_menu.needsSizing = YES;
|
||||
[(NSMenuView*)_view setNeedsSizing: YES];
|
||||
[self menuChanged];
|
||||
}
|
||||
|
||||
- (void) itemChanged: (id <NSMenuItem>)anObject
|
||||
{
|
||||
NSNotification *changed;
|
||||
|
@ -1563,6 +1572,10 @@ static BOOL menuBarVisible = YES;
|
|||
forView: (NSView *)view
|
||||
withFont: (NSFont *)font
|
||||
{
|
||||
NSPoint point = [view frame].origin;
|
||||
point = [[view superview] convertPoint:point toView:nil];
|
||||
point = [[view window] convertBaseToScreen: point];
|
||||
// [[menu window] setFrameOrigin:point];
|
||||
[menu _rightMouseDisplay: event];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue