* Source/NSSearchFieldCell.m: Correct issue displaying images for

search field.  Fix in initWithCoder: to reset image names.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28205 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-04-12 23:13:02 +00:00
parent 82aa5286ac
commit b9a8ff0a46
2 changed files with 26 additions and 15 deletions

View file

@ -424,22 +424,28 @@
- (id) initWithCoder: (NSCoder*)aDecoder
{
self = [super initWithCoder: aDecoder];
if ([aDecoder allowsKeyedCoding])
if(self != nil)
{
[self setSearchButtonCell: [aDecoder decodeObjectForKey: @"NSSearchButtonCell"]];
[self setCancelButtonCell: [aDecoder decodeObjectForKey: @"NSCancelButtonCell"]];
[self setRecentsAutosaveName: [aDecoder decodeObjectForKey: @"NSRecentsAutosaveName"]];
[self setSendsWholeSearchString: [aDecoder decodeBoolForKey: @"NSSendsWholeSearchString"]];
[self setMaximumRecents: [aDecoder decodeIntForKey: @"NSMaximumRecents"]];
}
else
{
[self setSearchButtonCell: [aDecoder decodeObject]];
[self setCancelButtonCell: [aDecoder decodeObject]];
[self setRecentsAutosaveName: [aDecoder decodeObject]];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_sends_whole_search_string];
[aDecoder decodeValueOfObjCType: @encode(unsigned int) at: &_max_recents];
if ([aDecoder allowsKeyedCoding])
{
[self setSearchButtonCell: [aDecoder decodeObjectForKey: @"NSSearchButtonCell"]];
[self setCancelButtonCell: [aDecoder decodeObjectForKey: @"NSCancelButtonCell"]];
[self setRecentsAutosaveName: [aDecoder decodeObjectForKey: @"NSRecentsAutosaveName"]];
[self setSendsWholeSearchString: [aDecoder decodeBoolForKey: @"NSSendsWholeSearchString"]];
[self setMaximumRecents: [aDecoder decodeIntForKey: @"NSMaximumRecents"]];
}
else
{
[self setSearchButtonCell: [aDecoder decodeObject]];
[self setCancelButtonCell: [aDecoder decodeObject]];
[self setRecentsAutosaveName: [aDecoder decodeObject]];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_sends_whole_search_string];
[aDecoder decodeValueOfObjCType: @encode(unsigned int) at: &_max_recents];
}
[self resetCancelButtonCell];
[self resetSearchButtonCell];
}
return self;