mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
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:
parent
a9793b7a10
commit
1d23eafdf9
6 changed files with 58 additions and 25 deletions
12
ChangeLog
12
ChangeLog
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -48,6 +48,7 @@ static NSText *_textObject;
|
|||
return NO;
|
||||
}
|
||||
|
||||
/*
|
||||
- (void) setOpened: (BOOL) flag
|
||||
{
|
||||
if (flag)
|
||||
|
@ -61,6 +62,7 @@ static NSText *_textObject;
|
|||
|
||||
[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]];
|
||||
|
@ -342,8 +344,8 @@ static NSText *_textObject;
|
|||
[_editedCell setStringValue: [[tc headerCell] stringValue]];
|
||||
[_editedCell setEditable: YES];
|
||||
// [_editedCell setAlignment: NSLeftTextAlignment];
|
||||
[(NSTableHeaderCell *)_editedCell setTextColor: [NSColor blackColor]];
|
||||
[(NSTableHeaderCell *)_editedCell setBackgroundColor: [NSColor whiteColor]];
|
||||
// [(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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue