mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Corrected an issue with the background color of the table/outline view not being saved.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19476 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
90e0b9d4cd
commit
da69e277a7
6 changed files with 63 additions and 6 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-06-06 21:57 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/3Containers/GormNSOutlineView.h: added ivar
|
||||
_savedColor. This is used to save the color during selection.
|
||||
* Palettes/3Containers/GormNSTableView.h: same as above.
|
||||
* Palettes/3Containers/GormNSTableView.m: implemented select
|
||||
and unselect methods to allow the color to be saved when the object
|
||||
is selected.
|
||||
* Palettes/3Containers/GormNSOutlineView.m: same as above.
|
||||
|
||||
2004-06-06 08:39 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormImageEditor.m: Corrected comments.
|
||||
|
|
|
@ -35,7 +35,12 @@
|
|||
BOOL _gormAllowsColumnSelection;
|
||||
BOOL _gormAllowsMultipleSelection;
|
||||
BOOL _gormAllowsEmptySelection;
|
||||
NSColor *_savedColor;
|
||||
}
|
||||
|
||||
// preserve the color during selection...
|
||||
- (void) select;
|
||||
- (void) unselect;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -184,6 +184,7 @@ static id _sharedDataSource = nil;
|
|||
self = [super initWithFrame: aRect];
|
||||
[super setDataSource: [GormNSOutlineView sharedDataSource]];
|
||||
_gormDataSource = nil;
|
||||
ASSIGN(_savedColor,[NSColor controlBackgroundColor]);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -251,11 +252,11 @@ static id _sharedDataSource = nil;
|
|||
_gormAllowsEmptySelection = _allowsEmptySelection;
|
||||
_gormDelegate = _delegate;
|
||||
_delegate = nil;
|
||||
_savedColor = [self backgroundColor];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void) setGormAllowsColumnReordering: (BOOL)flag
|
||||
{
|
||||
_gormAllowsColumnReordering = flag;
|
||||
|
@ -310,4 +311,21 @@ static id _sharedDataSource = nil;
|
|||
{
|
||||
return @"NSOutlineView";
|
||||
}
|
||||
|
||||
- (void) setBackgroundColor: (NSColor *)color
|
||||
{
|
||||
[super setBackgroundColor: color];
|
||||
ASSIGN(_savedColor, color);
|
||||
}
|
||||
|
||||
- (void) select
|
||||
{
|
||||
[super setBackgroundColor: [NSColor whiteColor]];
|
||||
}
|
||||
|
||||
- (void) unselect
|
||||
{
|
||||
[super setBackgroundColor: _savedColor];
|
||||
[self deselectAll: self];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
BOOL _gormAllowsColumnSelection;
|
||||
BOOL _gormAllowsMultipleSelection;
|
||||
BOOL _gormAllowsEmptySelection;
|
||||
NSColor *_savedColor;
|
||||
}
|
||||
|
||||
- (void) setGormDelegate: (id)anObject;
|
||||
|
@ -48,6 +49,10 @@
|
|||
- (BOOL) gormAllowsEmptySelection;
|
||||
- (void) setGormAllowsColumnSelection: (BOOL)flag;
|
||||
- (BOOL) gormAllowsColumnSelection;
|
||||
|
||||
// preserve the color during selection...
|
||||
- (void) select;
|
||||
- (void) unselect;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -95,6 +95,7 @@ static id _sharedDataSource = nil;
|
|||
self = [super initWithFrame: aRect];
|
||||
[super setDataSource: [GormNSTableView sharedDataSource]];
|
||||
_gormDataSource = nil;
|
||||
ASSIGN(_savedColor, [NSColor controlBackgroundColor]);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -160,11 +161,11 @@ static id _sharedDataSource = nil;
|
|||
_gormAllowsEmptySelection = _allowsEmptySelection;
|
||||
_gormDelegate = _delegate;
|
||||
_delegate = nil;
|
||||
_savedColor = [self backgroundColor];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void) setGormAllowsColumnReordering: (BOOL)flag
|
||||
{
|
||||
_gormAllowsColumnReordering = flag;
|
||||
|
@ -219,4 +220,21 @@ static id _sharedDataSource = nil;
|
|||
{
|
||||
return @"NSTableView";
|
||||
}
|
||||
|
||||
- (void) setBackgroundColor: (NSColor *)color
|
||||
{
|
||||
[super setBackgroundColor: color];
|
||||
ASSIGN(_savedColor, color);
|
||||
}
|
||||
|
||||
- (void) select
|
||||
{
|
||||
[super setBackgroundColor: [NSColor whiteColor]];
|
||||
}
|
||||
|
||||
- (void) unselect
|
||||
{
|
||||
[super setBackgroundColor: _savedColor];
|
||||
[self deselectAll: self];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -63,11 +63,12 @@ static NSText *_textObject;
|
|||
- (void) setOpened: (BOOL) flag
|
||||
{
|
||||
if (flag)
|
||||
[tableView setBackgroundColor: [NSColor whiteColor]];
|
||||
{
|
||||
[tableView select]; // setBackgroundColor: [NSColor whiteColor]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[tableView setBackgroundColor: [NSColor controlBackgroundColor]];
|
||||
[tableView deselectAll: self];
|
||||
[tableView unselect];
|
||||
}
|
||||
|
||||
[super setOpened: flag];
|
||||
|
@ -111,7 +112,7 @@ static NSText *_textObject;
|
|||
{
|
||||
if (activated == YES)
|
||||
{
|
||||
[tableView setBackgroundColor: [NSColor controlBackgroundColor]];
|
||||
[tableView unselect]; // [tableView setBackgroundColor: [NSColor controlBackgroundColor]];
|
||||
if ([tableView selectedColumn] != -1)
|
||||
{
|
||||
[tableView deselectColumn: [tableView selectedColumn]];
|
||||
|
|
Loading…
Reference in a new issue