mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Moved defaults to else branches
This commit is contained in:
parent
b8e551c6ac
commit
5fcbc9e46c
1 changed files with 10 additions and 4 deletions
|
@ -460,20 +460,26 @@ static Class pathCellClass;
|
|||
{
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
// Defaults for some values which aren't encoded unless they are non-default.
|
||||
[self setBackgroundColor: [NSColor windowBackgroundColor]];
|
||||
[self setAllowedTypes: [NSArray arrayWithObject: NSFilenamesPboardType]];
|
||||
|
||||
|
||||
if ([coder containsValueForKey: @"NSBackgroundColor"])
|
||||
{
|
||||
[self setBackgroundColor: [coder decodeObjectForKey: @"NSBackgroundColor"]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self setBackgroundColor: [NSColor windowBackgroundColor]];
|
||||
}
|
||||
|
||||
if ([coder containsValueForKey: @"NSDragTypes"])
|
||||
{
|
||||
[self setAllowedTypes: [coder decodeObjectForKey: @"NSDragTypes"]];
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
[self setAllowedTypes: [NSArray arrayWithObject: NSFilenamesPboardType]];
|
||||
}
|
||||
|
||||
if ([coder containsValueForKey: @"NSControlAction"])
|
||||
{
|
||||
NSString *s = [coder decodeObjectForKey: @"NSControlAction"];
|
||||
|
|
Loading…
Reference in a new issue