From 67fb2de57eaec0366600ffb2e920f7d99f679f59 Mon Sep 17 00:00:00 2001 From: Marcian Lytwyn Date: Wed, 1 Feb 2017 01:56:35 +0000 Subject: [PATCH] Fix uses alternate background color flag decoding git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40317 72102866-910b-0410-8b05-ffd578937521 --- Source/GSXib5KeyedUnarchiver.m | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Source/GSXib5KeyedUnarchiver.m b/Source/GSXib5KeyedUnarchiver.m index ba0773067..d0ad64208 100644 --- a/Source/GSXib5KeyedUnarchiver.m +++ b/Source/GSXib5KeyedUnarchiver.m @@ -1603,14 +1603,17 @@ didStartElement: (NSString*)elementName NSWarnMLog(@"gridStyleMask: %@", gridStyleMask); #endif - mask.flags.columnOrdering = YES; // check if present - see below... - mask.flags.columnResizing = YES; // check if present - see below... - mask.flags.drawsGrid = (gridStyleMask != nil); - mask.flags.emptySelection = YES; // check if present - see below... - mask.flags.multipleSelection = YES; // check if present - see below... - mask.flags.columnSelection = [[attributes objectForKey: @"columnSelection"] boolValue]; - mask.flags.columnAutosave = YES; // check if present - see below... + // These are the defaults... + mask.flags.columnOrdering = YES; // check if present - see below... + mask.flags.columnResizing = YES; // check if present - see below... + mask.flags.drawsGrid = (gridStyleMask != nil); + mask.flags.emptySelection = YES; // check if present - see below... + mask.flags.multipleSelection = YES; + mask.flags.columnSelection = [[attributes objectForKey: @"columnSelection"] boolValue]; + mask.flags.columnAutosave = YES; + mask.flags.alternatingRowBackgroundColors = [[attributes objectForKey: @"alternatingRowBackgroundColors"] boolValue]; + // Overide the defaults with any attributes present... if ([attributes objectForKey: @"columnReordering"]) mask.flags.columnOrdering = [[attributes objectForKey: @"columnReordering"] boolValue]; if ([attributes objectForKey: @"columnResizing"]) @@ -2759,7 +2762,7 @@ didStartElement: (NSString*)elementName // New xib stores values as attributes... object = [currentElement attributeForKey: key]; } -#if defined(DEBUG) +#if 0 //defined(DEBUG) else // DEBUG ONLY... { NSWarnMLog(@"no element/attribute for key: %@", key); @@ -2767,10 +2770,6 @@ didStartElement: (NSString*)elementName #endif } -#if 0 - if (object == nil) - NSWarnMLog(@"no object for key: %@", key); -#endif #if defined(DEBUG_XIB5) NSWarnMLog(@"DONE: key: %@ currentElement: %@ id: %@", key, [currentElement type], [currentElement attributeForKey: @"id"]); #endif