diff --git a/ChangeLog b/ChangeLog index a4aa8596..deb365e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-12-10 17:55 Gregory John Casamento + + * GormClassEditor.m: Changes to return a item if it's an' + action/outlet holder without generating a string. + * GormOutlineView.m: Modifications to make drawing of the + actions and outlets more efficient. + 2004-12-08 21:03 Gregory John Casamento * GormOutlineView.m: Corrected a leak. diff --git a/GormClassEditor.m b/GormClassEditor.m index 98365666..0c9157d8 100644 --- a/GormClassEditor.m +++ b/GormClassEditor.m @@ -378,6 +378,9 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn id identifier = [aTableColumn identifier]; id className = item; + if([item isKindOfClass: [GormOutletActionHolder class]]) + return item; + if ([identifier isEqualToString: @"classes"]) { return className; diff --git a/GormOutlineView.m b/GormOutlineView.m index 1c912780..83d9faab 100644 --- a/GormOutlineView.m +++ b/GormOutlineView.m @@ -144,11 +144,6 @@ static NSColor *darkGreyBlueColor = nil; return self; } -- (void) dealloc -{ - [super dealloc]; -} - - (void) collapseItem: (id)item collapseChildren: (BOOL)collapseChildren; { if (!_isEditing) @@ -321,7 +316,6 @@ static NSColor *darkGreyBlueColor = nil; NSRect imageRect; int i; float x_pos; - static BOOL drawingEditedObject = NO; if (_dataSource == nil) { @@ -379,7 +373,6 @@ static NSColor *darkGreyBlueColor = nil; { valueforcell = [value getName]; isOutletAction = YES; - drawingEditedObject = YES; } else { @@ -406,27 +399,12 @@ static NSColor *darkGreyBlueColor = nil; drawingRect.size.width -= _attributeOffset; } - - /* For later... - if (drawingEditedObject) - { - [self setBackgroundColor: salmonColor]; - } - else - if (_isEditing) - { - [self setBackgroundColor: darkSalmonColor]; - } - */ - if (tb == _outlineTableColumn && !isOutletAction) { NSImage *image = nil; int level = 0; float indentationFactor = 0.0; - // float originalWidth = drawingRect.size.width; - drawingEditedObject = NO; // display the correct arrow... if ([self isItemExpanded: item]) { @@ -466,11 +444,10 @@ static NSColor *darkGreyBlueColor = nil; += indentationFactor + [image size].width + 5; drawingRect.size.width -= indentationFactor + [image size].width + 5; + // [cell drawWithFrame: drawingRect inView: self]; } - - - if ((tb == _actionColumn || tb == _outletColumn) - && !drawingEditedObject) + else if ((tb == _actionColumn || tb == _outletColumn) + && isOutletAction == NO) { NSImage *image = nil; @@ -494,10 +471,10 @@ static NSColor *darkGreyBlueColor = nil; // Adjust drawing rect of cell being displayed... drawingRect.origin.x += [image size].width + 5; drawingRect.size.width -= [image size].width + 5; + // [cell drawWithFrame: drawingRect inView: self]; } - if (((tb != _outletColumn || tb != _actionColumn) - && !drawingEditedObject) || (tb == _outlineTableColumn)) + if (((tb != _outletColumn || tb != _actionColumn) && !isOutletAction) || (tb == _outlineTableColumn)) { [cell drawWithFrame: drawingRect inView: self]; }