Author: mlytwyn
Date: Wed Dec  7 00:44:45 2016
New Revision: 40255

URL: http://svn.gna.org/viewcvs/gnustep?rev=40255&view=rev
Log:
Switch from float to CGFloat for column origins in table view

Modified:
    libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSTableView.h
    libs/gui/branches/gnustep_testplant_branch/Source/GSThemeDrawing.m
    libs/gui/branches/gnustep_testplant_branch/Source/NSTableHeaderView.m
    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=40255&r1=40254&r2=40255&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSTableView.h     
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSTableView.h     
Wed Dec  7 00:44:45 2016
@@ -157,7 +157,7 @@
    * origin of each column).  When a column width is changed through
    * [NSTableColumn setWidth:], then [NSTableView tile] gets called,
    * which updates the cache.  */
-  float *_columnOrigins;
+  CGFloat *_columnOrigins;
 
   /*
    *  We keep the superview's width in order to know when to

Modified: libs/gui/branches/gnustep_testplant_branch/Source/GSThemeDrawing.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/GSThemeDrawing.m?rev=40255&r1=40254&r2=40255&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/GSThemeDrawing.m  
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/GSThemeDrawing.m  Wed Dec 
 7 00:44:45 2016
@@ -73,7 +73,7 @@
 #define COLOR_WELL_BORDER_WIDTH 7.0
 
 @interface NSTableView (Private)
-- (float *)_columnOrigins;
+- (CGFloat *)_columnOrigins;
 - (void) _willDisplayCell: (NSCell*)cell forTableColumn: (NSTableColumn *)tb 
row: (int)index;
 // TESTPLANT-MAL-2016: Keeping for tableview grouped row support AKA Cocoa...
 - (NSCell *) _dataCellForTableColumn: (NSTableColumn *)tb row: (int) rowIndex;
@@ -3291,7 +3291,7 @@
   // NSIndexSet *selectedRows = [tableView _selectedRowIndexes];
   // NSColor *backgroundColor = [tableView backgroundColor];
   id dataSource = [tableView dataSource];
-  float *columnOrigins = [tableView _columnOrigins];
+  CGFloat *columnOrigins = [tableView _columnOrigins];
   int editedRow = [tableView editedRow];
   int editedColumn = [tableView editedColumn];
   int startingColumn;
@@ -3299,7 +3299,7 @@
   NSRect drawingRect;
   NSCell *cell;
   int i;
-  float x_pos;
+  CGFloat x_pos;
 
   if (dataSource == nil)
     {
@@ -3345,9 +3345,9 @@
       x_pos = NSMinX (clipRect);
       i = 0;
       while ((i < numberOfColumns) && (x_pos > columnOrigins[i]))
-      {
-        i++;
-      }
+        {
+          i++;
+        }
       startingColumn = (i - 1);
       
       if (startingColumn == -1)
@@ -3357,9 +3357,9 @@
       x_pos = NSMaxX (clipRect);
       // Nota Bene: we do *not* reset i
       while ((i < numberOfColumns) && (x_pos > columnOrigins[i]))
-      {
-        i++;
-      }
+        {
+          i++;
+        }
       endingColumn = (i - 1);
       
       if (endingColumn == -1)

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSTableHeaderView.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSTableHeaderView.m?rev=40255&r1=40254&r2=40255&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSTableHeaderView.m       
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSTableHeaderView.m       
Wed Dec  7 00:44:45 2016
@@ -56,7 +56,7 @@
 @interface NSTableView (GNUstepPrivate)
 - (void) _userResizedTableColumn: (int)index
                            width: (float)width;
-- (float *) _columnOrigins;
+- (CGFloat *) _columnOrigins;
 - (void) _mouseDownInHeaderOfTableColumn: (NSTableColumn *)tc;
 - (void) _clickTableColumn: (NSTableColumn *)tc;
 @end
@@ -487,7 +487,7 @@
             maxCoord = NSMaxX(bounds);
           }
           {
-            float *_c = [_tableView _columnOrigins];
+            CGFloat *_c = [_tableView _columnOrigins];
             _cO_minus1 = malloc((numberOfColumns + 3) * sizeof(CGFloat));
             _cO = _cO_minus1 + 1;
             memcpy(_cO, _c, numberOfColumns * sizeof(CGFloat));

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=40255&r1=40254&r2=40255&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m     
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSTableView.m     Wed Dec 
 7 00:44:45 2016
@@ -2143,11 +2143,11 @@
   if (_numberOfColumns > 1)
     {
       _columnOrigins = NSZoneRealloc (NSDefaultMallocZone (), _columnOrigins,
-                                     (sizeof (float)) * _numberOfColumns);
+                                     (sizeof (CGFloat)) * _numberOfColumns);
     }
   else 
     {
-      _columnOrigins = NSZoneMalloc (NSDefaultMallocZone (), sizeof (float));
+      _columnOrigins = NSZoneMalloc (NSDefaultMallocZone (), sizeof (CGFloat));
     }      
   [self tile];
 }
@@ -2182,7 +2182,7 @@
   if (_numberOfColumns > 0)
     {
       _columnOrigins = NSZoneRealloc (NSDefaultMallocZone (), _columnOrigins,
-                                     (sizeof (float)) * _numberOfColumns);
+                                     (sizeof (CGFloat)) * _numberOfColumns);
     }
   else 
     {
@@ -4583,9 +4583,9 @@
       int i = 0;
       
       while ((i < _numberOfColumns) && (aPoint.x >= _columnOrigins[i]))
-       {
-         i++;
-       }
+        {
+          i++;
+        }
       return i - 1;
     }
 }
@@ -5141,8 +5141,8 @@
 
 - (void) tile
 {
-  float table_width = 0;
-  float table_height;
+  CGFloat table_width = 0;
+  CGFloat table_height;
 
   if (_tilingDisabled == YES)
     return;
@@ -5150,17 +5150,17 @@
   if (_numberOfColumns > 0)
     {
       int i;
-      float width;
+      CGFloat width;
   
       _columnOrigins[0] = _bounds.origin.x;
       width = [[_tableColumns objectAtIndex: 0] width];
       table_width += width;
       for (i = 1; i < _numberOfColumns; i++)
-       {
-         _columnOrigins[i] = _columnOrigins[i - 1] + width;
-         width = [[_tableColumns objectAtIndex: i] width];
-         table_width += width;
-       }
+        {
+          _columnOrigins[i] = _columnOrigins[i - 1] + width;
+          width = [[_tableColumns objectAtIndex: i] width];
+          table_width += width;
+        }
     }
   /* + 1 for the last grid line */
   table_height = (_numberOfRows * _rowHeight) + 1;
@@ -6002,7 +6002,7 @@
       if (_numberOfColumns > 0)
         {
           _columnOrigins = NSZoneMalloc (NSDefaultMallocZone (), 
-                                         sizeof(float) * _numberOfColumns);
+                                         sizeof(CGFloat) * _numberOfColumns);
         }
       [self tile]; /* Initialize _columnOrigins */
     }
@@ -6064,7 +6064,7 @@
   [[_tableColumns objectAtIndex: index] setWidth: width];
 }
 
-- (float *) _columnOrigins
+- (CGFloat *) _columnOrigins
 {
   return _columnOrigins;
 }


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

Reply via email to