Merge Source/NSMenu.m - reformat Source/NSLayoutManager.m

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38731 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2015-07-01 19:40:11 +00:00
parent 2a41972a78
commit 03f5d6b879
2 changed files with 27 additions and 20 deletions

View file

@ -911,7 +911,9 @@ has the same y origin and height as the line frag rect it is in.
fraction_through = 1.0; fraction_through = 1.0;
} }
else else
{
[self _doLayoutToGlyph: glyph_index]; [self _doLayoutToGlyph: glyph_index];
}
for (tc = textcontainers, i = 0; i < num_textcontainers; i++, tc++) for (tc = textcontainers, i = 0; i < num_textcontainers; i++, tc++)
if (tc->pos + tc->length > glyph_index) if (tc->pos + tc->length > glyph_index)

View file

@ -503,7 +503,8 @@ static BOOL menuBarVisible = YES;
if ((_aWindow != nil) && ([_aWindow screen] != nil)) if ((_aWindow != nil) && ([_aWindow screen] != nil))
{ {
origin = NSMakePoint(0, [[_aWindow screen] visibleFrame].size.height - [_aWindow frame].size.height); origin = NSMakePoint(0, [[_aWindow screen] visibleFrame].size.height
- [_aWindow frame].size.height);
[_aWindow setFrameOrigin: origin]; [_aWindow setFrameOrigin: origin];
[_bWindow setFrameOrigin: origin]; [_bWindow setFrameOrigin: origin];
@ -831,6 +832,7 @@ static BOOL menuBarVisible = YES;
[self menuChanged]; [self menuChanged];
} }
// Testplant-MAL-2015-07-01: Using testplant branch code...
- (void) removeAllItems - (void) removeAllItems
{ {
[_items makeObjectsPerformSelector:@selector(setMenu:) withObject:nil]; [_items makeObjectsPerformSelector:@selector(setMenu:) withObject:nil];
@ -902,7 +904,7 @@ static BOOL menuBarVisible = YES;
return nil; return nil;
} }
- (id <NSMenuItem>) itemAtIndex: (NSInteger)index - (NSMenuItem *) itemAtIndex: (NSInteger)index
{ {
if (index >= [_items count] || index < 0) if (index >= [_items count] || index < 0)
[NSException raise: NSRangeException [NSException raise: NSRangeException
@ -1093,6 +1095,7 @@ static BOOL menuBarVisible = YES;
- (void) update - (void) update
{ {
// Testplant-MAL-2015-07-01: Stop potential recursive invocation...
if (_menu.isUpdating == NO) if (_menu.isUpdating == NO)
{ {
_menu.isUpdating = YES; _menu.isUpdating = YES;
@ -1243,6 +1246,7 @@ static BOOL menuBarVisible = YES;
} }
} }
// Testplant-MAL-2015-07-01: Stop potential recursive invocation...
_menu.isUpdating = NO; _menu.isUpdating = NO;
} }
@ -1508,6 +1512,7 @@ static BOOL menuBarVisible = YES;
return _menu.changedMessagesEnabled; return _menu.changedMessagesEnabled;
} }
// Testplant-MAL-2015-07-01: Using testplant branch code...
- (NSSize) size - (NSSize) size
{ {
if (_view) if (_view)
@ -1585,10 +1590,10 @@ static BOOL menuBarVisible = YES;
forView: (NSView *)view forView: (NSView *)view
withFont: (NSFont *)font withFont: (NSFont *)font
{ {
// Testplant-MAL-2015-07-01: Using tetplant branch code...
NSPoint point = [view frame].origin; NSPoint point = [view frame].origin;
point = [[view superview] convertPoint:point toView:nil]; point = [[view superview] convertPoint:point toView:nil];
point = [[view window] convertBaseToScreen: point]; point = [[view window] convertBaseToScreen: point];
// [[menu window] setFrameOrigin:point];
[menu _rightMouseDisplay: event]; [menu _rightMouseDisplay: event];
} }