Correction for bug #10118. Table color selection was sticking.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20374 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-11-24 05:06:32 +00:00
parent a9793b7a10
commit 1d23eafdf9
6 changed files with 58 additions and 25 deletions

View file

@ -1,3 +1,15 @@
2004-11-24 00:04 Gregory John Casamento <greg_casamento@yahoo.com>
* Palettes/3Containers/GormNSOutlineView.h: Removed savedColor and
added "Gorm" methods to the header.
* Palettes/3Containers/GormNSOutlineView.m: Removed all references
to savedColor and commented out select and unselect methods.
* Palettes/3Containers/GormNSTableView.h: Removed saved color and
commented out select and unselect.
* Palettes/3Containers/GormNSTableView.m: Removed all references to
savedColor and commented out select and unselect methods.
Corrects bug #10118.
2004-11-20 13:27 Gregory John Casamento <greg_casamento@yahoo.com>
* Resources: Updated all gorms to latest format.

View file

@ -37,12 +37,24 @@
BOOL _gormAllowsColumnSelection;
BOOL _gormAllowsMultipleSelection;
BOOL _gormAllowsEmptySelection;
NSColor *_savedColor;
// NSColor *_savedColor;
}
- (void) setGormDelegate: (id)anObject;
- (void) setGormAllowsColumnReordering: (BOOL)flag;
- (BOOL) gormAllowsColumnReordering;
- (void) setGormAllowsColumnResizing: (BOOL)flag;
- (BOOL) gormAllowsColumnResizing;
- (void) setGormAllowsMultipleSelection: (BOOL)flag;
- (BOOL) gormAllowsMultipleSelection;
- (void) setGormAllowsEmptySelection: (BOOL)flag;
- (BOOL) gormAllowsEmptySelection;
- (void) setGormAllowsColumnSelection: (BOOL)flag;
- (BOOL) gormAllowsColumnSelection;
// preserve the color during selection...
- (void) select;
- (void) unselect;
//- (void) select;
//- (void) unselect;
@end
#endif

View file

@ -192,7 +192,7 @@ static id _sharedDataSource = nil;
self = [super initWithFrame: aRect];
[super setDataSource: [GormNSOutlineView sharedDataSource]];
_gormDataSource = nil;
ASSIGN(_savedColor,[NSColor controlBackgroundColor]);
// ASSIGN(_savedColor,[NSColor controlBackgroundColor]);
return self;
}
@ -260,14 +260,14 @@ static id _sharedDataSource = nil;
_gormAllowsEmptySelection = _allowsEmptySelection;
_gormDelegate = _delegate;
_delegate = nil;
ASSIGN(_savedColor, [self backgroundColor]);
// ASSIGN(_savedColor, [self backgroundColor]);
return self;
}
- (void) dealloc
{
RELEASE(_savedColor);
// RELEASE(_savedColor);
[super dealloc];
}
@ -326,6 +326,7 @@ static id _sharedDataSource = nil;
return @"NSOutlineView";
}
/*
- (void) setBackgroundColor: (NSColor *)color
{
[super setBackgroundColor: color];
@ -342,4 +343,5 @@ static id _sharedDataSource = nil;
[super setBackgroundColor: _savedColor];
[self deselectAll: self];
}
*/
@end

View file

@ -37,7 +37,7 @@
BOOL _gormAllowsColumnSelection;
BOOL _gormAllowsMultipleSelection;
BOOL _gormAllowsEmptySelection;
NSColor *_savedColor;
// NSColor *_savedColor;
}
- (void) setGormDelegate: (id)anObject;
@ -53,8 +53,10 @@
- (BOOL) gormAllowsColumnSelection;
// preserve the color during selection...
/*
- (void) select;
- (void) unselect;
*/
@end
#endif

View file

@ -104,7 +104,7 @@ static id _sharedDataSource = nil;
self = [super initWithFrame: aRect];
[super setDataSource: [GormNSTableView sharedDataSource]];
_gormDataSource = nil;
ASSIGN(_savedColor, [NSColor controlBackgroundColor]);
// ASSIGN(_savedColor, [NSColor controlBackgroundColor]);
return self;
}
@ -170,14 +170,14 @@ static id _sharedDataSource = nil;
_gormAllowsEmptySelection = _allowsEmptySelection;
_gormDelegate = _delegate;
_delegate = nil;
ASSIGN(_savedColor, [self backgroundColor]);
// ASSIGN(_savedColor, [self backgroundColor]);
return self;
}
- (void) dealloc
{
RELEASE(_savedColor);
// RELEASE(_savedColor);
[super dealloc];
}
@ -236,6 +236,7 @@ static id _sharedDataSource = nil;
return @"NSTableView";
}
/*
- (void) setBackgroundColor: (NSColor *)color
{
[super setBackgroundColor: color];
@ -252,4 +253,5 @@ static id _sharedDataSource = nil;
[super setBackgroundColor: _savedColor];
[self deselectAll: self];
}
*/
@end

View file

@ -48,6 +48,7 @@ static NSText *_textObject;
return NO;
}
/*
- (void) setOpened: (BOOL) flag
{
if (flag)
@ -58,9 +59,10 @@ static NSText *_textObject;
{
[tableView unselect];
}
[super setOpened: flag];
}
*/
/**
* Activate an editor - inserts it into the view hierarchy or whatever is
@ -102,7 +104,7 @@ static NSText *_textObject;
{
if (activated == YES)
{
[tableView unselect];
// [tableView unselect];
if ([tableView selectedColumn] != -1)
{
[tableView deselectColumn: [tableView selectedColumn]];
@ -341,9 +343,9 @@ 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]];
// [_editedCell setAlignment: NSLeftTextAlignment];
// [(NSTableHeaderCell *)_editedCell setTextColor: [NSColor blackColor]];
// [(NSTableHeaderCell *)_editedCell setBackgroundColor: [NSColor whiteColor]];
_textObject = [_editedCell setUpFieldEditorAttributes: t];
drawingRect = [th headerRectOfColumn: columnIndex];
@ -363,16 +365,17 @@ 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];
// }
/*
- (NSArray*) selection
{
if (tableView == nil)
return [NSArray array];
else if (selected == nil)
return [NSArray arrayWithObject: tableView];
else
return [NSArray arrayWithObject: selected];
}
*/
- (unsigned) draggingEntered: (id<NSDraggingInfo>)sender
{