Merge branch 'master' of github.com:gnustep/libs-gui into NSGridView_NSStackView_branch

This commit is contained in:
Gregory John Casamento 2021-01-24 12:13:53 -05:00
commit 78f84bb52a
17 changed files with 1936 additions and 1579 deletions

View file

@ -870,6 +870,11 @@ restart: ;
*/
NSArray *tabs = [curParagraphStyle tabStops];
NSTextTab *tab = nil;
CGFloat defaultInterval = [curParagraphStyle defaultTabInterval];
/* Set it to something reasonable if unset */
if (defaultInterval == 0.0) {
defaultInterval = 100.0;
}
int i, c = [tabs count];
/* Find first tab beyond our current position. */
for (i = 0; i < c; i++)
@ -884,16 +889,17 @@ restart: ;
tab, thus having no effect.
*/
if ([tab location] > p.x + lf->rect.origin.x)
break;
{
break;
}
}
if (i == c)
{
/* TODO: we're already past all the tab stops. what
should we do?
Pretend that we have tabs every 100 points.
/*
Tabs after the last value in tabStops should use the
defaultTabInterval provided by NSParagraphStyle.
*/
p.x = (floor(p.x / 100.0) + 1.0) * 100.0;
p.x = (floor(p.x / defaultInterval) + 1.0) * defaultInterval;
}
else
{

View file

@ -617,8 +617,8 @@ to YES. */
{
if ([aKey isEqual: NSValueBinding])
{
// FIXME
// Reload data
[_tableView reloadData];
}
else if ([aKey isEqual: NSEnabledBinding])
{

View file

@ -6724,6 +6724,16 @@ For a more detailed explanation, -setSortDescriptors:. */
}
else
{
NSTableColumn *tb = [_tableColumns objectAtIndex: 0];
GSKeyValueBinding *theBinding;
theBinding = [GSKeyValueBinding getBinding: NSValueBinding
forObject: tb];
if (theBinding != nil)
{
return [[theBinding destinationValue] count];
}
// FIXME
return 0;
}

View file

@ -6196,7 +6196,10 @@ NSArray *GSOrderedWindows(void)
NSInteger windowNumber = [[window_list objectAtIndex: i] integerValue];
NSWindow *win = GSWindowWithNumber(windowNumber);
[ret addObject: win];
if (win != nil)
{
[ret addObject: win];
}
}
return ret;