mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 17:10:37 +00:00
Partially correct implementation
This commit is contained in:
parent
a1dd317d29
commit
ffdf8fb6da
1 changed files with 25 additions and 33 deletions
|
@ -3281,15 +3281,14 @@ static BOOL browserUseBezels;
|
||||||
- (void) _performLoadOfItem: (id)item
|
- (void) _performLoadOfItem: (id)item
|
||||||
forColumn: (NSInteger)column
|
forColumn: (NSInteger)column
|
||||||
{
|
{
|
||||||
NSBrowserColumn *bc;
|
NSBrowserColumn *bc = nil;
|
||||||
NSScrollView *sc;
|
NSScrollView *sc = nil;
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix = nil;
|
||||||
NSInteger i, rows, cols;
|
NSInteger i = 0, rows = 0, cols = 1;
|
||||||
|
id child = nil;
|
||||||
// Ask the delegate for the number of rows
|
|
||||||
rows = [_browserDelegate browser: self numberOfChildrenOfItem: item];
|
|
||||||
cols = 1;
|
|
||||||
|
|
||||||
|
// Ask the delegate for the number of rows for a given item...
|
||||||
|
rows = [_browserDelegate browser: self numberOfChildrenOfItem: item];
|
||||||
bc = [_browserColumns objectAtIndex: column];
|
bc = [_browserColumns objectAtIndex: column];
|
||||||
|
|
||||||
if (!(sc = [bc columnScrollView]))
|
if (!(sc = [bc columnScrollView]))
|
||||||
|
@ -3341,37 +3340,30 @@ static BOOL browserUseBezels;
|
||||||
}
|
}
|
||||||
[sc setDocumentView: matrix];
|
[sc setDocumentView: matrix];
|
||||||
|
|
||||||
// Loading for item based delegate
|
// Iterate over the rows...
|
||||||
{
|
for (i = 0; i < rows; i++)
|
||||||
// Now loop through the cells and load each one
|
{
|
||||||
id aCell = nil;
|
id aCell = [matrix cellAtRow: i column: 0];
|
||||||
|
if (![aCell isLoaded])
|
||||||
for (i = 0; i < rows; i++)
|
{
|
||||||
{
|
BOOL leaf = YES;
|
||||||
aCell = [matrix cellAtRow: i column: 0];
|
id val = nil;
|
||||||
if (![aCell isLoaded])
|
|
||||||
{
|
child = [_browserDelegate browser: self child: i ofItem: _lastItemLoaded];
|
||||||
BOOL leaf = YES;
|
leaf = [_browserDelegate browser: self isLeafItem: child];
|
||||||
id val = nil;
|
val = [_browserDelegate browser: self objectValueForItem: child];
|
||||||
id child = nil;
|
[aCell setLeaf: leaf];
|
||||||
|
[aCell setStringValue: val];
|
||||||
child = [_browserDelegate browser: self child: i ofItem: _lastItemLoaded];
|
[aCell setLoaded: YES];
|
||||||
leaf = [_browserDelegate browser: self isLeafItem: child];
|
}
|
||||||
val = [_browserDelegate browser: self objectValueForItem: child];
|
}
|
||||||
[aCell setLeaf: leaf];
|
|
||||||
[aCell setStringValue: val];
|
|
||||||
[aCell setLoaded: YES];
|
|
||||||
|
|
||||||
_lastItemLoaded = child;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[bc setIsLoaded: YES];
|
[bc setIsLoaded: YES];
|
||||||
|
|
||||||
if (column > _lastColumnLoaded)
|
if (column > _lastColumnLoaded)
|
||||||
{
|
{
|
||||||
_lastColumnLoaded = column;
|
_lastColumnLoaded = column;
|
||||||
|
_lastItemLoaded = child;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine the height of a cell in the matrix, and set that as the
|
/* Determine the height of a cell in the matrix, and set that as the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue