tidy and remnove unused code

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22690 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-03-20 08:42:39 +00:00
parent a2f590e4b6
commit e4f615e760
2 changed files with 13 additions and 21 deletions

View file

@ -1,3 +1,8 @@
2006-03-20 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSMenuView.m: ([-rectOfItemAtIndex:]) remove unused code and
tidy a bit (problem pointed out by Matt Rice).
2006-03-19 Nicolas Roard <nicolas@roard.com>
* Source/NSSliderCell.m:

View file

@ -882,15 +882,15 @@ _addLeftBorderOffsetToRect(NSRect aRect)
- (NSRect) rectOfItemAtIndex: (int)index
{
if (_needsSizing == YES)
{
[self sizeToFit];
}
if (_horizontal == YES)
{
GSCellRect aRect;
if (_needsSizing == YES)
{
[self sizeToFit];
}
aRect = GSIArrayItemAtIndex(cellRects, index).ext;
/* FIXME: handle vertical case? */
@ -901,25 +901,12 @@ _addLeftBorderOffsetToRect(NSRect aRect)
{
NSRect theRect;
if (_needsSizing == YES)
{
[self sizeToFit];
}
/* Fiddle with the origin so that the item rect is shifted 1 pixel over
* so we do not draw on the heavy line at origin.x = 0.
*/
if (_horizontal == NO)
{
theRect.origin.y
= _cellSize.height * ([_itemCells count] - index - 1);
theRect.origin.x = _leftBorderOffset;
}
else
{
theRect.origin.x = _cellSize.width * (index + 1);
theRect.origin.y = 0;
}
theRect.origin.y
= _cellSize.height * ([_itemCells count] - index - 1);
theRect.origin.x = _leftBorderOffset;
theRect.size = _cellSize;
/* NOTE: This returns the correct NSRect for drawing cells, but nothing