mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Add columns to the outline view for objects
This commit is contained in:
parent
db124f0b94
commit
ffa7cf75e5
1 changed files with 23 additions and 24 deletions
|
@ -363,11 +363,16 @@ static NSImage *fileImage = nil;
|
|||
object: window];
|
||||
|
||||
// objects...
|
||||
NSTableColumn *tb = [[NSTableColumn alloc] initWithIdentifier: @"object"];
|
||||
NSScrollView *outlineScrollView = [[NSScrollView alloc] initWithFrame: scrollRect];
|
||||
NSTableColumn *tbo = [[NSTableColumn alloc] initWithIdentifier: @"objects"];
|
||||
NSTableColumn *tbc = [[NSTableColumn alloc] initWithIdentifier: @"connections"];
|
||||
|
||||
[tb setTitle: @"Object"];
|
||||
[outlineView addTableColumn: tb];
|
||||
[tbo setTitle: @"Objects"];
|
||||
[tbc setTitle: @"Connections"];
|
||||
[outlineView setDrawsGrid: NO];
|
||||
[outlineView setOutlineTableColumn: tbo];
|
||||
[outlineView addTableColumn: tbo];
|
||||
[outlineView addTableColumn: tbc];
|
||||
[outlineScrollView setHasVerticalScroller: YES];
|
||||
[outlineScrollView setHasHorizontalScroller: YES];
|
||||
[outlineScrollView setAutoresizingMask:
|
||||
|
@ -3811,24 +3816,6 @@ static void _real_close(GormDocument *self,
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
NSLog(@"Checking connections..."); // %@", connections);
|
||||
en = [connections objectEnumerator];
|
||||
o = nil;
|
||||
while ((o = [en nextObject]) != nil)
|
||||
{
|
||||
id src = [o source];
|
||||
id dst = [o destination];
|
||||
NSString *label = [o label];
|
||||
|
||||
if ([o isKindOfClass: [NSNibControlConnector class]])
|
||||
{
|
||||
}
|
||||
else if ([o isKindOfClass: [NSNibOutletConnector class]])
|
||||
{
|
||||
}
|
||||
}
|
||||
*/
|
||||
return results;
|
||||
}
|
||||
|
||||
|
@ -4016,12 +4003,24 @@ willBeInsertedIntoToolbar: (BOOL)flag
|
|||
objectValueForTableColumn: (NSTableColumn *)tableColumn
|
||||
byItem: (id)item
|
||||
{
|
||||
if (item == nil)
|
||||
id value = nil;
|
||||
|
||||
if ([[tableColumn identifier] isEqualToString: @"objects"])
|
||||
{
|
||||
if (item == nil)
|
||||
{
|
||||
value = @"Objects";
|
||||
}
|
||||
else
|
||||
{
|
||||
value = [self nameForObject: item];
|
||||
}
|
||||
}
|
||||
else if ([[tableColumn identifier] isEqualToString: @"connections"])
|
||||
{
|
||||
return @"Objects";
|
||||
}
|
||||
|
||||
return [self nameForObject: item];
|
||||
return value;
|
||||
}
|
||||
|
||||
// Other methods...
|
||||
|
|
Loading…
Reference in a new issue