Author: mlytwyn
Date: Mon Jan 30 17:15:49 2017
New Revision: 40311

URL: http://svn.gna.org/viewcvs/gnustep?rev=40311&view=rev
Log:
Add alternate table cell drawing flags decode

Modified:
    libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSTableView.h
    libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m

Modified: 
libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSTableView.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSTableView.h?rev=40311&r1=40310&r2=40311&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSTableView.h     
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSTableView.h     
Mon Jan 30 17:15:49 2017
@@ -153,6 +153,7 @@
   BOOL               _allowsColumnReordering;
   BOOL               _autoresizesAllColumnsToFit;
   BOOL               _selectingColumns;
+  BOOL               _usesAlternatingRowBackgroundColors;
   NSText            *_textObject;
   NSInteger          _editedRow;
   NSInteger          _editedColumn;

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m?rev=40311&r1=40310&r2=40311&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m     
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m     Mon Jan 
30 17:15:49 2017
@@ -2553,13 +2553,16 @@
 
 - (void) setUsesAlternatingRowBackgroundColors: (BOOL)useAlternatingRowColors
 {
-  // FIXME
+  if (_usesAlternatingRowBackgroundColors != useAlternatingRowColors)
+  {
+    _usesAlternatingRowBackgroundColors = useAlternatingRowColors;
+    [self reloadData];
+  }
 }
 
 - (BOOL) usesAlternatingRowBackgroundColors
 {
-  // FIXME
-  return NO;
+  return _usesAlternatingRowBackgroundColors;
 }
 
 - (void)setSelectionHighlightStyle: (NSTableViewSelectionHighlightStyle)s
@@ -5934,6 +5937,16 @@
               NSLog(@"%s:unsupported column autoresizing style: %d", 
__PRETTY_FUNCTION__, _columnAutoresizingStyle);
             }
         }
+      
+      // Check for XIB 5 attributes not used previously...
+      if ([[aDecoder class] coderVersion] > 0)
+      {
+        if ([aDecoder containsValueForKey: @"alternatingRowBackgroundColors"])
+        {
+          BOOL flag = [aDecoder decodeBoolForKey: 
@"alternatingRowBackgroundColors"];
+          [self setUsesAlternatingRowBackgroundColors: flag];
+        }
+      }
 
       [self tile]; /* Initialize _columnOrigins */
     }


_______________________________________________
Gnustep-cvs mailing list
Gnustep-cvs@gna.org
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to