mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 21:20:38 +00:00
* 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:
parent
82aa5286ac
commit
b9a8ff0a46
2 changed files with 26 additions and 15 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue