From f96739125d799e942fb7913659db57f3c46f1526 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sat, 11 Mar 2006 22:07:33 +0000 Subject: [PATCH] Correction bug#16050. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@22639 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 ++ Palettes/3Containers/GormTableViewEditor.m | 57 ++++++++++------------ 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8eb9ac88..438a38bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-03-11 16:57 Gregory John Casamento + + * Palettes/3Containers/GormTableViewEditor.m: Correction for + bug#16050. + 2006-03-10 01:24 Gregory John Casamento * GormCore/GormViewEditor.m: Correction for bug#16049 diff --git a/Palettes/3Containers/GormTableViewEditor.m b/Palettes/3Containers/GormTableViewEditor.m index 6fd6700f..314764ae 100644 --- a/Palettes/3Containers/GormTableViewEditor.m +++ b/Palettes/3Containers/GormTableViewEditor.m @@ -40,6 +40,30 @@ static NSText *_textObject; @end @implementation GormTableViewEditor +/** + * Initialize the table editor. + */ + +/* +- (id) initWithObject: (id)anObject inDocument: (id)aDocument +{ + self = [super initWithObject: anObject inDocument: aDocument]; + if(self != nil) + { + } + return self; +} +*/ + +- (void) setFrame: (NSRect)frame +{ + if(tableView != nil) + { + [tableView deselectAll: self]; + } + [super setFrame: frame]; +} + /** * Decide whether an editor can accept data from the pasteboard. */ @@ -48,22 +72,6 @@ static NSText *_textObject; return NO; } -/* -- (void) setOpened: (BOOL) flag -{ - if (flag) - { - [tableView select]; // setBackgroundColor: [NSColor whiteColor]]; - } - else - { - [tableView unselect]; - } - - [super setOpened: flag]; -} -*/ - /** * Activate an editor - inserts it into the view hierarchy or whatever is * needed for the editor to be able to provide its functionality. @@ -341,9 +349,6 @@ static NSText *_textObject; _currentHeaderCell = [tc headerCell]; [_editedCell setStringValue: [[tc headerCell] stringValue]]; [_editedCell setEditable: YES]; - // [_editedCell setAlignment: NSLeftTextAlignment]; - // [(NSTableHeaderCell *)_editedCell setTextColor: [NSColor blackColor]]; - // [(NSTableHeaderCell *)_editedCell setBackgroundColor: [NSColor whiteColor]]; _textObject = [_editedCell setUpFieldEditorAttributes: t]; drawingRect = [th headerRectOfColumn: columnIndex]; @@ -363,18 +368,6 @@ static NSText *_textObject; RELEASE(_editedCell); } -/* -- (NSArray*) selection -{ - if (tableView == nil) - return [NSArray array]; - else if (selected == nil) - return [NSArray arrayWithObject: tableView]; - else - return [NSArray arrayWithObject: selected]; -} -*/ - - (unsigned) draggingEntered: (id)sender { return [self draggingUpdated: sender]; @@ -425,6 +418,7 @@ static NSText *_textObject; return NSDragOperationNone; } } + - (BOOL) performDragOperation: (id)sender { NSPasteboard *dragPb; @@ -482,5 +476,4 @@ static NSText *_textObject; return [super windowAndRect: prect forObject: object]; } } - @end